use of com.sun.enterprise.deployment.Application in project Payara by payara.
the class ApplicationArchivist method copyInto.
/**
* Copy this archivist to a new abstract archive
*
* @param source
* the archive to copy from
* @param target
* the new archive to use to copy our contents into
*/
public void copyInto(ReadableArchive source, WritableArchive target) throws IOException {
try {
Application a = readStandardDeploymentDescriptor(source);
copyInto(a, source, target);
} catch (SAXParseException spe) {
DOLUtils.getDefaultLogger().log(SEVERE, "enterprise.deployment.backend.fileCopyFailure", spe);
}
}
use of com.sun.enterprise.deployment.Application in project Payara by payara.
the class ApplicationFactory method openArchive.
/**
* Open a jar file and return an application object for the modules contained
* in the archive/directory. If the archive/directory is a standalone module, this API will
* create an empty application and add the standalone module to it
*
* @param archivist to use to open the archive file
* @param jarFile the archive file
* @param handleRuntimeInfo set to true to read configuration deployment descriptors
* @return the application object
*/
public Application openArchive(Archivist archivist, URI jarFile, boolean handleRuntimeInfo) throws IOException, SAXParseException {
// never read the runtime deployment descriptor before the
// module type is found and the application object created
ReadableArchive archive = archiveFactory.openArchive(jarFile);
Application application = openArchive(archivist, archive, handleRuntimeInfo);
archive.close();
return application;
}
use of com.sun.enterprise.deployment.Application in project Payara by payara.
the class WLSApplicationRuntimeDDFile method getRootXMLNode.
/**
* @return a RootXMLNode responsible for handling the deployment
* descriptors associated with this J2EE module
*
* @param the descriptor for which we need the node
*/
public RootXMLNode getRootXMLNode(Descriptor descriptor) {
if (descriptor instanceof Application) {
Application application = (Application) descriptor;
RootXMLNode node = application.getRootNode(getDeploymentDescriptorPath());
if (node == null) {
node = new WeblogicApplicationNode(application);
application.addRootNode(getDeploymentDescriptorPath(), node);
}
return node;
}
return new WeblogicApplicationNode();
}
use of com.sun.enterprise.deployment.Application in project Payara by payara.
the class ApplicationParamNode method writeDescriptors.
/**
* write all occurrences of the descriptor corresponding to the current
* node from the parent descriptor to an JAXP DOM node and return it
*
* This API will be invoked by the parent node when the parent node
* writes out a mix of statically and dynamically registered sub nodes.
*
* This method should be overriden by the sub classes if it
* needs to be called by the parent node.
*
* @param parent node in the DOM tree
* @param nodeName the name of the node
* @param parentDesc parent descriptor of the descriptor to be written
* @return the JAXP DOM node
*/
@Override
public Node writeDescriptors(Node parent, String nodeName, Descriptor parentDesc) {
if (parentDesc instanceof Application) {
Application application = (Application) parentDesc;
// application-param*
Set<ApplicationParam> applicationParams = application.getApplicationParams();
for (ApplicationParam appParam : applicationParams) {
writeDescriptor(parent, nodeName, (EnvironmentProperty) appParam);
}
}
return parent;
}
use of com.sun.enterprise.deployment.Application in project Payara by payara.
the class ResourceValidator method getJavaGlobalJndiNamePrefix.
private String getJavaGlobalJndiNamePrefix(EjbDescriptor ejbDescriptor) {
String appName = null;
Application app = ejbDescriptor.getApplication();
if (!app.isVirtual()) {
appName = ejbDescriptor.getApplication().getAppName();
}
EjbBundleDescriptor ejbBundle = ejbDescriptor.getEjbBundleDescriptor();
String modName = ejbBundle.getModuleDescriptor().getModuleName();
String ejbName = ejbDescriptor.getName();
StringBuilder javaGlobalPrefix = new StringBuilder("java:global/");
if (appName != null) {
javaGlobalPrefix.append(appName);
javaGlobalPrefix.append("/");
}
javaGlobalPrefix.append(modName);
javaGlobalPrefix.append("/");
javaGlobalPrefix.append(ejbName);
return javaGlobalPrefix.toString();
}
Aggregations