PersistenceDeploymentDescriptorFile.javaAPI DocGlassfish v2 API3984Fri May 04 22:31:38 BST


public class PersistenceDeploymentDescriptorFile extends DeploymentDescriptorFile

Fields Summary
Constructors Summary
Methods Summary
protected java.lang.StringgetDefaultSchemaSource()
The returned string is used to set up the schema location in SaxParser.

returns a string with format similar to what is used in schemaLocation attribute in XML docs. i.e. it returns a list of pairs, where each pair consists of a namespace and url pointing to the schema doc.

        // This method is overridden because the implementation in
        // super class is not correctly implemented. See bug#6340561
        PersistenceNode rootXMLNode =
        return rootXMLNode.getNameSpace() + " " + rootXMLNode.getSystemID();
public java.lang.StringgetDeploymentDescriptorPath()

        return DescriptorConstants.PERSISTENCE_DD_ENTRY;
public com.sun.enterprise.deployment.node.RootXMLNodegetRootXMLNode(Descriptor descriptor)

        // This method is called from SaxParserHandler.startElement() method
        // as well as DeploymentDescriptorFile.getDefaultSchemaSource().
        // When it is called from former method, descriptor is non-null,
        // but when it is called later method, descriptor is null.
        if(descriptor==null ||
                descriptor instanceof Application ||
                descriptor instanceof ApplicationClientDescriptor ||
                descriptor instanceof EjbBundleDescriptor ||
                descriptor instanceof WebBundleDescriptor) {
            return new PersistenceNode(new PersistenceUnitsDescriptor());
        } else {
            throw new IllegalArgumentException(descriptor.getClass().getName()+
                    "is not allowed to contain persistence.xml file");