Class EJB3ShareBaseBean
java.lang.Object
com.sun.ts.tests.common.vehicle.ejb3share.EJB3ShareBaseBean
- All Implemented Interfaces:
EJB3ShareIF
- Direct Known Subclasses:
AppManagedNoTxVehicleBean
,AppManagedVehicleBean
,Stateful3VehicleBean
,Stateless3VehicleBean
Abstract base class for EJB3 share beans.
Provides common functionality for EJB3 share beans.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
protected jakarta.persistence.EntityManager
protected jakarta.persistence.EntityManagerFactory
static final String
The key for the test name in the properties.protected jakarta.ejb.SessionContext
static final String
static final String
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Default constructor for EJB3ShareBaseBean. -
Method Summary
Modifier and TypeMethodDescriptionjakarta.persistence.EntityManager
Returns the entity manager.jakarta.persistence.EntityManagerFactory
Returns the entity manager factory.protected abstract jakarta.persistence.EntityTransaction
Returns the entity transaction.jakarta.ejb.SessionContext
Returns the session context.protected String
getTestName
(Properties props) Retrieves the test name from the properties.protected abstract String
Returns the type of the vehicle.runTest
(String[] args, Properties props) Runs the test with the given arguments and properties.abstract void
setEntityManager
(jakarta.persistence.EntityManager entityManager) Sets the entity manager.void
setEntityManagerFactory
(jakarta.persistence.EntityManagerFactory emf) Sets the entity manager factory.abstract void
setSessionContext
(jakarta.ejb.SessionContext sessionContext) Sets the session context.
-
Field Details
-
FINDER_TEST_NAME_KEY
The key for the test name in the properties.- See Also:
-
STATELESS3
- See Also:
-
STATEFUL3
- See Also:
-
APPMANAGED
- See Also:
-
APPMANAGEDNOTX
- See Also:
-
entityManager
protected jakarta.persistence.EntityManager entityManager -
entityManagerFactory
protected jakarta.persistence.EntityManagerFactory entityManagerFactory -
sessionContext
protected jakarta.ejb.SessionContext sessionContext
-
-
Constructor Details
-
EJB3ShareBaseBean
protected EJB3ShareBaseBean()Default constructor for EJB3ShareBaseBean. Calls the superclass constructor.
-
-
Method Details
-
getVehicleType
Returns the type of the vehicle.- Returns:
- the vehicle type as a String
-
runTest
Runs the test with the given arguments and properties.- Specified by:
runTest
in interfaceEJB3ShareIF
- Parameters:
args
- the arguments for the testprops
- the properties for the test- Returns:
- the RemoteStatus of the test run
-
getTestName
Retrieves the test name from the properties.- Parameters:
props
- the properties containing the test name- Returns:
- the test name as a String
-
getSessionContext
public jakarta.ejb.SessionContext getSessionContext()Returns the session context.- Returns:
- the SessionContext
-
setSessionContext
public abstract void setSessionContext(jakarta.ejb.SessionContext sessionContext) Sets the session context.- Parameters:
sessionContext
- the SessionContext to be set
-
getEntityManager
public jakarta.persistence.EntityManager getEntityManager()Returns the entity manager.- Returns:
- the EntityManager
-
getEntityManagerFactory
public jakarta.persistence.EntityManagerFactory getEntityManagerFactory()Returns the entity manager factory.- Returns:
- the EntityManagerFactory
-
setEntityManagerFactory
public void setEntityManagerFactory(jakarta.persistence.EntityManagerFactory emf) Sets the entity manager factory.- Parameters:
emf
- the EntityManagerFactory to be set
-
getEntityTransaction
protected abstract jakarta.persistence.EntityTransaction getEntityTransaction()Returns the entity transaction.- Returns:
- the EntityTransaction
-
setEntityManager
public abstract void setEntityManager(jakarta.persistence.EntityManager entityManager) Sets the entity manager.- Parameters:
entityManager
- the EntityManager to be set
-