Resolution: Won't Do
Here's my use case: I've an application ear which contains an ejb module and a war module.
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:
Both files are identical except ear/myapp-ejb.jar/META-INF/ejb.xml in which I've different <timer> configurations.
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.
The problem is the line
<module name="deployment.myapp.ear.myapp-ejb.jar" />
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
<module name="deployment.self-ear.myapp-ejb.jar" />
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