What is the reason for wanting to deploy the EJBs in a set order? on deployment none of the code will be executed anyway.
Maybe not executed, but deployment does involve some checking and class-loading no? If one EJB extends a class that is contained in another EJB jar, then you have a problem when they're not loaded in the right order. Maybe farfetched, but I feel this is what he meant.
There isn't enough information to make that assumption, in other posts Ranjith has been talking about JBoss not instantiating the component and calling ejbCreate on deployment.
Class loading cannot be the issue because all jars in the deployment are added to the classpath of the deployment before any component is started. Users can have dependencies between components that can require a specific startup ordering. We have not in the past used the application.xml declaration order as any indication of the startup order. You would have had to of used jmx level dependencies. As of 4.0.0RC2 and 3.2.6RC2 the we maintain the application module order as that the order declared in application.xml so that the start order of EAR components is deterministic and equal to that of the declaration order.
I have an application and I am porting this application.ear from Weblogic Application server to JBoss-3.2.3. This application.ear contain 5 beans. These beans are given in a specific order in application.xml. The intention is - the first bean act as a startup for the application, the initialization as well as invoking the startup service of the application is given in ejbCreate() of the first bean - things are fine when deploying in weblogic.
I am porting the same application.ear to jboss-3.2.3. What I noticed is during JBoss startup 1) the beans are deployed but not in the order given in application.xml. 2) ejbContainer didn't invoke ejbCreate method of the StartupBean (Stateless session bean)- so the application didn't start.
Note: From the last message I understand that versions before 3.2.6 does not use the order given in application.xml.
Could someone breif me about the jmx level dependencies mentioned in the last message.
JBoss will not call ejbCreate as part of your deployment, there is also no reuirement for it to do this either.
Have a look at 'http://www.jboss.org/wiki/Wiki.jsp?page=CreateAStartupClass'
If you deploy the MBean with your ear you would add a depends tag to day wait till the EJBs are deployed.
So if you have several jar files the order can not cause an
ERROR [EJBDeployer] Verfiy failed
I ask this since when jboss try to deploy say ddd.jar then it gives the above error and referes too
xxx/yyy/fff which is in another jar file which has not been deployed yet.
When searching for this error I found comments on how it it related too the classpath but I have checked this. Is there any other causes for this error or must it be the classpath?
is there any static initialization going on in those classes?
It sounds like you may actually have a real classpath problem - ie. they are not on your classpath.
Anyway, what version of JBoss are you using?
I use jboss 3.08. Anyway I gave up and tried too hot deploy the failing jar file. This bypassed the error seemingly and of course promptly gave me a new one. This error seems unrelated though. So this seems too point to that it was the ordering of the jar files deployment that actually caused the error. If my reasoning is wrong please correct me. Anyway thanks for your help!