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 SummaryFieldsModifier 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 SummaryConstructorsModifierConstructorDescriptionprotectedDefault constructor for EJB3ShareBaseBean.
- 
Method SummaryModifier 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_KEYThe key for the test name in the properties.- See Also:
 
- 
STATELESS3- See Also:
 
- 
STATEFUL3- See Also:
 
- 
APPMANAGED- See Also:
 
- 
APPMANAGEDNOTX- See Also:
 
- 
entityManagerprotected jakarta.persistence.EntityManager entityManager
- 
entityManagerFactoryprotected jakarta.persistence.EntityManagerFactory entityManagerFactory
- 
sessionContextprotected jakarta.ejb.SessionContext sessionContext
 
- 
- 
Constructor Details- 
EJB3ShareBaseBeanprotected EJB3ShareBaseBean()Default constructor for EJB3ShareBaseBean. Calls the superclass constructor.
 
- 
- 
Method Details- 
getVehicleTypeReturns the type of the vehicle.- Returns:
- the vehicle type as a String
 
- 
runTestRuns the test with the given arguments and properties.- Specified by:
- runTestin interface- EJB3ShareIF
- Parameters:
- args- the arguments for the test
- props- the properties for the test
- Returns:
- the RemoteStatus of the test run
 
- 
getTestNameRetrieves the test name from the properties.- Parameters:
- props- the properties containing the test name
- Returns:
- the test name as a String
 
- 
getSessionContextpublic jakarta.ejb.SessionContext getSessionContext()Returns the session context.- Returns:
- the SessionContext
 
- 
setSessionContextpublic abstract void setSessionContext(jakarta.ejb.SessionContext sessionContext) Sets the session context.- Parameters:
- sessionContext- the SessionContext to be set
 
- 
getEntityManagerpublic jakarta.persistence.EntityManager getEntityManager()Returns the entity manager.- Returns:
- the EntityManager
 
- 
getEntityManagerFactorypublic jakarta.persistence.EntityManagerFactory getEntityManagerFactory()Returns the entity manager factory.- Returns:
- the EntityManagerFactory
 
- 
setEntityManagerFactorypublic void setEntityManagerFactory(jakarta.persistence.EntityManagerFactory emf) Sets the entity manager factory.- Parameters:
- emf- the EntityManagerFactory to be set
 
- 
getEntityTransactionprotected abstract jakarta.persistence.EntityTransaction getEntityTransaction()Returns the entity transaction.- Returns:
- the EntityTransaction
 
- 
setEntityManagerpublic abstract void setEntityManager(jakarta.persistence.EntityManager entityManager) Sets the entity manager.- Parameters:
- entityManager- the EntityManager to be set
 
 
-