Class JPAService

java.lang.Object
org.jboss.as.jpa.service.JPAService
All Implemented Interfaces:
org.jboss.msc.Service, org.jboss.msc.service.Service<Void>, org.jboss.msc.value.Value<Void>

public class JPAService extends Object implements org.jboss.msc.service.Service<Void>
represents the global Jakarta Persistence Service
Author:
Scott Marlow
  • Field Details

    • SERVICE_NAME

      public static final org.jboss.msc.service.ServiceName SERVICE_NAME
  • Constructor Details

    • JPAService

      public JPAService()
  • Method Details

    • getDefaultDataSourceName

      public static String getDefaultDataSourceName()
    • setDefaultDataSourceName

      public static void setDefaultDataSourceName(String dataSourceName)
    • getDefaultExtendedPersistenceInheritance

      public static ExtendedPersistenceInheritance getDefaultExtendedPersistenceInheritance()
    • setDefaultExtendedPersistenceInheritance

      public static void setDefaultExtendedPersistenceInheritance(ExtendedPersistenceInheritance defaultExtendedPersistenceInheritance)
    • addService

      public static void addService(org.jboss.msc.service.ServiceTarget target, String defaultDataSourceName, ExtendedPersistenceInheritance defaultExtendedPersistenceInheritance)
    • createManagementStatisticsResource

      public static org.jboss.as.controller.registry.Resource createManagementStatisticsResource(ManagementAdaptor managementAdaptor, String scopedPersistenceUnitName, org.jboss.as.server.deployment.DeploymentUnit deploymentUnit)
      Create single instance of management statistics resource per managementAdaptor version. ManagementAccess The persistence provider and jipijapa adapters will be in the same classloader, either a static module or included directly in the application. Those are the two supported use cases for management of deployment persistence units also. From a management point of view, the requirements are: 1. show management statistics for static persistence provider modules and applications that have their own persistence provider module. 2. persistence provider adapters will provide a unique key that identifies the management version of supported management statistics/operations. For example, Hibernate 3.x might be 1.0, Hibernate 4.1/4.2 might be version 2.0 and Hibernate 4.3 could be 2.0 also as long as its compatible (same stats) with 4.1/4.2. Eventually, a Hibernate (later version) change in statistics is likely to happen, the management version will be incremented.
      Parameters:
      managementAdaptor - the management adaptor that will provide statistics
      scopedPersistenceUnitName - name of the persistence unit
      deploymentUnit - deployment unit for the deployment requesting a resource
      Returns:
      the management resource
    • start

      public void start(org.jboss.msc.service.StartContext startContext) throws org.jboss.msc.service.StartException
      Specified by:
      start in interface org.jboss.msc.Service
      Throws:
      org.jboss.msc.service.StartException
    • stop

      public void stop(org.jboss.msc.service.StopContext stopContext)
      Specified by:
      stop in interface org.jboss.msc.Service
    • getValue

      Specified by:
      getValue in interface org.jboss.msc.value.Value<Void>
      Throws:
      IllegalStateException
      IllegalArgumentException