Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1.5.0)

E10653-06


oracle.jbo.server.ejb.sb
Class ContainerManagedServiceBean

java.lang.Object
  extended by oracle.jbo.server.ejb.SessionBeanImpl
      extended by oracle.jbo.server.ejb.sb.ServiceBean
          extended by oracle.jbo.server.ejb.sb.ContainerManagedServiceBeanBase
              extended by oracle.jbo.server.ejb.sb.ContainerManagedServiceBean

All Implemented Interfaces:
java.io.Serializable, javax.ejb.EnterpriseBean, javax.ejb.SessionBean, javax.ejb.SessionSynchronization

public class ContainerManagedServiceBean
extends ContainerManagedServiceBeanBase
implements javax.ejb.SessionSynchronization

BaseClass for deploying an appmodule service methods as session bean with container managed transaction. This class implements the javax.ejb.SessionSynchronization and provides a TransactionHandlerFactory implemnatation for associating the bean transaction with the bc4j transaction. The TransactionHandlerFactory allows this bean to plug in the TransactionHandler which in trun is notified of the transaction boundary callbacks received from the container via the SessionSynchronization interface.

It also provides the functionality to automatically acquire and release a jdbc connection at start and end of a the transaction.

See Also:
Serialized Form

Field Summary

 

Fields inherited from class oracle.jbo.server.ejb.sb.ContainerManagedServiceBeanBase
mHandler

 

Fields inherited from class oracle.jbo.server.ejb.SessionBeanImpl
mApplicationModule

 

Constructor Summary
ContainerManagedServiceBean()
           

 

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.

 

Methods inherited from class oracle.jbo.server.ejb.sb.ContainerManagedServiceBeanBase
createTransactionHandlerFactory, isTransactionManagedByBean, postChanges

 

Methods inherited from class oracle.jbo.server.ejb.sb.ServiceBean
createApplicationModule, createApplicationModule, isJboBean

 

Methods inherited from class oracle.jbo.server.ejb.SessionBeanImpl
connectToDataSource, createApplicationModule, createApplicationModule, disconnectFromDataSource, doMessage, ejbActivate, ejbPassivate, ejbRemove, getApplicationModule, getApplicationModuleDefName, getConfigurationName, getSessionContext, getTransactionTimeOut, 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

ContainerManagedServiceBean

public ContainerManagedServiceBean()

Method Detail

afterBegin

public void afterBegin()
                throws javax.ejb.EJBException
Implementation of the SessionSynchronization interface. Calls connectToDataSource for acquiring the jdbc connection.
Specified by:
afterBegin in interface javax.ejb.SessionSynchronization
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.
Specified by:
beforeCompletion in interface javax.ejb.SessionSynchronization
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.
Specified by:
afterCompletion in interface javax.ejb.SessionSynchronization
Throws:
javax.ejb.EJBException

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1.5.0)

E10653-06


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