Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.jboss.jbossts.xts11.recovery.participant.at;
 
 
recovery record specific to WS-AT 1.1 protocol participants. this implements the behaviours necessary to save and restore a 1.1 participant to or from the TX object store
constructor used during prepare processing to create an AT 1.1 participant record for saving to the object store

Parameters:
id the id of the application-specific participant
participant the application-specific participant
    public ATParticipantRecoveryRecord(String idDurable2PCParticipant participantW3CEndpointReference endpoint)
    {
        super(idparticipant);
        this. = endpoint;
    }

    
constructor used during recovery processing to create a record whose contents will be recovered from the object store
    {
        super(nullnull);
    }

    
save the endpoint reference to the coordinator for this participant
    protected void saveEndpointReference(OutputObjectState oosthrows IOException {
        // the toString method will do what we need
        oos.packString(.toString());
    }

    
restore the endpoint reference to the coordinator for this participant
    protected void restoreEndpointReference(InputObjectState iosthrows IOException {
        String endpointString = ios.unpackString();
        Source source = new StreamSource(new StringReader(endpointString));
         = new W3CEndpointReference(source);
    }

    
create a participant engine to manage commit or rollback processing for the participant and install it in the active participants table
    public void activate() {
        ParticipantProcessor.getProcessor().activateParticipant(enginegetId());
        engine.recovery();
    }

    
test whether a participant is currently activated with the id of this recovery record.

Returns:
true if a participant is currently activated with the id of this recovery record
    public boolean isActive()
    {
        return ParticipantProcessor.getProcessor().isActive(getId());
    }
    private W3CEndpointReference endpoint;
New to GrepCode? Check out our FAQ X