org.glassfish.persistence.jpaconnector
Class JPASniffer
java.lang.Object
org.glassfish.internal.deployment.GenericSniffer
org.glassfish.persistence.jpaconnector.JPASniffer
- All Implemented Interfaces:
- SecondarySniffer, Sniffer
- Direct Known Subclasses:
- JPACompositeSniffer
@Service(name="jpa")
@Scoped(value=org.jvnet.hk2.component.Singleton.class)
public class JPASniffer
- extends GenericSniffer
- implements SecondarySniffer
Implementation of the Sniffer for JPA.
- Author:
- Mitesh Meswani
| Methods inherited from class org.glassfish.internal.deployment.GenericSniffer |
equals, getAnnotationTypes, getContainerModuleNames, getDeploymentConfigurationPaths, getDeploymentConfigurations, getIncompatibleSnifferTypes, getModuleType, getURLPatterns, hashCode, isUserVisible, setup, tearDown |
JPASniffer
public JPASniffer()
handles
public boolean handles(ReadableArchive location,
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,
String libLocation)
getContainersNames
public String[] getContainersNames()
- Specified by:
getContainersNames in interface Sniffer
Copyright © 2012. All Rights Reserved.