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

oracle.jbo.server.ejb.sb
Class BeanManagedServiceBean

java.lang.Object
  extended byoracle.jbo.server.ejb.SessionBeanImpl
      extended byoracle.jbo.server.ejb.sb.ServiceBean
          extended byoracle.jbo.server.ejb.sb.BeanManagedServiceBean
All Implemented Interfaces:
javax.ejb.EnterpriseBean, java.io.Serializable, javax.ejb.SessionBean

public class BeanManagedServiceBean
extends ServiceBean

BaseClass for deploying an appmodule service methods as stateful bean session bean with bean managed transaction. This class adds convenience method for subclasses to demarcate a transaction.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class oracle.jbo.server.ejb.SessionBeanImpl
mApplicationModule
 
Constructor Summary
BeanManagedServiceBean()
           
 
Method Summary
 void beginTransaction()
          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()
           
protected  boolean isTransactionManagedByBean()
           
 void rollbackTransaction()
          Rollbacks the changes in bc4j cache, rollbacks the transaction associated with the bean and then release the jdbc connection.
 
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, setConfigurationName, setCurrentSessionContext, setSessionContext, useDataSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BeanManagedServiceBean

public BeanManagedServiceBean()
Method Detail

beginTransaction

public void beginTransaction()
                      throws javax.transaction.NotSupportedException,
                             javax.transaction.SystemException
Starts the bean transaction using the javax.transaction.UserTransaction interface and acquires the jdbc connection from the datasource.

Throws:
javax.transaction.NotSupportedException
javax.transaction.SystemException
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()

createTransactionHandlerFactory

protected TransactionHandlerFactory createTransactionHandlerFactory()
Specified by:
createTransactionHandlerFactory in class ServiceBean

isTransactionManagedByBean

protected final boolean isTransactionManagedByBean()
Overrides:
isTransactionManagedByBean in class SessionBeanImpl

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

 

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