[jboss-jira] [JBoss JIRA] (AS7-5968) jboss-deployment-structure.xml depend on ear name

Stuart Douglas (JIRA) jira-events at lists.jboss.org
Sun Nov 18 17:14:21 EST 2012


     [ https://issues.jboss.org/browse/AS7-5968?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stuart Douglas resolved AS7-5968.
---------------------------------

    Resolution: Won't Fix


You should be using the Java standard Class-Path manifest entries for this use case. 

If you are using sub-deployments-isolated you you can simply add 

Class-Path: myapp-ejb.jar 

to your MANIFEST.MF in your war, rather than using jboss-deployment-structure.xml to achieve the same effect. 

As this seems like a bit of an edge case, and is already covered by the standard Class-Path mechanism, I don't think it is worth trying to make this work in jboss-deployment-structure.xml.   


                
> 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.xsd" 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


More information about the jboss-jira mailing list