|
Replies:
2
-
Last Post:
Dec 21, 2008 8:29 PM
by: Rama Sundari
|
|
|
|
|
|
|
deployment order in glassfish
Posted:
Dec 19, 2008 12:16 AM
|
|
|
|
|
Hi..,
I have a resource adapter module and and ejb module. While deployment of the .rar ,it looks up for a session bean which is in the ejb module. so for this every time i want to deploy rar,i have to make sure that this ejb is deployed..
But i want this rar to be autodeploed whenever the server is started, so i placed the rar and jar in the auto deploy directory.. the problem is application server is deploying the rar module first and then deploying the jar, hence look up is failing..
I have tried another approach also.. I made .ear which includes both this .rar and .jar ..and mentioned the order of deployment using INDEX.LIST file in the META_INF folder but now the jar deployment started first but before it is deployed completely (means before binding with JNDI name for session bean) the rar is getting deployed and look up is failing..
any one please tell me solution for this...so that even after server restart also the look up will not fail inside the rar module.
thanks in advance -- Thanks, Rama. [att1.html]
|
|
|
|
|
|
|
Re: deployment order in glassfish
Posted:
Dec 21, 2008 11:57 AM
in response to: Rama Sundari
|
|
|
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.
|
|
|
|
|
|
|
|
Re: deployment order in glassfish
Posted:
Dec 21, 2008 8:29 PM
in response to: cf126330
|
|
|
|
|
Hi.., thanks for ur response..
I think the second option which u specified suits to my application.. can u please tell me in detail how to do the required configuration.... any link on this configuration wil be very useful..
thanku, rama. On Mon, Dec 22, 2008 at 1:27 AM, <glassfish@javadesktop.org> wrote:
> 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 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net > For additional commands, e-mail: users-help@glassfish.dev.java.net > >
-- Thanks, Rama. [att1.html]
|
|
|
|
|