System Variable replacement in ejb-jar.xml for JBoss EAP 6.3
sonyjop Jan 7, 2016 8:00 AMAll,
I use JBoss EAP 6.3 and I am looking to have the MDB's activation configuration to be configurable without changing my source every time.
I thought of doing like to add a ejb-jar.xml with system property mentioned and it will be replaced appropriately.
my ejb-jar.xml goes like;
...........
.................
<activation-config-property>
<activation-config-property-name>maxSessions</activation-config-property-name>
<activation-config-property-value>${mylistener.maxsessions}</activation-config-property-value>
</activation-config-property>
............
.....
But when I try to deploy my application, it says,
[...14:02:51,883 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 101) MSC000001: Failed to start service jboss.deployment.unit."myfirstmdb.jar".component.MyListenerBean.START: org.jboss.msc.service.StartException in service jboss.deployment.unit."myfirstmdb.jar".component.MyListenerBean.START: java.lang.RuntimeException: javax.resource.spi.InvalidPropertyException: Invalid settings: maxSessions must be set to number > 0
at org.jboss.as.ee.component.ComponentStartService$1.run(ComponentStartService.java:57) [jboss-as-ee-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_75]
at java.util.concurrent.FutureTask.run(FutureTask.java:262) [rt.jar:1.7.0_75]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_75]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_75]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_75]
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
Caused by: java.lang.RuntimeException: javax.resource.spi.InvalidPropertyException: Invalid settings: maxSessions must be set to number > 0
at org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponent.activate(MessageDrivenComponent.java:206)
at org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponent.start(MessageDrivenComponent.java:178)
at org.jboss.as.ee.component.ComponentStartService$1.run(ComponentStartService.java:54) [jboss-as-ee-7.4.0.Final-redhat-19.jar:7.4.0.Final-redhat-19]
... 6 more ...]
Can anybody suggest whether this future is supported in EAP 6.3. if so is there any specific enabling that has to be done?