Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.arjuna.webservices11.wsarj;
 
 
The arjuna context.

Author(s):
kevin
public class ArjunaContext
{
    
The key used for the arjuna context within a message exchange.
    private static final String ARJUNAWS_CONTEXT_PROPERTY = "org.jboss.xts.ws.context";

    
The InstanceIdentifier header.
    private InstanceIdentifier instanceIdentifier ;

    
Default constructor.
    private ArjunaContext()
    {
    }

    
Get the instance identifier.

Returns:
The instance identifier.
    {
        return  ;
    }

    
Set the instance identifier.

Parameters:
instanceIdentifier The instance identifier.
    public void setInstanceIdentifier(final InstanceIdentifier instanceIdentifier)
    {
        this. = instanceIdentifier ;
    }

    
Is the configuration of this element valid?

Returns:
true if valid, false otherwise.
    public boolean isValid()
    {
        return (( != null) && .isValid()) ;
    }

    
Get the arjuna context from the message context if present.

Parameters:
messageContext The message context.
Returns:
The arjuna context or null if not present.
    public static ArjunaContext getCurrentContext(final MessageContext messageContext)
    {
        return (ArjunaContext)messageContext.get() ;
    }

    
Get the arjuna context from the message context.

Parameters:
messageContext The message context.
Returns:
The arjuna context.
    public static ArjunaContext getContext(final MessageContext messageContext)
    {
        final ArjunaContext current = (ArjunaContext)messageContext.get() ;
        if (current != null)
        {
            return current ;
        }
        final ArjunaContext newContext = new ArjunaContext() ;
        messageContext.put(newContext) ;
        return newContext ;
    }
New to GrepCode? Check out our FAQ X