Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.jboss.jbossts.xts11.recovery.participant.ba;
 
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 BAParticipantRecoveryRecord(String idBusinessAgreementWithParticipantCompletionParticipant participantboolean isParticipantCompletionW3CEndpointReference endpoint)
    {
        super(idparticipantisParticipantCompletion);
        this. = endpoint;
    }

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

    
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() {
        if () {
            ParticipantCompletionParticipantProcessor.getProcessor().activateParticipant(enginegetId());
            engine.recovery();
        } else {
            CoordinatorCompletionParticipantEngine engine = new CoordinatorCompletionParticipantEngine(,  coordinatorCompletionParticipant.true);
            CoordinatorCompletionParticipantProcessor.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()
    {
        if () {
            return ParticipantCompletionParticipantProcessor.getProcessor().isActive(getId());
        } else {
            return CoordinatorCompletionParticipantProcessor.getProcessor().isActive(getId());
        }
    }
    private W3CEndpointReference endpoint;
New to GrepCode? Check out our FAQ X