-
1. Re: Dependencies on Queues from other components
clebert.suconic Sep 9, 2009 3:29 PM (in response to rnicholson10)Why you don't add your dependency to the HornetQServer?
The queues will be certainly loaded/created after the service is started. (loaded by either the bindings journal or the JMS queue XML file). -
2. Re: Dependencies on Queues from other components
rnicholson10 Sep 9, 2009 4:02 PM (in response to rnicholson10)I'm afraid I don't follow you.
I have an ServiceBean that requires the Queues be up and running before it starts itself. How will adding a depenency to the HornetQServer help me here?
I simply wish to know how to specify a queue from HornetQ correctly in a @Depends annotation. -
3. Re: Dependencies on Queues from other components
clebert.suconic Sep 9, 2009 4:54 PM (in response to rnicholson10)Queue Loading is part of the Server's startup.
On JBM 1.4 and JBossMQ, destinations used to be deployed as MBeans.
on HornetQ they are loaded during the startup of the server.
Management will expose Queues as MBeans, but I' m not sure if that would work on the depends.
I was just suggesting you to depend on the Server itself since the loading process is different on HornetQ. -
4. Re: Dependencies on Queues from other components
rnicholson10 Sep 10, 2009 5:19 AM (in response to rnicholson10)Ok,
So what would the Depends clause be for the HornetQ server?
I can't find it in the JMX console so I don't know how to refer to it in the depends clause.
R. -
5. Re: Dependencies on Queues from other components
rnicholson10 Sep 10, 2009 6:23 AM (in response to rnicholson10)I have tried the following but neither seem to work:
@Depends(value={"jboss.deployment:id=HornetQServer,type=Component"}) @Depends(value={"address=jms.queue.phaseQueueToEngine,module=Core,name=jms.queue.phaseQueueToEngine,type=Queue"})
Any ideas? -
6. Re: Dependencies on Queues from other components
timfox Sep 10, 2009 6:28 AM (in response to rnicholson10)You should be able to find the correct object names by looking in the jmx-console
-
7. Re: Dependencies on Queues from other components
rnicholson10 Sep 10, 2009 6:30 AM (in response to rnicholson10)They are the name I found in the JMX console!
-
8. Re: Dependencies on Queues from other components
timfox Sep 10, 2009 6:35 AM (in response to rnicholson10)If you're sure you have the correct object names, then perhaps this is a bug in JBoss AS / JBoss Microcontainer.
All the @depends stuff is not part of HornetQ it's part of JBoss Microcontainer. Your best bet is to post on the JBoss MC forum and ask why it is not working. -
9. Re: Dependencies on Queues from other components
timfox Sep 10, 2009 6:39 AM (in response to rnicholson10)Hmm, actually I think I can see what is happening.
@Depends only works with Microcontainer beans (it's MC functionality), and our queues are not MC beans - MC knows nothing about them.
However the hornetq server is an MC bean, therefore you should be able to declare a dependency on that, like Clebert said.
Consult the JBoss MC documentation (or drop a mail on their forum) to find out how to declare a dependency on an MC bean.
Once you've done that we can write a wiki page on this. -
10. Re: Dependencies on Queues from other components
ataylor Sep 10, 2009 7:05 AM (in response to rnicholson10)this faq may help http://www.jboss.org/community/wiki/JBossMicrocontainerFAQ.pdf
-
11. Re: Dependencies on Queues from other components
rnicholson10 Sep 10, 2009 11:00 AM (in response to rnicholson10)The solution was to write the depends clause like this:
@Depends(value={"HornetQServer"}) //Ensures all queues are up and running before the service bean starts
Although I can't seem to get any info on how I find out the name of the MC Bean in the first place.
You can follow the topic here:
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4254467#4254467 -
12. Re: Dependencies on Queues from other components
rnicholson10 Sep 10, 2009 11:08 AM (in response to rnicholson10)You should probably add this to your documentation/WIKI.
The MicroContainer guys say to ask the HornetQ guys for the name of the MC Bean they use! Turns out there's no easy way at the moment to get the MC Bean name from JBoss. -
13. Re: Dependencies on Queues from other components
timfox Sep 10, 2009 5:44 PM (in response to rnicholson10)You can get the bean name by looking in the hornetq-beans.xml file.
But, you're right, we should add a wiki page on this. Do you want to volunteer? ;)