java - Annotate StatelessBean with @Depends to HornetQ-JMS Queue -


i have simple definition of jms-queue in file my-hornetq-jms.xml:

<configuration xmlns="urn:hornetq"   xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"   xsi:schemalocation="urn:hornetq /schema/hornetq-jms.xsd">       <queue name="my.test.queue">           <entry name="/queue/mytest"/>         </queue>   </configuration> 

the queue activated correctly , want add dependency in @stateless bean. question similar how can ensure hornet queues there when webapp starts in jboss 6.0?, want define dependency annotation. tried (in several permutations), didn't find right way:

@depends(value="org.hornetq:module=jms,type=queue,name=my.test.queue") 

i errors this:

dependency "<unknown jboss.j2ee:jar=my.war,name=mybean,service=ejb3>" (should in state "installed", in state "** unresolved demands 'org.hornetq:module=jms,name=my.test.queue,type=queue' **") 

btw: in jboss-5 have defined this: @depends(value = "jboss.messaging.destination:service=queue,name=my.test.queue")

you should able define dependency using bean name:

org.hornetq:module=jms,type=topic,name="your-topic-name"

or

org.hornetq:module=jms,type=queue,name="your-topic-name"

for more information, @ implementation of org.hornetq.api.core.management.objectnamebuilder, since deployers using methods here define names.

also: dependency between mbeans work on as6 or eap 5.1.1+. won't work as5 or other manual installation since deployers not installed on manual installation.

also: as7 has different injection dependency. won't work on as7 either. (i believe it's not needed, since can inject jndi name directly. i.e. it's done in better way @ as7)


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -