Methods Summary |
---|
protected java.lang.String | getArchiveExtension()
return EJB_EXTENSION;
|
public com.sun.enterprise.deployment.io.DeploymentDescriptorFile | getConfigurationDDFile()
return new EjbRuntimeDDFile();
|
public com.sun.enterprise.deployment.Descriptor | getDefaultBundleDescriptor()
EjbBundleDescriptor ejbBundleDesc =
new EjbBundleDescriptor();
return ejbBundleDesc;
|
public com.sun.enterprise.deployment.Descriptor | getDescriptor()
return descriptor;
|
public javax.enterprise.deploy.shared.ModuleType | getModuleType()
return ModuleType.EJB;
|
public com.sun.enterprise.deployment.io.DeploymentDescriptorFile | getStandardDDFile()
return standardDD;
|
public java.lang.String | getWebServicesDeploymentDescriptorPath()
return DescriptorConstants.EJB_WEBSERVICES_JAR_ENTRY;
|
protected boolean | postHandles(com.sun.enterprise.deployment.deploy.shared.AbstractArchive abstractArchive)
EjbComponentAnnotationDetector detector =
new EjbComponentAnnotationDetector();
return detector.hasAnnotationInArchive(abstractArchive);
|
protected void | postOpen(com.sun.enterprise.deployment.RootDeploymentDescriptor descriptor, com.sun.enterprise.deployment.deploy.shared.AbstractArchive archive)perform any post deployment descriptor reading action
super.postOpen(descriptor, archive);
EjbBundleDescriptor ejbBundle = (EjbBundleDescriptor) descriptor;
ModuleContentValidator mdv = new ModuleContentValidator(archive);
ejbBundle.visit((EjbBundleVisitor)mdv);
|
protected void | prepareForInclusion(com.sun.enterprise.deployment.deploy.shared.AbstractArchive out)prepare an archivist for inclusion in a application archive.
// store the ejbJar by its hort filename
String ejbClientJarUri = descriptor.getEjbClientJarUri();
// If this ejb-jar has an ejb client jar, the ejb client jar URI
// is relative to the directory in which the ejb-jar lives.
if( !ejbClientJarUri.equals("") ) {
String ejbClientJarPath =
ejbClientJarUri.replace(FileUtil.JAR_SEPARATOR_CHAR, File.separatorChar);
File ejbJarFile = new File(path);
File ejbClientJar = new File(ejbJarFile.getParentFile(), ejbClientJarPath);
if( ejbClientJar.exists() ) {
// Pull the ejb-client-jar into the .ear and set the
// ejb-jar manifest classpath to point to it(relative
// to the base of the .ear)
addFileToArchive(out, ejbClientJar.getAbsolutePath(), ejbClientJarUri);
String classPath = getClassPath();
if (classPath==null) {
classPath=ejbClientJarUri;
} else {
classPath+=" " + ejbClientJarUri;
}
setClassPath(classPath);
} else {
throw new FileNotFoundException(localStrings.getLocalString("enterprise.deployment.noclientjarentry", "Warning: {0} not found as a client jar entry.", new Object[] {ejbClientJar.toString()}));
}
}
|
public void | readPersistenceDeploymentDescriptors(com.sun.enterprise.deployment.deploy.shared.AbstractArchive archive, com.sun.enterprise.deployment.Descriptor descriptor)
if(logger.isLoggable(Level.FINE)) {
logger.logp(Level.FINE, "EjbArchivist",
"readPersistenceDeploymentDescriptors", "archive = {0}",
archive.getURI());
}
// note we pass "" as the PURootPath because META-INF/persistence.xml
// can only be present on the top level in an ejb-jar, so the root of
// persistence unit is always same as the root of an ejb-jar file.
// hence relative distance between them is empty.
readPersistenceDeploymentDescriptor(archive, "", descriptor);
|
public void | setDescriptor(com.sun.enterprise.deployment.Descriptor descriptor)Set the DOL descriptor for this Archivist, used by super classes
if (descriptor instanceof EjbBundleDescriptor) {
this.descriptor = (EjbBundleDescriptor) descriptor;
} else {
if (descriptor instanceof Application) {
// this is acceptable if the application actually represents
// a standalone module
Set ejbBundles = ((Application) descriptor).getEjbBundleDescriptors();
if (ejbBundles.size()>0) {
this.descriptor = (EjbBundleDescriptor) ejbBundles.iterator().next();
if (this.descriptor.getModuleDescriptor().isStandalone())
return;
else
this.descriptor=null;
}
}
DOLUtils.getDefaultLogger().log(Level.SEVERE, "enterprise.deployment.backend.descriptorFailure", new Object[] {this});
throw new RuntimeException("Error setting descriptor " + descriptor + " in " + this);
}
|
public void | validate(java.lang.ClassLoader aClassLoader)validates the DOL Objects associated with this archivist, usually
it requires that a class loader being set on this archivist or passed
as a parameter
ClassLoader cl = aClassLoader;
if (cl==null) {
cl = classLoader;
}
if (cl==null) {
return;
}
descriptor.setClassLoader(cl);
descriptor.visit((EjbBundleVisitor) new EjbBundleValidator());
|