[
https://issues.jboss.org/browse/AS7-5968?page=com.atlassian.jira.plugin.s...
]
Marco Benuzzi updated AS7-5968:
-------------------------------
Summary: jboss-deployment-structure.xml depend on ear name (was:
jboss-deployment-structure.xml depend on era name)
jboss-deployment-structure.xml depend on ear name
-------------------------------------------------
Key: AS7-5968
URL:
https://issues.jboss.org/browse/AS7-5968
Project: Application Server 7
Issue Type: Bug
Components: Server
Affects Versions: 7.1.1.Final
Reporter: Marco Benuzzi
Assignee: Jason Greene
Priority: Minor
Here's my use case: I've an application ear which contains an ejb module and a
war module.
* myapp.ear
** myapp-ejb.jar
** myapp-gwt.war
The application runs in a cluster of 2 nodes.
I've some scheduled EJBs and I need different schedules on the two cluster nodes, so
I package my application in two different ear files:
* myapp-node1.ear
* myapp-node1.ear
Both files are identical except ear/myapp-ejb.jar/META-INF/ejb.xml in which I've
different <timer> configurations.
ear/META-INF/application.xml is
{code:xml}
<?xml version="1.0" encoding="UTF-8"?>
<application
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:application="http://java.sun.com/xml/ns/javaee/application_5.x...
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/application_6.xsd" id="Application_ID"
version="6">
<application-name>myapp</application-name>
<display-name>My Application</display-name>
<module>
<ejb>myapp-ejb.jar</ejb>
</module>
<module>
<web>
<web-uri>myapp-gwt.war</web-uri>
<context-root>myapp</context-root>
</web>
</module>
</module>
</application>
{code}
Declaring <application> all my EJB have the same JNDI application name even if they
come from different ear files.
The problem is in the ear/META-INF/jboss-deployment-structure.xml
It is not possible to use subdeployments isolation because I must use the real ear name.
{code:xml}
<jboss-deployment-structure>
<ear-subdeployments-isolated>true</ear-subdeployments-isolated>
<deployment>
<dependencies>
<module name="org.apache.commons.lang" />
</dependencies>
</deployment>
<sub-deployment name="myapp-ejb.jar">
<dependencies>
<module name="org.apache.commons.lang" />
<module name="org.apache.commons.collections" />
<module name="org.apache.commons.configuration" />
<module name="org.apache.commons.codec" />
<module name="org.apache.httpcomponents" />
</dependencies>
</sub-deployment>
<sub-deployment name="myapp-gwt.war">
<dependencies>
<module name="deployment.myapp.ear.myapp-ejb.jar" />
</dependencies>
</sub-deployment>
</jboss-deployment-structure>
{code}
The problem is the line
{quote}
<module name="deployment.*myapp.ear*.myapp-ejb.jar" />
{quote}
beacuse it is mandatory to use the actual ear file name.
In this situation it will be usefull to have an "alias" to indicate the
containing ear, so the above line could be
{quote}
<module name="deployment.*self-ear*.myapp-ejb.jar" />
{quote}
The workaround for this issues are:
* use <ear-subdeployments-isolated>false</ear-subdeployments-isolated> and do
not declare any dependencies
* use different jboss-deployment-structure.xml files with real ear file names
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira