org.glassfish.persistence.jpa
Class JPASniffer
java.lang.Object
org.glassfish.internal.deployment.GenericSniffer
org.glassfish.persistence.jpa.JPASniffer
- All Implemented Interfaces:
- Sniffer
- Direct Known Subclasses:
- JPACompositeSniffer
@Service(name="jpa")
@Scoped(value=org.jvnet.hk2.component.Singleton.class)
public class JPASniffer
- extends GenericSniffer
- implements Sniffer
Implementation of the Sniffer for JPA.
- Author:
- Mitesh Meswani
|
Method Summary |
java.lang.String[] |
getContainersNames()
|
boolean |
handles(ReadableArchive location,
java.lang.ClassLoader loader)
Returns true if the archive contains persistence.xml as defined by packaging rules of JPA
Tries to getResource("META-INF/persitsence.xml") on current classLoader. |
protected boolean |
scanForPURootsInLibDir(ReadableArchive parentArchive,
java.lang.String libLocation)
|
| Methods inherited from class org.glassfish.internal.deployment.GenericSniffer |
equals, getAnnotationTypes, getDeploymentConfigurationPaths, getDeploymentConfigurations, getIncompatibleSnifferTypes, getModuleType, getURLPatterns, hashCode, isUserVisible, setup, tearDown |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
JPASniffer
public JPASniffer()
handles
public boolean handles(ReadableArchive location,
java.lang.ClassLoader loader)
- Returns true if the archive contains persistence.xml as defined by packaging rules of JPA
Tries to getResource("META-INF/persitsence.xml") on current classLoader. If it succeeds, current archive is a pu
root.
This method will be called for each bundle inside an application which would include
.war (the resource can be present in WEB-INF/classes or WEB-INF/lib/pu.jar),
ejb.jar (the resource can be present in root of the jar),
- Specified by:
handles in interface Sniffer- Overrides:
handles in class GenericSniffer
scanForPURootsInLibDir
protected boolean scanForPURootsInLibDir(ReadableArchive parentArchive,
java.lang.String libLocation)
getContainersNames
public java.lang.String[] getContainersNames()
- Specified by:
getContainersNames in interface Sniffer
Copyright © 2012 GlassFish Community. All Rights Reserved.