-
1. Re: Deployment ordering on HornetQ destinations and MDBs
alesj May 19, 2010 5:25 PM (in response to clebert.suconic)How's this handled in AS6?
e.g. forcing MDBs to wait on your queues
What about if you simply move HornetQJMSRealDeployer to PRE_REAL?
-
2. Re: Deployment ordering on HornetQ destinations and MDBs
clebert.suconic May 19, 2010 6:03 PM (in response to alesj)On 6, As far as I know the POJOs will be flushed as soon as I create them on the RealDeployer. We can double check this.
>> What about if you simply move HornetQJMSRealDeployer to PRE_REAL? <<
What that means?
-
3. Re: Deployment ordering on HornetQ destinations and MDBs
alesj May 20, 2010 3:13 AM (in response to clebert.suconic)On 6, As far as I know the POJOs will be flushed as soon as I create them on the RealDeployer. We can double check this.
Flushed?
You mean installed all the way?
What's stopping them now?
>> What about if you simply move HornetQJMSRealDeployer to PRE_REAL? <<
What that means?
Change its DeploymentStage from REAL to PRE_REAL.
-
4. Re: Deployment ordering on HornetQ destinations and MDBs
jmesnil May 20, 2010 9:03 AM (in response to alesj)Changing HornetQJMSRealDeployer to PRE_REAL does not fix the issue: the POJO are sill deployed too "late" (after the MDB is activated).
We need to find a way to deploy the POJO from HornetQJMSRealDeployer after the HornetQ server is started and before the MDBs are activated
-
5. Re: Deployment ordering on HornetQ destinations and MDBs
jmesnil May 20, 2010 10:26 AM (in response to jmesnil)by the way, I tried to load our mdb-bmt example in AS 6 M3 and I have the same issue:
16:05:46,061 ERROR [HornetQActivation] Unable to start activation : HornetQException[errorCode=100 message=Queue jms.queue.testQueue does not exist] at org.hornetq.core.protocol.core.impl.ChannelImpl.sendBlocking(ChannelImpl.java:287) [:6.0.0.20100429-M3] at org.hornetq.core.client.impl.ClientSessionImpl.internalCreateConsumer(ClientSessionImpl.java:1556) [:6.0.0.20100429-M3] at org.hornetq.core.client.impl.ClientSessionImpl.createConsumer(ClientSessionImpl.java:447) [:6.0.0.20100429-M3] at org.hornetq.core.client.impl.ClientSessionImpl.createConsumer(ClientSessionImpl.java:392) [:6.0.0.20100429-M3] at org.hornetq.core.client.impl.DelegatingSession.createConsumer(DelegatingSession.java:201) [:6.0.0.20100429-M3] at org.hornetq.ra.inflow.HornetQMessageHandler.setup(HornetQMessageHandler.java:168) [:6.0.0.20100429-M3] at org.hornetq.ra.inflow.HornetQActivation.setup(HornetQActivation.java:287) [:6.0.0.20100429-M3] at org.hornetq.ra.inflow.HornetQActivation$SetupActivation.run(HornetQActivation.java:502) [:6.0.0.20100429-M3] at org.jboss.resource.work.WorkWrapper.run(WorkWrapper.java:172) [:6.0.0.20100429-M3] at org.jboss.threads.SimpleDirectExecutor.execute(SimpleDirectExecutor.java:33) [:6.0.0.20100429-M3] at org.jboss.threads.QueueExecutor.runTask(QueueExecutor.java:780) [:6.0.0.20100429-M3] at org.jboss.threads.QueueExecutor.access$100(QueueExecutor.java:45) [:6.0.0.20100429-M3] at org.jboss.threads.QueueExecutor$Worker.run(QueueExecutor.java:800) [:6.0.0.20100429-M3] at java.lang.Thread.run(Thread.java:637) [:1.6.0_17] at org.jboss.threads.JBossThread.run(JBossThread.java:122) [:6.0.0.20100429-M3
-
6. Re: Deployment ordering on HornetQ destinations and MDBs
alesj May 21, 2010 6:37 AM (in response to jmesnil)We need to find a way to deploy the POJO from HornetQJMSRealDeployer after the HornetQ server is started and before the MDBs are activated
POJO X then needs an explicit dependency on the HornetQ server.
At the same time you then need to add a dependency on X to MDB's dependencies.
-
7. Re: Deployment ordering on HornetQ destinations and MDBs
jmesnil May 21, 2010 9:18 AM (in response to clebert.suconic)After talking to carlo this morning, I have updated HornetQ RA activation code so that it attempts multiple time to setup if there is an issue (connection failure, destination not bound, etc.)
This means that eventually the MDB will be properly activated once HornetQ AS deployers will have deployed their resources.
However this is suboptimal: on server start, we have a WARNING and a reconnection attempt because the MDB is activated before HornetQ resources are deployed.
AIUI, this brings HornetQ RA code on par with AS generic RA.
It seems the same deployment ordering issue is also present when using AS generic RA and JBoss Messaging: http://wwwapps.rdu.redhat.com/w3xpastebin/pastebin.php?show=19069
How can we solve this so that everything is deployed in the correct order, whether it is HornetQ or JBoss Messaging?
From the different conversations I had, I understood that it is not possible to have ordering between deployment units. What can we do to ensure the messaging server resources are effectively created before MDBs are activated?
-
8. Re: Deployment ordering on HornetQ destinations and MDBs
alesj May 21, 2010 9:52 AM (in response to jmesnil)How can we solve this so that everything is deployed in the correct order, whether it is HornetQ or JBoss Messaging?
Proper explicit dependencies.
From the different conversations I had, I understood that it is not possible to have ordering between deployment units. What can we do to ensure the messaging server resources are effectively created before MDBs are activated?
Different top level deployment units or sub-deployment units?
Both is possible.
* top level deployment units are components inside MC, hence can easily be controlled wrt dependencies
* sub-deployment units can be dynamically re-ordered: JBDEPLOY-243