Tabnine Logo
UserActivity
Code IndexAdd Tabnine to your IDE (free)

How to use
UserActivity
in
com.arjuna.mw.wsas

Best Java code snippets using com.arjuna.mw.wsas.UserActivity (Showing top 20 results out of 315)

origin: org.jboss.jbossts.xts/jbossxts

/**
 * Given a token representing a context, associate it with the current
 * thread of control. This will implicitly disassociate the thread from any
 * activities that it may already be associated with. If the parameter is
 * null then the thread is associated with no activity.
 *
 * @param tx The activity to associate with this thread. This
 * may be null in which case the current thread becomes associated with
 * no activity.
 *
 * @exception InvalidActivityException Thrown if the activity handle
 * is invalid in this context.
 * @exception SystemException Thrown if any other error occurs.
 */
public void resume (ActivityHierarchy tx) throws InvalidActivityException, SystemException
{
UserActivityFactory.userActivity().resume(tx);
}
origin: org.jboss.jbossts.xts/jbossxts

/**
 * Suspend the current activity from this thread and return the token
 * representing the context, if any, or null otherwise. Once called, the
 * thread will have no activities associated with it.
 *
 * @exception SystemException Thrown if any error occurs.
 *
 * @return the token representing the current context, if any, or null
 * otherwise.
 */
public ActivityHierarchy suspend () throws SystemException
{
return UserActivityFactory.userActivity().suspend();
}
origin: org.jboss.jbossts.xts/jbossxts

/**
 * @return the token representing the current activity context hierarchy,
 * or null if there is none associated with the invoking thread.
 *
 * @exception SystemException Thrown if any error occurs.
 */
public ActivityHierarchy currentActivity () throws SystemException
{
return UserActivityFactory.userActivity().currentActivity();
}
origin: org.jboss.jbossts.xts/jbossxts

UserActivityFactory.userActivity().resume(new ActivityHierarchyImple(element._activity));
UserActivityFactory.userActivity().end(Failure.instance());
UserActivityFactory.userActivity().suspend();
origin: org.jboss.jbossts/jbossxts

Outcome res = UserActivityFactory.userActivity().end(Failure.instance());
origin: org.jboss.jbossts.xts/jbossxts

