Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 2 (11.1.2.3.0)

E17483-04


oracle.jbo.server.ejb
Class StatefulSessionBeanImpl

java.lang.Object
  extended by oracle.jbo.server.ejb.SessionBeanImpl
      extended by oracle.jbo.server.ejb.StatefulSessionBeanImpl

All Implemented Interfaces:
java.io.Serializable, javax.ejb.EnterpriseBean, javax.ejb.SessionBean
Direct Known Subclasses:
DefaultAppModuleSessionBeanEJB3Impl, 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, createApplicationModuleInternal, disconnectFromDataSource, doMessage, ejbActivate, ejbPassivate, ejbRemove, getApplicationModule, getApplicationModuleDefName, getConfigurationName, getSessionContext, getTransactionTimeOut, isJboBean, isTransactionManagedByBean, postApplicationModuleCreate, removeApplicationModule, setApplicationModuleDefName, setClientEnv, 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()

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 2 (11.1.2.3.0)

E17483-04


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