Oracle ADF Model and Business Components API Reference 10.1.2 B14022-01

oracle.jbo.server.ejb
Class StatefulSessionBeanImpl

java.lang.Object
  extended byoracle.jbo.server.ejb.SessionBeanImpl
      extended byoracle.jbo.server.ejb.StatefulSessionBeanImpl
All Implemented Interfaces:
javax.ejb.EnterpriseBean, java.io.Serializable, javax.ejb.SessionBean
Direct Known Subclasses:
DefaultAppModuleSessionBeanImpl

public abstract class StatefulSessionBeanImpl
extends SessionBeanImpl

See Also:
Serialized Form

Field Summary
 
Fields inherited from class oracle.jbo.server.ejb.SessionBeanImpl
mApplicationModule
 
Constructor Summary
StatefulSessionBeanImpl()
           
 
Method Summary
 void afterBegin()
          Implementation of the SessionSynchronization interface.
 void afterCompletion(boolean committed)
          Implementation of the SessionSynchronization interface.
 void beforeCompletion()
          Implementation of the SessionSynchronization interface.
 void beginTransaction()
          If the bean is managing the transaction, starts the bean transaction using the javax.transaction.UserTransaction interface and acquires the jdbc connection from the datasource.
 void commitTransaction()
          Posts the changes in bc4j cache, commits the transaction associated with the bean and then releases the jdbc connection.
protected  TransactionHandlerFactory createTransactionHandlerFactory()
           
 void resume()
           
 void rollbackTransaction()
          Rollbacks the changes in bc4j cache, rollbacks the transaction associated with the bean and then release the jdbc connection.
 void suspend()
           
 
Methods inherited from class oracle.jbo.server.ejb.SessionBeanImpl
connectToDataSource, createApplicationModule, createApplicationModule, disconnectFromDataSource, doMessage, ejbActivate, ejbPassivate, ejbRemove, getApplicationModule, getApplicationModuleDefName, getConfigurationName, getSessionContext, getTransactionTimeOut, isJboBean, isTransactionManagedByBean, postApplicationModuleCreate, removeApplicationModule, setApplicationModuleDefName, setConfigurationName, setCurrentSessionContext, setSessionContext, useDataSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StatefulSessionBeanImpl

public StatefulSessionBeanImpl()
Method Detail

afterBegin

public void afterBegin()
                throws javax.ejb.EJBException
Implementation of the SessionSynchronization interface. Calls connectToDataSource for acquiring the jdbc connection.

Throws:
javax.ejb.EJBException

beforeCompletion

public void beforeCompletion()
                      throws javax.ejb.EJBException
Implementation of the SessionSynchronization interface. Posts the changes in the bc4j cache to the database by calling postChanges. If a JboException is thrown by postChanges the transaction is marked for rollback and the exception is wrapped in java.rmi.RemoteException. The RemoteException is then thrown back to the container.

Throws:
javax.ejb.EJBException
See Also:
Transaction.postChanges()

afterCompletion

public void afterCompletion(boolean committed)
                     throws javax.ejb.EJBException
Implementation of the SessionSynchronization interface. Forwards the nofication to the transaction handler and then calls disconnectFromDataSource for releasing the jdbc connection.

Throws:
javax.ejb.EJBException

createTransactionHandlerFactory

protected TransactionHandlerFactory createTransactionHandlerFactory()
Overrides:
createTransactionHandlerFactory in class SessionBeanImpl

suspend

public void suspend()

resume

public void resume()

beginTransaction

public void beginTransaction()
                      throws javax.transaction.NotSupportedException,
                             javax.transaction.SystemException,
                             JboException
If the bean is managing the transaction, starts the bean transaction using the javax.transaction.UserTransaction interface and acquires the jdbc connection from the datasource. It's a noop if the bean's transaction is managed by the container.

Throws:
javax.transaction.NotSupportedException
javax.transaction.SystemException
JboException
See Also:
SessionBeanImpl.connectToDataSource()

commitTransaction

public void commitTransaction()
                       throws javax.transaction.RollbackException,
                              javax.transaction.HeuristicMixedException,
                              javax.transaction.HeuristicRollbackException,
                              javax.transaction.SystemException,
                              java.lang.SecurityException,
                              java.lang.IllegalStateException,
                              JboException
Posts the changes in bc4j cache, commits the transaction associated with the bean and then releases the jdbc connection.

Throws:
javax.transaction.RollbackException
javax.transaction.HeuristicMixedException
javax.transaction.HeuristicRollbackException
javax.transaction.SystemException
java.lang.SecurityException
java.lang.IllegalStateException
JboException
See Also:
SessionBeanImpl.disconnectFromDataSource()

rollbackTransaction

public void rollbackTransaction()
                         throws javax.transaction.SystemException,
                                java.lang.SecurityException,
                                java.lang.IllegalStateException,
                                JboException
Rollbacks the changes in bc4j cache, rollbacks the transaction associated with the bean and then release the jdbc connection.

Throws:
javax.transaction.SystemException
java.lang.SecurityException
java.lang.IllegalStateException
JboException
See Also:
SessionBeanImpl.disconnectFromDataSource()

Oracle ADF Model and Business Components API Reference 10.1.2 B14022-01

 

Copyright © 1997, 2004, Oracle. All rights reserved.