This content has been marked as final.
Show 6 replies
-
1. Re: JBoss Deployment order within ear
anguyen Apr 6, 2005 4:42 PM (in response to mentiro)Have you tried adding a depends element to your SAR's jboss-service.xml? Something like:
<mbean code="my.MBean" name="..."> <depends>jboss.management.local:J2EEApplication=null,J2EEServer=Local,j2eeType=WebModule,name=my.war</depends> ... </mbean>
I'm not sure what the JMX name should be for a deployed WAR, but looking through the JMX console, the above example would be my guess. -
2. Re: JBoss Deployment order within ear
anguyen Apr 6, 2005 4:45 PM (in response to mentiro)Just noticed that you're within in EAR file, so perhaps try setting J2EEApplication=... to the name of your ear.
-
3. Re: JBoss Deployment order within ear
mentiro Apr 7, 2005 10:13 AM (in response to mentiro)Yeah - I tried adding a element to the SAR to make my MBean start after the WAR. I tried adding depends tags like the following:
<depends>jboss.management.local:J2EEApplication=tdi.ear,J2EEServer=Local,j2eeType=WebModule,name=tdi.war</depends>
<depends>jboss.web:J2EEApplication=none,J2EEServer=none,j2eeType=WebModule,name=//localhost/tdi</depends>
When I added any depends tag, the Mbean would simply not deploy and say that the above MBeans were NOTYETINSTALLED. However, if I went to the jmx-console, they appeared exactly the same.
One problem is that MainDeployer does not allow you to override its URLComparator. It declares the URLComparator as "private final". To workaround this problem and the fact that the depends tag did not work, I split my war out of my ear and used the Prefix Deployment Scanner sorter.
This did deploy the war before the ear (in other words, the war before the MBean) but the war resources were still not available until after JBoss had fully started. To test if this was really the case I added a Thread.sleep() call to one of my MBeans and made it wait for a few minutes. At this point the war had already deployed, but the war resources could not be accessed from a web browser.
So, I have two problems:- I can't get the war to deploy before my MBean if they are in the same EAR. I have tried several depends elements to no avail.
- Even when I do get the war to deploy before the MBean by separating it from my ear, the war resources are not available to the MBean and do not seem to be available until after JBoss completely starts up.
Any help would be greatly appreciated.
-
4. Re: JBoss Deployment order within ear
mentiro Apr 18, 2005 2:57 PM (in response to mentiro)Any JBoss developers have any idea about this?
-
5. Re: JBoss Deployment order within ear
mentiro Oct 3, 2005 9:56 AM (in response to mentiro)Any update on this issue? Does JBoss allow you to control deployment order within an EAR yet?
-
6. Re: JBoss Deployment order within ear
vasily.ivanov Oct 4, 2005 12:30 AM (in response to mentiro)I have the same problem at the moment and I think this can help us: http://wiki.jboss.org/wiki/Wiki.jsp?page=BarrierController