oracle.jbo.server.ejb.sb
Class ServiceBean
java.lang.Object
|
+--oracle.jbo.server.ejb.SessionBeanImpl
|
+--oracle.jbo.server.ejb.sb.ServiceBean
- All Implemented Interfaces:
- javax.ejb.EnterpriseBean, java.io.Serializable, javax.ejb.SessionBean
- Direct Known Subclasses:
- BeanManagedServiceBean, ContainerManagedServiceBeanBase
- public abstract class ServiceBean
- extends SessionBeanImpl
BaseClass for Application Module Service Session Bean.
Service beans aggregate an application module for exposing any business logic as a session bean.
Subclasses must provide a TransactionHandlerFactory implementation for associating
the appmodule transaction with the bean transaction.
- See Also:
- Serialized Form
Type | Method |
protected void |
connectToDataSource()
Convenenince method for acquiring the jdbc connection from the dataSource name specified in
useDataSource . |
protected void |
createApplicationModule(java.lang.String amDefName)
Convenience method for creating the aggregated application module instance. |
protected void |
createApplicationModule(java.lang.String amDefName,
java.util.Hashtable initialContextEnv)
Convenience method for creating the aggregated application module instance
using the jndi environment properties. |
protected void |
createApplicationModule(java.lang.String amDefName,
java.lang.String configName)
Convenience method for creating the aggregated application module instance
using a LOCAL mode configuration. |
protected abstract TransactionHandlerFactory |
createTransactionHandlerFactory()
|
protected void |
disconnectFromDataSource()
Releases the jdbc connection by acquired by #connectToDataSource(). |
protected void |
postApplicationModuleCreate()
Called after creating the appmodule. |
void |
useDataSource(java.lang.String dataSourceName)
Set the JNDI name of the dataSource used for acquiring the
jdbc connection. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ServiceBean
public ServiceBean()
createTransactionHandlerFactory
protected abstract TransactionHandlerFactory createTransactionHandlerFactory()
createApplicationModule
protected void createApplicationModule(java.lang.String amDefName,
java.lang.String configName)
throws javax.ejb.CreateException
- Convenience method for creating the aggregated application module instance
using a LOCAL mode configuration.
- Parameters:
amDefName
- Fully qaulified appmodule definition nameconfigName
-
createApplicationModule
protected void createApplicationModule(java.lang.String amDefName,
java.util.Hashtable initialContextEnv)
throws javax.ejb.CreateException
- Convenience method for creating the aggregated application module instance
using the jndi environment properties.
- Parameters:
amDefName
- Fully qaulified appmodule definition nameinitialContextEnv
- The initial context environment used to create the aggregated appmodule
in local mode.
createApplicationModule
protected void createApplicationModule(java.lang.String amDefName)
throws javax.ejb.CreateException
- Convenience method for creating the aggregated application module instance.
This method creates the the aggregated appmodule.
- Parameters:
amDefName
- Fully qaulified appmodule definition name
postApplicationModuleCreate
protected void postApplicationModuleCreate()
- Called after creating the appmodule.
Subclasses can extend this method to perform other initialization
after the appmodule is created.
useDataSource
public void useDataSource(java.lang.String dataSourceName)
- Set the JNDI name of the dataSource used for acquiring the
jdbc connection. JDBC connection is acquired when the transaction is started
- Parameters:
dataSourceName
- The JNDI name of the dataSource.
For OC4J this should be ejb-location of datasource
defined in data-sources.xml.
connectToDataSource
protected void connectToDataSource()
throws JboException
- Convenenince method for acquiring the jdbc connection from the dataSource name specified in
useDataSource
.
- See Also:
useDataSource(String)
,
Transaction.connectToDataSource(Hashtable, String, boolean)
disconnectFromDataSource
protected void disconnectFromDataSource()
throws JboException
- Releases the jdbc connection by acquired by #connectToDataSource().
- See Also:
Transaction.disconnect()