You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by Gu...@instinet.com on 2005/11/23 20:47:19 UTC

Start-up classes

I am migrating an application from WebLogic to Geronimo. It consists of 
EJBs but it also has a "startup" class,
meaning a class whose main() method has to be invoked before the ejbs are 
deployed. Unfortunately this class
performs a huge initialization procedure during class initialization, and 
it really has to be done before anything else.

In WLS there is a <startup> tag in config.xml, and a similar tag in 
weblogic-application.xml. To do the same in Geronimo
I am guessing that I can declare a <gbean> inside 
geronimo-application.xml. Is that correct?

Thanks
Guglielmo

P.S. Your server looks very clean. Thanks for all the work.

*****************************************************************
<<<Disclaimer>>>

In compliance with applicable rules and regulations, Instinet
reviews and archives incoming and outgoing email communications,
copies of which may be produced at the request of regulators.
This message is intended only for the personal and confidential
use of the recipients named above.  If the reader of this email
is not the intended recipient, you have received this email in
error and any review, dissemination, distribution or copying is
strictly prohibited. If you have received this email in error,
please notify the sender immediately by return email and
permanently delete the copy you received.  

Instinet accepts no liability for any content contained in the
email, or any errors or omissions arising as a result of email
transmission. Any opinions contained in this email constitute
the sender's best judgment at this time and are subject to change
without notice.   Instinet does not make recommendations of a
particular security and the information contained in this email
should not be considered as a recommendation, an offer or a
solicitation of an offer to buy and sell securities.

*****************************************************************


Re: Start-up classes

Posted by David Jencks <da...@yahoo.com>.
On Nov 23, 2005, at 11:47 AM, Guglielmo.Lichtner@instinet.com wrote:

>
> I am migrating an application from WebLogic to Geronimo. It consists 
> of EJBs but it also has a "startup" class,
> meaning a class whose main() method has to be invoked before the ejbs 
> are deployed. Unfortunately this class
> performs a huge initialization procedure during class initialization, 
> and it really has to be done before anything else.
>
> In WLS there is a <startup> tag in config.xml, and a similar tag in 
> weblogic-application.xml. To do the same in Geronimo
> I am guessing that I can declare a <gbean> inside 
> geronimo-application.xml. Is that correct?

Yes.  However, I'm not sure what you need in terms of timing or what 
you mean by "before the ejbs are deployed".  Our deployment process 
results in defining gbean instances for each ejb, and the application 
configuration just has all the gbeans in it.  Without doing more, there 
is no guarantee that your startup gbean will start before any ejb 
container gbean.  On the other hand, your custom gbean is fairly 
certain to get started before any ejb instances are created or any 
calls to ejbs occur.  If you need your startup code executed before any 
ejb class is loaded however, we'll need to find another solution.  Can 
you tell us anything more about what kinds of things you need to do and 
when?

thanks
david jencks
>
> Thanks
> Guglielmo
>
> P.S. Your server looks very clean. Thanks for all the work.

Thanks!!!
>
>  *****************************************************************
>  <<>>
>
>  In compliance with applicable rules and regulations, Instinet
>  reviews and archives incoming and outgoing email communications,
>  copies of which may be produced at the request of regulators.
>  This message is intended only for the personal and confidential
>  use of the recipients named above. If the reader of this email
>  is not the intended recipient, you have received this email in
>  error and any review, dissemination, distribution or copying is
>  strictly prohibited. If you have received this email in error,
>  please notify the sender immediately by return email and
>  permanently delete the copy you received.
>
>  Instinet accepts no liability for any content contained in the
>  email, or any errors or omissions arising as a result of email
>  transmission. Any opinions contained in this email constitute
>  the sender's best judgment at this time and are subject to change
>  without notice. Instinet does not make recommendations of a
>  particular security and the information contained in this email
>  should not be considered as a recommendation, an offer or a
>  solicitation of an offer to buy and sell securities.
>
>  *****************************************************************


Re: Start-up classes

Posted by Aaron Mulder <am...@alumni.princeton.edu>.
You can use a GBean to run code during the application startup, but
I'm not sure off the top of my head whether that will necessarily be
run before EJBs become available to clients.

Aaron

On 11/23/05, Guglielmo.Lichtner@instinet.com
<Gu...@instinet.com> wrote:
> I am migrating an application from WebLogic to Geronimo. It consists of EJBs
> but it also has a "startup" class,
> meaning a class whose main() method has to be invoked before the ejbs are
> deployed. Unfortunately this class
> performs a huge initialization procedure during class initialization, and it
> really has to be done before anything else.
>
> In WLS there is a <startup> tag in config.xml, and a similar tag in
> weblogic-application.xml. To do the same in Geronimo
> I am guessing that I can declare a <gbean> inside geronimo-application.xml.
> Is that correct?
>
> Thanks
> Guglielmo
>
> P.S. Your server looks very clean. Thanks for all the work.