String currentServiceType = UserActivityFactory.userActivity().serviceType();
if (currentServiceType.equals(serviceType)) {
  service = _manager.getHighLevelService(serviceType);
origin: org.jboss.jbossts.xts/jbossxts

/**
 * Start a new activity. If there is already an activity associated
 * with the thread then it will be nested. An implementation specific
 * timeout will be associated with the activity (which may be no
 * timeout).
 *
 * @exception WrongStateException Thrown if the any currently associated
 * activity is in a state that does not allow a new activity to be
 * enlisted.
 * @exception SystemException Thrown in any other situation.
 */
public void begin (String coordinationType) throws WrongStateException, SystemException
{
UserActivityFactory.userActivity().start(coordinationType);
}
origin: org.jboss.jbossts/jbossxts

/**
 * Get the timeout value currently associated with activities.
 *
 * @exception SystemException Thrown if any error occurs.
 *
 * @return the timeout value in seconds, or 0 if no application specified
 * timeout has been provided.
 */
public int getTimeout () throws SystemException
{
return UserActivityFactory.userActivity().getTimeout();
}    
origin: org.jboss.jbossts.xts/jbossxts

/**
 * Set the termination status for the current activity to cancel only.
 *
 * @exception WrongStateException Thrown if the completion status is
 * incompatible with the current state of the activity.
 * @exception SystemException Thrown if any other error occurs.
 */
public void setCancelOnly () throws NoCoordinatorException, WrongStateException, SystemException
{
try
{
  UserActivityFactory.userActivity().setCompletionStatus(FailureOnly.instance());
}
catch (NoActivityException ex)
{
  throw new NoCoordinatorException();
}
}    
origin: org.jboss.jbossts.xts/jbossxts

/**
 * Set the timeout to be associated with all subsequently created
 * activities. A default value of 0 is automatically associated with
 * each thread and this means that no application specified timeout is
 * set for activities.
 *
 * @param timeout The timeout (in seconds) to associate with all
 * subsequently created activities. This value must be 0 or greater.
 *
 * @exception InvalidTimeoutException Thrown if the timeout value provided
 * is negative, too large, or if timeouts are simply not supported by
 * the activity implementation.
 * @exception SystemException Thrown if any other error occurs.
 */
public void setTimeout (int timeout) throws InvalidTimeoutException, SystemException
{
UserActivityFactory.userActivity().setTimeout(timeout);
}    

origin: org.jboss.jbossts.xts/wsas

UserActivityFactory.userActivity().resume(new ActivityHierarchyImple(element._activity));
UserActivityFactory.userActivity().end(Failure.instance());
UserActivityFactory.userActivity().suspend();
origin: org.jboss.jbossts.xts/jbossxts

Outcome res = UserActivityFactory.userActivity().end(Success.instance());
origin: org.jboss.jbossts.xts/wsas

String currentServiceType = UserActivityFactory.userActivity().serviceType();
if (currentServiceType.equals(serviceType)) {
  service = _manager.getHighLevelService(serviceType);
origin: org.jboss.jbossts/jbossxts

/**
 * Start a new activity. If there is already an activity associated
 * with the thread then it will be nested. An implementation specific
 * timeout will be associated with the activity (which may be no
 * timeout).
 *
 * @exception WrongStateException Thrown if the any currently associated
 * activity is in a state that does not allow a new activity to be
 * enlisted.
 * @exception SystemException Thrown in any other situation.
 */
public void begin (String coordinationType) throws WrongStateException, SystemException
{
UserActivityFactory.userActivity().start(coordinationType);
}
origin: org.jboss.jbossts.xts/jbossxts

/**
 * Get the timeout value currently associated with activities.
 *
 * @exception SystemException Thrown if any error occurs.
 *
 * @return the timeout value in seconds, or 0 if no application specified
 * timeout has been provided.
 */
public int getTimeout () throws SystemException
{
return UserActivityFactory.userActivity().getTimeout();
}    
origin: org.jboss.jbossts/jbossxts

/**
 * Set the termination status for the current activity to cancel only.
 *
 * @exception WrongStateException Thrown if the completion status is
 * incompatible with the current state of the activity.
 * @exception SystemException Thrown if any other error occurs.
 */
public void setCancelOnly () throws NoCoordinatorException, WrongStateException, SystemException
{
try
{
  UserActivityFactory.userActivity().setCompletionStatus(FailureOnly.instance());
}
catch (NoActivityException ex)
{
  throw new NoCoordinatorException();
}
}    
origin: org.jboss.jbossts/jbossxts

/**
 * Set the timeout to be associated with all subsequently created
 * activities. A default value of 0 is automatically associated with
 * each thread and this means that no application specified timeout is
 * set for activities.
 *
 * @param timeout The timeout (in seconds) to associate with all
 * subsequently created activities. This value must be 0 or greater.
 *
 * @exception InvalidTimeoutException Thrown if the timeout value provided
 * is negative, too large, or if timeouts are simply not supported by
 * the activity implementation.
 * @exception SystemException Thrown if any other error occurs.
 */
public void setTimeout (int timeout) throws InvalidTimeoutException, SystemException
{
UserActivityFactory.userActivity().setTimeout(timeout);
}    

origin: org.jboss.jbossts/jbossxts

UserActivityFactory.userActivity().resume(new ActivityHierarchyImple(element._activity));
UserActivityFactory.userActivity().end(Failure.instance());
UserActivityFactory.userActivity().suspend();
origin: org.jboss.jbossts.xts/jbossxts

/**
 * @return the token representing the current activity context hierarchy, or
 *         null if there is none associated with the invoking thread.
 * 
 * @exception SystemException
 *                Thrown if any error occurs.
 */
public ActivityHierarchy currentActivity () throws SystemException
{
  return UserActivityFactory.userActivity().currentActivity();
}
origin: org.jboss.jbossts.xts/jbossxts

Outcome res = UserActivityFactory.userActivity().end(Failure.instance());
com.arjuna.mw.wsasUserActivity

Javadoc

The user portion of the activity API. An implementation of this interface presents each thread with the capability to create and manage activities. It is very similar to the OTS Current and JTA UserTransaction.

Most used methods

  • end
    Complete the activity with the completion status provided.
  • resume
    Given a token representing a context, associate it with the current thread of control. This will imp
  • serviceType
  • suspend
    Suspend the current activity from this thread and return the token representing the context, if any,
  • currentActivity
  • getTimeout
    Get the timeout value currently associated with activities.
  • setCompletionStatus
    Set the termination status for the current activity, if any.
  • setTimeout
    Set the timeout to be associated with all subsequently created activities. A default value of 0 is a
  • start
    Start a new activity with a given coordination type. If there is already an activity associated with

Popular in Java

  • Reading from database using SQL prepared statement
  • getContentResolver (Context)
  • getSharedPreferences (Context)
  • requestLocationUpdates (LocationManager)
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • JCheckBox (javax.swing)
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now