Package org.jboss.as.jpa.service
Class JPAService
- java.lang.Object
-
- org.jboss.as.jpa.service.JPAService
-
-
Field Summary
Fields Modifier and Type Field Description static org.jboss.msc.service.ServiceNameSERVICE_NAME
-
Constructor Summary
Constructors Constructor Description JPAService()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidaddService(org.jboss.msc.service.ServiceTarget target, String defaultDataSourceName, ExtendedPersistenceInheritance defaultExtendedPersistenceInheritance)static org.jboss.as.controller.registry.ResourcecreateManagementStatisticsResource(ManagementAdaptor managementAdaptor, String scopedPersistenceUnitName, org.jboss.as.server.deployment.DeploymentUnit deploymentUnit)Create single instance of management statistics resource per managementAdaptor version.static StringgetDefaultDataSourceName()static ExtendedPersistenceInheritancegetDefaultExtendedPersistenceInheritance()VoidgetValue()static voidsetDefaultDataSourceName(String dataSourceName)static voidsetDefaultExtendedPersistenceInheritance(ExtendedPersistenceInheritance defaultExtendedPersistenceInheritance)voidstart(org.jboss.msc.service.StartContext startContext)voidstop(org.jboss.msc.service.StopContext stopContext)
-
-
-
Method Detail
-
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 statisticsscopedPersistenceUnitName- name of the persistence unitdeploymentUnit- 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:
startin interfaceorg.jboss.msc.Service- Specified by:
startin interfaceorg.jboss.msc.service.Service<Void>- Throws:
org.jboss.msc.service.StartException
-
stop
public void stop(org.jboss.msc.service.StopContext stopContext)
- Specified by:
stopin interfaceorg.jboss.msc.Service- Specified by:
stopin interfaceorg.jboss.msc.service.Service<Void>
-
getValue
public Void getValue() throws IllegalStateException, IllegalArgumentException
- Specified by:
getValuein interfaceorg.jboss.msc.value.Value<Void>- Throws:
IllegalStateExceptionIllegalArgumentException
-
-