Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
   * JBoss, Home of Professional Open Source
   * Copyright 2006, Red Hat Middleware LLC, and individual contributors
   * as indicated by the @author tags. 
   * See the copyright.txt in the distribution for a full listing 
   * of individual contributors.
   * This copyrighted material is made available to anyone wishing to use,
   * modify, copy, or redistribute it subject to the terms and conditions
   * of the GNU Lesser General Public License, v. 2.1.
  * This program is distributed in the hope that it will be useful, but WITHOUT A
  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
  * You should have received a copy of the GNU Lesser General Public License,
  * v.2.1 along with this distribution; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  * MA  02110-1301, USA.
  * (C) 2005-2006,
  * @author JBoss Inc.
  * Copyright (C) 2003,
  * Arjuna Technologies Limited,
  * Newcastle upon Tyne,
  * Tyne and Wear,
  * UK.
  * $Id:,v 2005/11/22 10:36:06 kconner Exp $
This is the interface that allows BAs to be started and terminated. The messaging layer converts the messages into calls on this. Importantly, a UserBusinessActivity does not represent a specific transaction, but rather is responsible for providing access to an implicit per-thread transaction context; it is similar to the UserTransaction in the JTA specification. Therefore, all of the UserTransaction methods implicitly act on the current thread of control.

Mark Little (
$Id:,v 2005/11/22 10:36:06 kconner Exp $
XTS 1.0.
 public abstract class UserBusinessActivity
The user business activity.
     private static UserBusinessActivity USER_BUSINESS_ACTIVITY ;

Get the user business activity.

The user business activity.
     public static synchronized UserBusinessActivity getUserBusinessActivity()
         return  ;

Set the user business activity.

userBusinessActivity The user business activity.
     public static synchronized void setUserBusinessActivity(final UserBusinessActivity userBusinessActivity)
          = userBusinessActivity ;

get the user subordinate business activity this is a UserBusinessActivity whose begin method will create an interposed BA transaction

The user business activity.
     public static final int ATOMIC_OUTCOME = 0;
     public static final int MIXED_OUTCOME = 1;

Start a new business activity with atomic outcome. If one is already associated with this thread then the WrongStateException will be thrown. Upon success, this operation associates the newly created transaction with the current thread.
     public abstract void begin()
         throws WrongStateExceptionSystemException;

Start a new BA with atomic outcome and the specified timeout as its lifetime. If one is already associated with this thread then the WrongStateException will be thrown.
    public abstract void begin(final int timeout)
        throws WrongStateExceptionSystemException;

The BA is normally terminated by the close method. This signals to all registered participants that the BA has ended and no compensation is required.
    public abstract void close()
If the BA must undo its work then the cancel method is used. Any participants that can compensate are forced to do so.
    public abstract void cancel()
If participants have registered for the BusinessAgreementWithComplete protocol then they will be expecting the application to inform them when all work intended for them has been sent (and responded to). The complete method is used for this purpose.
    public abstract void complete()
    public abstract String transactionIdentifier();
New to GrepCode? Check out our FAQ X