users@glassfish.java.net

Re: deployment order in glassfish

From: <glassfish_at_javadesktop.org>
Date: Sun, 21 Dec 2008 11:57:48 PST

The deployment order of various modules are not specified one way or another in JavaEE. GlassFish happens to always load rar before ejb jar, since usually ejb modules may depend on rar modules. The specific dependencies in your app is best managed by your app itself, either at business logic level or app configuration / deployment level.

Can you defer the ejb lookup? Sometimes the lookup just initializes a variable without actually invoking the bean. While doing lookup, can you repeat it at some interval and timeout, just waiting for the ejb module to be ready? Another option is to configure a jndi resource with the same jndi name as the target ejb (depending how you configure the ejb-ref or by global jndi name). So your look up will succeed at startup time and let this resource proxy the target ejb.
[Message sent by forum member 'cf126330' (cf126330)]

http://forums.java.net/jive/thread.jspa?messageID=322862