First of all: Thank you !

Unfourtunately, my app doesn't have
an web-component, so I have to find some way to do this with
ejbs. I thought of doing this in the ejbCreate method, but
this method doesn't get call until the first client
connects....

> If your app has a web component to it you can use a listener that will
> notify you when the servlet context gets created. For example:
>
> public class MyListener implements ServletContextListener {
>     private static Logger log = Logger.getLogger( MyListener .class);
>
>     /** Constructs a new SimpleListener. */
>     public MyListener() {
>     }
>
>     public void contextDestroyed(ServletContextEvent sce) {
>         log.info("notification that the web app is stopping");
>     }
>
>     public void contextInitialized(ServletContextEvent sce) {
>         log.info("notification that the web app is started");
>     }
> }
>
> you could register your objects for notifications in the
> contextInitialized
> method. Don't know if there is a way to do this for ejbs though.
> hope this helps
> Brian
>
>
>
>
>>From: [EMAIL PROTECTED]
>>Reply-To: [EMAIL PROTECTED]
>>To: [EMAIL PROTECTED]
>>Subject: [JBoss-user] performing tasks on application startup
>>Date: Mon, 8 Dec 2003 14:40:14 +0100 (CET)
>>
>>Hi,
>>
>>Is there a elegant way to perform tasks
>>in an application after the application is
>>deployed an started. I think of tasks
>>such as registering objects for timer
>>notifications....
>>
>>Thanks in advance
>>
>>Stefan
>>
>>
>>-------------------------------------------------------
>>This SF.net email is sponsored by: IBM Linux Tutorials.
>>Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
>>Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
>>Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
>>_______________________________________________
>>JBoss-user mailing list
>>[EMAIL PROTECTED]
>>https://lists.sourceforge.net/lists/listinfo/jboss-user
>
> _________________________________________________________________
> Add photos to your e-mail with MSN 8. Get 2 months FREE*.
> http://join.msn.com/?page=features/featuredemail
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: IBM Linux Tutorials.
> Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
> Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
> Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
>



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to