-
1. Re: .ear priority deployment
vberetti Aug 4, 2008 5:01 AM (in response to fury88)Hi,
I have 2 solutions for you :
- you can easily extend the JBoss DeploymentSorter. Then declare the new class in jboss-service.xml in URLComparator.
- you can define dependencies between jmx names. You can say for example that the war needs an ejb or an ear or a sar. There is only one limitation : you can't define a dependency deployement for an ear. But you can set a jmx-name so that others can depends on this ear.
Example : in you war's jboss-web.xml, you can set
<jboss-web>
myservice:service=OwnService
</jboss-web>
In this case, you war won't deploy until OwnService is deployed.
Vincent -
2. Re: .ear priority deployment
zhengxi Aug 6, 2008 5:39 AM (in response to fury88)hi vberetti
I need to solve this problem also.
and i want to use your second solutions.
I add this to jboss-web.xml, but it doesn't work. could you please describe it in details. thanks a lot.
<jboss-web>
myservice:service=OwnService
</jboss-web> -
3. Re: .ear priority deployment
vberetti Aug 7, 2008 4:03 AM (in response to fury88)Hi,
In your ear, in META_INF/jboss-app.xml :<jboss-app> <jmx-name>myservice:service=OwnService</jmx-name> </jboss-app>
In your war, in META-INF/jboss-web.xml:<jboss-web> <depends>myservice:service=OwnService</depends> </jboss-web>
this way, your war will deploy after your ear is deployed. But keep in mind that the ear depends on the war is not possible. The deployment of the ear can not depend on other services (but services in the ear can).
Hope it will help you.
Vincent -
4. Re: .ear priority deployment
zhengxi Aug 7, 2008 4:17 AM (in response to fury88)thank you very very much:)
it works fine.
could i get your IM account or email?
my email: quzgxi@gmail.com
if you don't like that, just skip my request :)
thanks again. -
5. Re: .ear priority deployment
benoitx Nov 26, 2008 4:19 PM (in response to fury88)Hi All,
I have a similar problem, I'm trying to get a Quartz MBean setup and get it to deploy AFTER my ear application (the Jobs classes are included in my ear file).
How could I do this?
Using this dependency does not work<depends>jboss.j2ee:service=EARDeployer</depends>
As it seems to be completed before the app is actually deployed.
I even tried 3 dependencies:<depends>jboss.ejb:service=EJBDeployer</depends> <depends>jboss.jca:service=DataSourceBinding,name=QuartzDS</depends> <depends>jboss.j2ee:service=EARDeployer</depends>
But same problem, it looks like Quartz is launched before the ear is fully deployed...
Any pointer/solution would be greatly appreciated.
Thanks
Benoit