You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by Mike Perham <mp...@gmail.com> on 2006/12/14 16:14:03 UTC

Module startup order?

Is there a way to control the order in which modules start up?  jboss
does it alphabetically and WebSphere allows a proprietary weight to be
given to modules to determine startup order.  We have a very specific
need for a web module to start before an ejb module.  Any suggestions
on how to do this?

mike

Re: Module startup order?

Posted by Mike Perham <mp...@gmail.com>.
Ok, I think this might be a red herring.  I thought it was the mdb due
to the error message but it looks like it is the web module failing to
start due to a much more typical classpath issue.  My mistake.

On 12/14/06, David Jencks <da...@yahoo.com> wrote:
>
> I'm probably just being stupid, but why does it need to start first?
> Starting an ejb module does not execute any application code so I'm
> having trouble imagining what bad effects starting the ejb module
> before the web module would have.
>
> thanks
> david jencks
>
> >
> > On 12/14/06, David Jencks <da...@yahoo.com> wrote:
> >>
> >>
> >> In an ear, you can't.  We go to a lot of trouble to make sure all
> >> ejbs are started before any wars so that if you need to look up an
> >> ejb in a servlet init method you can.
> >>
> >> If the apps are packaged separately, you can make the ejb app depend
> >> on the web app and the web app will be started first.
> >>
> >> Out of curiousity, why do you need to start the web app first?
> >>
> >> thanks
> >> david jencks
> >>
> >> >
> >> > mike
> >>
> >>
>
>

Re: Module startup order?

Posted by David Jencks <da...@yahoo.com>.
On Dec 14, 2006, at 9:18 AM, Mike Perham wrote:

> So I can't list a war dependency in my ejb so the war is init'd first?
> I tried to do that but it said it couldn't find the module.  I
> thought maybe this is because I don't have any modules listed in
> geronimo-application.xml.
>
> We are using Spring's BeanLocator facility to build a shared
> ApplicationContext which is visible to all modules in the EAR so they
> all share the same caches, etc.  Only one war has the setup necessary
> to build this context so we need it to start first.

I'm probably just being stupid, but why does it need to start first?   
Starting an ejb module does not execute any application code so I'm  
having trouble imagining what bad effects starting the ejb module  
before the web module would have.

thanks
david jencks

>
> On 12/14/06, David Jencks <da...@yahoo.com> wrote:
>>
>>
>> In an ear, you can't.  We go to a lot of trouble to make sure all
>> ejbs are started before any wars so that if you need to look up an
>> ejb in a servlet init method you can.
>>
>> If the apps are packaged separately, you can make the ejb app depend
>> on the web app and the web app will be started first.
>>
>> Out of curiousity, why do you need to start the web app first?
>>
>> thanks
>> david jencks
>>
>> >
>> > mike
>>
>>


Re: Module startup order?

Posted by Mike Perham <mp...@gmail.com>.
So I can't list a war dependency in my ejb so the war is init'd first?
 I tried to do that but it said it couldn't find the module.  I
thought maybe this is because I don't have any modules listed in
geronimo-application.xml.

We are using Spring's BeanLocator facility to build a shared
ApplicationContext which is visible to all modules in the EAR so they
all share the same caches, etc.  Only one war has the setup necessary
to build this context so we need it to start first.

On 12/14/06, David Jencks <da...@yahoo.com> wrote:
>
>
> In an ear, you can't.  We go to a lot of trouble to make sure all
> ejbs are started before any wars so that if you need to look up an
> ejb in a servlet init method you can.
>
> If the apps are packaged separately, you can make the ejb app depend
> on the web app and the web app will be started first.
>
> Out of curiousity, why do you need to start the web app first?
>
> thanks
> david jencks
>
> >
> > mike
>
>

Re: Module startup order?

Posted by David Jencks <da...@yahoo.com>.
On Dec 14, 2006, at 7:14 AM, Mike Perham wrote:

> Is there a way to control the order in which modules start up?  jboss
> does it alphabetically and WebSphere allows a proprietary weight to be
> given to modules to determine startup order.  We have a very specific
> need for a web module to start before an ejb module.  Any suggestions
> on how to do this?

In an ear, you can't.  We go to a lot of trouble to make sure all  
ejbs are started before any wars so that if you need to look up an  
ejb in a servlet init method you can.

If the apps are packaged separately, you can make the ejb app depend  
on the web app and the web app will be started first.

Out of curiousity, why do you need to start the web app first?

thanks
david jencks

>
> mike