-
1. Re: Nested EAR: *.sar wrongly deploys after *.jar
rhodan76 Mar 16, 2009 5:57 AM (in response to rhodan76)my.ear -test.sar -test2.sar -ejb.jar
-
2. Re: Nested EAR: *.sar wrongly deploys after *.jar
alesj Mar 16, 2009 5:58 AM (in response to rhodan76)See LegacyDeploymentContextComparator in deployers.xml.
-
3. Re: Nested EAR: *.sar wrongly deploys after *.jar
alesj Mar 16, 2009 6:07 AM (in response to rhodan76)Hmmm, they should be ordered as you wrote.
You mean the mbeans are started last?
There might be some dependency that holds them to start up before. -
4. Re: Nested EAR: *.sar wrongly deploys after *.jar
rhodan76 Mar 16, 2009 6:08 AM (in response to rhodan76)I alreadey added following to deployers.xml:
<property name="suffixOrder" class="java.util.Map"> <map keyClass="java.lang.String" valueClass="java.lang.Integer"> <entry> <key>.sar</key> <value>150</value> </entry> <entry> <key>.jar</key> <value>700</value> </entry> </map> </property>
But sar is furthermore deployed after jar.
Have i first to enable the use of this legacy ordering anywhere? -
5. Re: Nested EAR: *.sar wrongly deploys after *.jar
jaikiran Mar 16, 2009 6:11 AM (in response to rhodan76)Please post the console logs.
-
6. Re: Nested EAR: *.sar wrongly deploys after *.jar
alesj Mar 16, 2009 6:20 AM (in response to rhodan76)"Rhodan76" wrote:
I alreadey added following to deployers.xml:
This is already the default.
(although it's wrong, since .jar should actually have the value of 400 - just fixed it)"Rhodan76" wrote:
But sar is furthermore deployed after jar.
Have i first to enable the use of this legacy ordering anywhere?
Like I said, this doesn't mean .sar is deployed after .jar.
The way how we deploy changed in 5.x, as it's not one-deployer-doing-it-all anymore.
More importantly is why do you care about the order?
True order can only be determined via exact dependencies.
So, if something is broken, perhaps all you need is some explicit dependency. -
7. Re: Nested EAR: *.sar wrongly deploys after *.jar
rhodan76 Mar 16, 2009 6:27 AM (in response to rhodan76)More importantly is why do you care about the order?
We have an update.sar, which checks on application start for database version and updates the database structure if needed. Clearly this updater must start before deploying the application (=ejb.jar).True order can only be determined via exact dependencies.
Always a good question - how to add these dependencies ? Mostly by defining some <depends.....xyz> statement > in the the ejb.jar's xml ? -
8. Re: Nested EAR: *.sar wrongly deploys after *.jar
alesj Mar 16, 2009 6:35 AM (in response to rhodan76)Check this: https://www.jboss.org/community/docs/DOC-13178
You'll probably need something like this (jboss-dependency.xml)<dependency xmlns="urn:jboss:dependency:1.0"> <item whenRequired="Real">MyDBCheckerMBean</item> </dependency>
in your ejb.jar/META-INF.
Where "MyDBCheckerMBean" is the name of your
mbean that checks DB for the version. ;-) -
9. Re: Nested EAR: *.sar wrongly deploys after *.jar
rhodan76 Mar 16, 2009 6:36 AM (in response to rhodan76)Ok, thank you ! I will check this :-)
-
10. Re: Nested EAR: *.sar wrongly deploys after *.jar
rhodan76 Mar 16, 2009 8:08 AM (in response to rhodan76)Ok, tried this. but got this deployment exception:
12:57:10,356 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS): DEPLOYMENTS MISSING DEPENDENCIES: Deployment "vfszip:/C:/Programme/jboss-5/server/default/deploy/lims-core.ear/" is missing the following dependencies: Dependency "mine:service=LimsUpdateService" (should be in state "Real", but is actually in state "** NOT FOUND Depends on 'mine:service=LimsUpdateService' **") DEPLOYMENTS IN ERROR: Deployment "mine:service=LimsUpdateService" is in error due to the following reason(s): ** NOT FOUND Depends on 'mine:service=LimsUpdateService' **
I defined the core-ejb.jar/META-INF/jboss-dependency.xml like this:<dependency xmlns="urn:jboss:dependency:1.0"> <item whenRequired="Real" dependentState="Create">mine:service=LimsUpdateService</item> </dependency>
and the MBean lims-update-service.sar is defined the following way - lims-udpate-service.sar/META-INF/jboss-service.xml:<?xml version="1.0" encoding="UTF-8"?> <server> <mbean code="com.qualitype.lims.server.update.mbean.LimsUpdateService" name="mine:service=LimsUpdateService" /> </server>
-
11. Re: Nested EAR: *.sar wrongly deploys after *.jar
alesj Mar 16, 2009 8:17 AM (in response to rhodan76)Ah, yes. Silly me. :-)
This is due to declaring dependency in sub-deployment,
where this can only be applied to top.
This is what happens, your .ear depends on one of its mbeans.
Which is clearly not resolveable. :-)
If you split the ear this will work.
But I'll think of some better solution that will allow you to keep .ear in one piece. -
12. Re: Nested EAR: *.sar wrongly deploys after *.jar
jaikiran Mar 16, 2009 8:22 AM (in response to rhodan76)I remember, Ales had once mentioned the deployment ordering follows this:
In this order:
- suffix number
- context info order
- alphabetically
So maybe Rhodan76 could try (as a workaround) renaming the sar/jar files to see if the ejb jar can then be picked up first based on the alphabetical ordering of the filenames? -
13. Re: Nested EAR: *.sar wrongly deploys after *.jar
alesj Mar 16, 2009 8:28 AM (in response to rhodan76)"jaikiran" wrote:
So maybe Rhodan76 could try (as a workaround) renaming the sar/jar files to see if the ejb jar can then be picked up first based on the alphabetical ordering of the filenames?
I doubt this is the case here.
My guess would be that EJBs are MC pojo driven,
which kick-in before MBeans.
Hence his EJBs are installed before .sar's mbeans. -
14. Re: Nested EAR: *.sar wrongly deploys after *.jar
jaikiran Mar 16, 2009 8:35 AM (in response to rhodan76)Hmm, if that's the case then Rhodan76 can use the jboss.xml to add this dependency. Maybe these will help:
http://www.jboss.org/file-access/default/members/jbossejb3/freezone/docs/tutorial/1.0.3/html/Dependencies_in_EJB3.html
http://anonsvn.jboss.org/repos/jbossas/projects/ejb3/trunk/docs/tutorial/dependency/META-INF/jboss.xml