Class PersistenceArchivist
- java.lang.Object
-
- com.sun.enterprise.deployment.archivist.ExtensionsArchivist
-
- com.sun.enterprise.deployment.archivist.PersistenceArchivist
-
- Direct Known Subclasses:
ACCPersistenceArchivist,EarPersistenceArchivist,ServerSidePersistenceArchivist,WarPersistenceArchivist
public abstract class PersistenceArchivist extends ExtensionsArchivist
Class for processing JPA on a deployment
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classPersistenceArchivist.SubArchivePURootScanner
-
Field Summary
Fields Modifier and Type Field Description static LoggerdeplLoggerprotected static StringJAR_EXTprotected static charSEPERATOR_CHAR-
Fields inherited from class com.sun.enterprise.deployment.archivist.ExtensionsArchivist
confDDFiles, standardDD
-
-
Constructor Summary
Constructors Constructor Description PersistenceArchivist()
-
Method Summary
-
Methods inherited from class com.sun.enterprise.deployment.archivist.ExtensionsArchivist
addExtension, getConfigurationDDFile, getScanner, readRuntimeDeploymentDescriptor, writeRuntimeDeploymentDescriptors, writeStandardDeploymentDescriptors
-
-
-
-
Field Detail
-
JAR_EXT
protected static final String JAR_EXT
- See Also:
- Constant Field Values
-
SEPERATOR_CHAR
protected static final char SEPERATOR_CHAR
- See Also:
- Constant Field Values
-
deplLogger
public static final Logger deplLogger
-
-
Method Detail
-
getStandardDDFile
public DeploymentDescriptorFile getStandardDDFile(RootDeploymentDescriptor descriptor)
- Specified by:
getStandardDDFilein classExtensionsArchivist- Returns:
- the DeploymentDescriptorFile responsible for handling standard deployment descriptor
-
getConfigurationDDFiles
public List<ConfigurationDeploymentDescriptorFile> getConfigurationDDFiles(RootDeploymentDescriptor descriptor)
- Specified by:
getConfigurationDDFilesin classExtensionsArchivist- Parameters:
descriptor-- Returns:
- the list of the DeploymentDescriptorFile responsible for handling the configuration deployment descriptors
-
supportsModuleType
public abstract boolean supportsModuleType(ArchiveType moduleType)
- Specified by:
supportsModuleTypein classExtensionsArchivist- Returns:
- whether this extension archivist supports this module type
-
open
public Object open(Archivist main, ReadableArchive archive, RootDeploymentDescriptor descriptor) throws IOException, SAXParseException
Description copied from class:ExtensionsArchivistRead the standard deployment descriptor of the extension- Overrides:
openin classExtensionsArchivistarchive- the archivedescriptor- the main deployment descriptor- Returns:
- the extension descriptor object
- Throws:
IOExceptionSAXParseException
-
isProbablePuRootJar
public static boolean isProbablePuRootJar(String path)
- Parameters:
path- *- Returns:
- true if given path is probable pu root
-
readPersistenceDeploymentDescriptor
protected PersistenceUnitsDescriptor readPersistenceDeploymentDescriptor(Archivist main, ReadableArchive subArchive, String puRoot, RootDeploymentDescriptor descriptor) throws IOException, SAXParseException
- Throws:
IOExceptionSAXParseException
-
getDefaultDescriptor
public <T extends RootDeploymentDescriptor> T getDefaultDescriptor()
- Specified by:
getDefaultDescriptorin classExtensionsArchivist- Returns:
- a default Descriptor for this archivist
-
getProbablePersistenceRoots
protected static Map<String,ReadableArchive> getProbablePersistenceRoots(ReadableArchive parentArchive, PersistenceArchivist.SubArchivePURootScanner subArchivePURootScanner)
Gets probable persitence roots from given parentArchive using given subArchiveRootScanner- Parameters:
parentArchive- the parentArchive within which probable persitence roots need to be scannedsubArchivePURootScanner- the scanner instance used for the scan- Returns:
- Map of puroot path to probable puroot archive.
- See Also:
PersistenceArchivist.SubArchivePURootScanner
-
getPuRoot
protected String getPuRoot(ReadableArchive archive)
-
writeDeploymentDescriptors
public void writeDeploymentDescriptors(Archivist main, BundleDescriptor descriptor, ReadableArchive in, WritableArchive out) throws IOException
writes the deployment descriptors (standard and runtime) to a JarFile using the right deployment descriptor path- Overrides:
writeDeploymentDescriptorsin classExtensionsArchivist- Parameters:
main-descriptor-in- the input archiveout- the abstract archive file to write to- Throws:
IOException
-
-