Are you looking out for something like "Deployment Overlay" Feature of WildFly ?
This feature allows you to 'overlayi content into an existing deployment, without physically modifying the contents of the deployment archive. Possible use cases include swapping out deployment descriptors, modifying static web resources to change the branding of an application, or even replacing jar libraries with different versions.
Juergen Weber wrote:
You can change application properties during deployment using JBoss property substition like
But this works only once, i.e. you cannot have in the same server an instance of an MDB with -Dmdb.queue=Q_A and another instance with -Dmdb.queue=Q_B
Geronimo and Weblogic solve this problem using deployment plans.
You deploy an mdb.jar together with an openejb-jar.xml that allows to override properties in JEE descriptors in repeating XML structures, so you can deploy the same ejb several times with different parameters.
As far as I know there is no such feature for Wildfly.
Yes there is such feature in WildFly, instead of using openejb-jar.xml you have jboss-ejb3.xml that pretty much allows you to do this.
Property substitution is also available for ejb-jar.xml and annotations you have in application, but that is not enabled by default.
See EE subsystem for enabling it
thanks, that is a cool feature, I didn't know. Unfortunately it only works with CLI not in the deploy directory.
I'd prefer being able to copy a plan into deploy like
<overlay="overlay/mdb-Q_A-ejb.jar.xml" target="META-INF/ejb-jar.xml" />
jboss-ejb3.xml has to be in the ejb.jar, hasn't it? So I can as well have several ejb.jars