[jboss-cvs] JBossAS SVN: r59781 - in trunk: server/src/main/org/jboss/deployment and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Jan 18 09:49:55 EST 2007
Author: alex.loubyansky at jboss.com
Date: 2007-01-18 09:49:55 -0500 (Thu, 18 Jan 2007)
New Revision: 59781
Modified:
trunk/ejb3/src/main/org/jboss/ejb3/deployers/AppClientParsingDeployer.java
trunk/server/src/main/org/jboss/deployment/ClientDeployer.java
Log:
JBCTS-503 a module with application-client.xml version 5 with jboss-client.xml verion 1.4 should be processed by the ejb2 deployer
Modified: trunk/ejb3/src/main/org/jboss/ejb3/deployers/AppClientParsingDeployer.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/deployers/AppClientParsingDeployer.java 2007-01-18 14:48:45 UTC (rev 59780)
+++ trunk/ejb3/src/main/org/jboss/ejb3/deployers/AppClientParsingDeployer.java 2007-01-18 14:49:55 UTC (rev 59781)
@@ -32,6 +32,7 @@
import org.jboss.virtual.VirtualFile;
import org.jboss.xb.binding.ObjectModelFactory;
import org.w3c.dom.Element;
+import org.w3c.dom.DocumentType;
/**
* Comment
@@ -89,6 +90,29 @@
}
}
+ if(accepts)
+ {
+ // in the cts there are apps with application-client with version 5
+ // and jboss-client with version 4
+ dd = unit.getMetaDataFile("jboss-client.xml");
+ if (dd != null)
+ {
+ log.debug("Found jboss-client.xml file: " + unit.getName());
+ try
+ {
+ Element root = DOMUtils.parse(dd.openStream());
+ DocumentType doctype = root.getOwnerDocument().getDoctype();
+ String publicId = (doctype != null ? doctype.getPublicId() : null);
+
+ accepts = !"-//JBoss//DTD Application Client 4.0//EN".equals(publicId);
+ }
+ catch (IOException ex)
+ {
+ DeploymentException.rethrowAsDeploymentException("Cannot parse " + appClientXmlPath, ex);
+ }
+ }
+ }
+
return accepts;
}
}
Modified: trunk/server/src/main/org/jboss/deployment/ClientDeployer.java
===================================================================
--- trunk/server/src/main/org/jboss/deployment/ClientDeployer.java 2007-01-18 14:48:45 UTC (rev 59780)
+++ trunk/server/src/main/org/jboss/deployment/ClientDeployer.java 2007-01-18 14:49:55 UTC (rev 59781)
@@ -54,6 +54,7 @@
import org.jboss.webservice.ServiceRefHandler;
import org.jboss.webservice.ServiceRefHandlerFactory;
import org.w3c.dom.Element;
+import org.w3c.dom.DocumentType;
/**
* A deployer for j2ee application client jars
@@ -97,7 +98,7 @@
Element root = DOMUtils.parse(dd.openStream());
// If this is javaee, it should be processed by another deployer
String namespaceURI = root.getNamespaceURI();
- accepts = "http://java.sun.com/xml/ns/javaee".equals(namespaceURI) == false;
+ accepts = !"http://java.sun.com/xml/ns/javaee".equals(namespaceURI);
if (accepts == false)
log.debug("Ignore application-client.xml with namespace: " + namespaceURI);
}
@@ -107,6 +108,28 @@
}
}
+ if(!accepts)
+ {
+ dd = unit.getMetaDataFile(JBOSS_CLIENT_XML);
+ if (dd != null)
+ {
+ log.debug("Found jboss-client.xml file: " + unit.getName());
+ try
+ {
+ Element root = DOMUtils.parse(dd.openStream());
+ DocumentType doctype = root.getOwnerDocument().getDoctype();
+ String publicId = (doctype != null ? doctype.getPublicId() : null);
+ accepts = "-//JBoss//DTD Application Client 4.0//EN".equals(publicId);
+ if (accepts == false)
+ log.debug("Ignore jboss-client.xml with publicId: " + publicId);
+ }
+ catch (IOException ex)
+ {
+ DeploymentException.rethrowAsDeploymentException("Cannot parse " + JBOSS_CLIENT_XML, ex);
+ }
+ }
+ }
+
return accepts;
}
More information about the jboss-cvs-commits
mailing list