Hi Geeks
On line 133 on the ApplicationMetaData.java is a compilation error:
Method getPublicId() not found in interface org.w3c.dom.DocumentType
Andy
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, June 23, 2001 5:46 PM
Subject: [JBoss-dev] CVS update: jboss/src/main/org/jboss/metadata
ApplicationMetaData.java
> User: dsundstrom
> Date: 01/06/23 17:46:34
>
> Modified: src/main/org/jboss/metadata ApplicationMetaData.java
> Log:
> Changed to detect the versrion of the ejb-jar dtd used in jar.
>
> Revision Changes Path
> 1.19 +28 -2
jboss/src/main/org/jboss/metadata/ApplicationMetaData.java
>
> Index: ApplicationMetaData.java
> ===================================================================
> RCS file:
/cvsroot/jboss/jboss/src/main/org/jboss/metadata/ApplicationMetaData.java,v
> retrieving revision 1.18
> retrieving revision 1.19
> diff -u -r1.18 -r1.19
> --- ApplicationMetaData.java 2001/06/22 03:56:27 1.18
> +++ ApplicationMetaData.java 2001/06/24 00:46:34 1.19
> @@ -14,6 +14,7 @@
> import java.util.Set;
> import java.util.HashSet;
>
> +import org.w3c.dom.DocumentType;
> import org.w3c.dom.Element;
> import org.w3c.dom.NodeList;
>
> @@ -27,15 +28,20 @@
> * @author <a href="mailto:[EMAIL PROTECTED]">Sebastien
Alborini</a>
> * @author <a href="mailto:[EMAIL PROTECTED]">Peter Antman</a>.
> * @author <a href="mailto:[EMAIL PROTECTED]">Scott
Stark</a>.
> - * @version $Revision: 1.18 $
> + * @version $Revision: 1.19 $
> */
> public class ApplicationMetaData extends MetaData
> {
> // Constants -----------------------------------------------------
> -
> + public static final int EJB_1x = 1;
> + public static final int EJB_2x = 2;
> +
> // Attributes ----------------------------------------------------
> private URL url;
>
> + // verion of the dtd used to create ejb-jar.xml
> + private int ejbVersion;
> +
> private ArrayList beans = new ArrayList();
> private ArrayList securityRoles = new ArrayList();
> private HashMap configurations = new HashMap();
> @@ -62,6 +68,14 @@
>
> public void setUrl(URL u) { url = u; }
>
> + public boolean isEJB1x() {
> + return ejbVersion == 1;
> + }
> +
> + public boolean isEJB2x() {
> + return ejbVersion == 2;
> + }
> +
> public Iterator getEnterpriseBeans() {
> return beans.iterator();
> }
> @@ -113,6 +127,18 @@
>
> public void importEjbJarXml (Element element) throws
DeploymentException {
>
> + // EJB version is determined by the doc type that
> + // was used to verify the ejb-jar.xml.
> + DocumentType docType = element.getOwnerDocument().getDoctype();
> + if(docType!=null && docType.getPublicId().startsWith(
> + "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans
2.0")) {
> + // 2.0 dtd
> + ejbVersion = 2;
> + } else {
> + // default is 1.x DTD
> + ejbVersion = 1;
> + }
> +
> // find the beans
> Element enterpriseBeans = getUniqueChild(element,
"enterprise-beans");
>
>
>
>
>
> _______________________________________________
> Jboss-development mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-development
>
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development