FileDocCategorySizeDatePackage
ServerSequenceFactory.javaAPI DocExample4426Tue May 29 16:56:30 BST 2007com.sun.xml.ws.api.rm.server

ServerSequenceFactory

public class ServerSequenceFactory extends Object
Factory class contains a method that can be used to re-initialize a server-side sequence using persisted data after a system failure.

Fields Summary
private static Logger
logger
Constructors Summary
private ServerSequenceFactory()

    
      
    
Methods Summary
public static ServerSequencecreateSequence(com.sun.xml.ws.api.rm.SequenceSettings settings)
Factory method initializes a server-side sequence using saved data. This is necessary after a restart in order for the system to recognize incoming messages belonging to a sequence established before the restart.

param
settings A {@link SequenceSettings} obtained by an earlier call to ServerSequence.getSequenceSettings and persisted.
return
The reinitialized sequence. It will use the initialization settings from the original sequence, but will not contain state concerning which message numbers have been received.

        try {
            return RMDestination.getRMDestination().createSequence(
                                          new URI(settings.acksTo), 
                                          settings.sequenceId,
                                          settings.companionSequenceId,
                                          new SequenceConfig(settings));
        } catch (RMException e) {
            //TODO I18
            logger.log(Level.SEVERE, 
                    "ServerSequenceFactory.createSequence failed", e);
            return null;
        } catch (URISyntaxException ee) {
            //TODO I18
            logger.log(Level.SEVERE, 
                    "ServerSequenceFactory.createSequence failed", ee);
            return null;
        }