-
1. Re: JBoss 5.1.0 Deployment Problem
tagnegilles Jan 19, 2010 4:46 PM (in response to jinpsu)Hi Justin,
if you have MessageDrivenBean in your myServer.jar you could do this.
For example your have this in your config-service.xml
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE server PUBLIC "-//JBoss//DTD MBean Service 5.0//EN" "http://www.jboss.org/j2ee/dtd/jboss-service_5_0.dtd" > <server> <mbean code="org.jboss.jms.server.destination.QueueService" name="org.jboss.jms:service=Queue,name=myQueue" xmbean-dd="xmdesc/Queue-xmbean.xml"> <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends> <depends>jboss.messaging:service=PostOffice</depends> </mbean> </server>
you have to put this annotations on your MDBean class @org.jboss.ejb3.annotation.Depends
@MessageDriven(...) @Depends({"org.jboss.jms:service=Queue,name=myQueue"}) public class MDBean implements MessageListener { }
the MDBean will be deploy after the queue/myQueue
-
2. Re: JBoss 5.1.0 Deployment Problem
jinpsu Jan 20, 2010 5:06 PM (in response to tagnegilles)Thanks for the reply! Does your solution imply that there is no way to force config-service.xml to be deployed first? Much of the code also depends on properties that don't get loaded until config-service.xml is deployed, so my preferred solution is to modify the deployment order.
Thanks.
justin.
EDIT: Worst case, I know I can just throw config-service.xml into the deploy directory, but I was hoping to deploy it in the ear.
ANOTHER EDIT: I ended up sprinkling @Depends annotations around for the queues and properties. Thanks again for the reply.
-
3. Re: JBoss 5.1.0 Deployment Problem
luv Jan 22, 2010 4:08 AM (in response to jinpsu)I guess you can set some order for the deployment using URL Comparator.
But pls check suitable name in your version.
Like in jboss4 its,
org.jboss.deployment.scanner.PrefixDeploymentSorter
in AS-5 its .
LegacyDeploymentContextComparator
may this could help you some way.