Class PersistenceContextInjectionSource


  • public class PersistenceContextInjectionSource
    extends org.jboss.as.ee.component.InjectionSource
    Represents the PersistenceContext injected into a component.
    Author:
    Scott Marlow
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.jboss.as.ee.component.InjectionSource

        org.jboss.as.ee.component.InjectionSource.ResolutionContext
    • Constructor Summary

      Constructors 
      Constructor Description
      PersistenceContextInjectionSource​(javax.persistence.PersistenceContextType type, javax.persistence.SynchronizationType synchronizationType, Map properties, org.jboss.msc.service.ServiceName puServiceName, org.jboss.msc.service.ServiceRegistry serviceRegistry, String scopedPuName, String injectionTypeName, PersistenceUnitMetadata pu, JPADeploymentSettings jpaDeploymentSettings)
      Constructor for the PersistenceContextInjectorService
    • Constructor Detail

      • PersistenceContextInjectionSource

        public PersistenceContextInjectionSource​(javax.persistence.PersistenceContextType type,
                                                 javax.persistence.SynchronizationType synchronizationType,
                                                 Map properties,
                                                 org.jboss.msc.service.ServiceName puServiceName,
                                                 org.jboss.msc.service.ServiceRegistry serviceRegistry,
                                                 String scopedPuName,
                                                 String injectionTypeName,
                                                 PersistenceUnitMetadata pu,
                                                 JPADeploymentSettings jpaDeploymentSettings)
        Constructor for the PersistenceContextInjectorService
        Parameters:
        type - The persistence context type
        properties - The persistence context properties
        puServiceName - represents the deployed persistence.xml that we are going to use.
        serviceRegistry - The MSC service registry which will be used to find the PersistenceContext service
        scopedPuName - the fully scoped reference to the persistence.xml
        injectionTypeName - is normally "javax.persistence.EntityManager" but could be a different target class for example "org.hibernate.Session" in which case, EntityManager.unwrap(org.hibernate.Session.class is called)
        pu -
        jpaDeploymentSettings - Optional JPADeploymentSettings applicable for the persistence context
    • Method Detail

      • getResourceValue

        public void getResourceValue​(org.jboss.as.ee.component.InjectionSource.ResolutionContext resolutionContext,
                                     org.jboss.msc.service.ServiceBuilder<?> serviceBuilder,
                                     org.jboss.as.server.deployment.DeploymentPhaseContext phaseContext,
                                     org.jboss.msc.inject.Injector<org.jboss.as.naming.ManagedReferenceFactory> injector)
                              throws org.jboss.as.server.deployment.DeploymentUnitProcessingException
        Specified by:
        getResourceValue in class org.jboss.as.ee.component.InjectionSource
        Throws:
        org.jboss.as.server.deployment.DeploymentUnitProcessingException
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object