org.jboss.injection
Class PersistenceUnitHandler<X extends org.jboss.metadata.javaee.spec.RemoteEnvironment>
java.lang.Object
org.jboss.injection.PersistenceUnitHandler<X>
- All Implemented Interfaces:
- InjectionHandler<X>
public class PersistenceUnitHandler<X extends org.jboss.metadata.javaee.spec.RemoteEnvironment>
- extends java.lang.Object
- implements InjectionHandler<X>
Searches bean class for all @Inject and create Injectors
|
Method Summary |
static void |
addPUDependency(java.lang.String unitName,
InjectionContainer container)
|
static javax.persistence.EntityManagerFactory |
getEntityManagerFactory(javax.persistence.PersistenceUnit ref,
InjectionContainer container)
|
static javax.persistence.EntityManagerFactory |
getEntityManagerFactory(java.lang.String unitName,
InjectionContainer container)
|
static java.lang.Object |
getFactory(java.lang.Class<?> type,
java.lang.String unitName,
InjectionContainer container)
|
static org.jboss.jpa.deployment.ManagedEntityManagerFactory |
getManagedEntityManagerFactory(InjectionContainer container,
java.lang.String unitName)
|
void |
handleClassAnnotations(java.lang.Class<?> clazz,
InjectionContainer container)
|
void |
handleFieldAnnotations(java.lang.reflect.Field field,
InjectionContainer container,
java.util.Map<java.lang.reflect.AccessibleObject,Injector> injectors)
|
void |
handleMethodAnnotations(java.lang.reflect.Method method,
InjectionContainer container,
java.util.Map<java.lang.reflect.AccessibleObject,Injector> injectors)
|
void |
loadXml(X xml,
InjectionContainer container)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ERROR_MESSAGE_FAILED_TO_RESOVLE_PU
public static final java.lang.String ERROR_MESSAGE_FAILED_TO_RESOVLE_PU
- Contracted error message value, form may be checked from Integration Tests
- See Also:
- Constant Field Values
PersistenceUnitHandler
public PersistenceUnitHandler()
loadXml
public void loadXml(X xml,
InjectionContainer container)
- Specified by:
loadXml in interface InjectionHandler<X extends org.jboss.metadata.javaee.spec.RemoteEnvironment>
handleClassAnnotations
public void handleClassAnnotations(java.lang.Class<?> clazz,
InjectionContainer container)
- Specified by:
handleClassAnnotations in interface InjectionHandler<X extends org.jboss.metadata.javaee.spec.RemoteEnvironment>
addPUDependency
public static void addPUDependency(java.lang.String unitName,
InjectionContainer container)
throws javax.naming.NameNotFoundException
- Throws:
javax.naming.NameNotFoundException
getManagedEntityManagerFactory
public static org.jboss.jpa.deployment.ManagedEntityManagerFactory getManagedEntityManagerFactory(InjectionContainer container,
java.lang.String unitName)
throws javax.naming.NameNotFoundException
- Throws:
javax.naming.NameNotFoundException
getEntityManagerFactory
public static javax.persistence.EntityManagerFactory getEntityManagerFactory(javax.persistence.PersistenceUnit ref,
InjectionContainer container)
throws javax.naming.NameNotFoundException
- Throws:
javax.naming.NameNotFoundException
getFactory
public static java.lang.Object getFactory(java.lang.Class<?> type,
java.lang.String unitName,
InjectionContainer container)
throws javax.naming.NameNotFoundException
- Throws:
javax.naming.NameNotFoundException
getEntityManagerFactory
public static javax.persistence.EntityManagerFactory getEntityManagerFactory(java.lang.String unitName,
InjectionContainer container)
throws javax.naming.NameNotFoundException
- Throws:
javax.naming.NameNotFoundException
handleMethodAnnotations
public void handleMethodAnnotations(java.lang.reflect.Method method,
InjectionContainer container,
java.util.Map<java.lang.reflect.AccessibleObject,Injector> injectors)
- Specified by:
handleMethodAnnotations in interface InjectionHandler<X extends org.jboss.metadata.javaee.spec.RemoteEnvironment>
handleFieldAnnotations
public void handleFieldAnnotations(java.lang.reflect.Field field,
InjectionContainer container,
java.util.Map<java.lang.reflect.AccessibleObject,Injector> injectors)
- Specified by:
handleFieldAnnotations in interface InjectionHandler<X extends org.jboss.metadata.javaee.spec.RemoteEnvironment>