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 Stringstatic final Stringprotected jakarta.persistence.EntityManagerprotected jakarta.persistence.EntityManagerFactorystatic final StringThe key for the test name in the properties.protected jakarta.ejb.SessionContextstatic final Stringstatic final String -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefault constructor for EJB3ShareBaseBean. -
Method Summary
Modifier and TypeMethodDescriptionjakarta.persistence.EntityManagerReturns the entity manager.jakarta.persistence.EntityManagerFactoryReturns the entity manager factory.protected abstract jakarta.persistence.EntityTransactionReturns the entity transaction.jakarta.ejb.SessionContextReturns the session context.protected StringgetTestName(Properties props) Retrieves the test name from the properties.protected abstract StringReturns the type of the vehicle.runTest(String[] args, Properties props) Runs the test with the given arguments and properties.abstract voidsetEntityManager(jakarta.persistence.EntityManager entityManager) Sets the entity manager.voidsetEntityManagerFactory(jakarta.persistence.EntityManagerFactory emf) Sets the entity manager factory.abstract voidsetSessionContext(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:
runTestin 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
-