Class EJB3ShareBaseBean

java.lang.Object
com.sun.ts.tests.common.vehicle.ejb3share.EJB3ShareBaseBean
All Implemented Interfaces:
EJB3ShareIF
Direct Known Subclasses:
AppManagedNoTxVehicleBean, AppManagedVehicleBean, Stateful3VehicleBean, Stateless3VehicleBean

public abstract class EJB3ShareBaseBean extends Object implements EJB3ShareIF
Abstract base class for EJB3 share beans. Provides common functionality for EJB3 share beans.
  • Field Details

    • FINDER_TEST_NAME_KEY

      public static final String FINDER_TEST_NAME_KEY
      The key for the test name in the properties.
      See Also:
    • STATELESS3

      public static final String STATELESS3
      See Also:
    • STATEFUL3

      public static final String STATEFUL3
      See Also:
    • APPMANAGED

      public static final String APPMANAGED
      See Also:
    • APPMANAGEDNOTX

      public static final String 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

      protected abstract String getVehicleType()
      Returns the type of the vehicle.
      Returns:
      the vehicle type as a String
    • runTest

      public RemoteStatus runTest(String[] args, Properties props)
      Runs the test with the given arguments and properties.
      Specified by:
      runTest in interface EJB3ShareIF
      Parameters:
      args - the arguments for the test
      props - the properties for the test
      Returns:
      the RemoteStatus of the test run
    • getTestName

      protected String getTestName(Properties props)
      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