[jboss-user] [JBoss Seam] - How to use @Startup annotation?

surajmundada@yahoo.com do-not-reply at jboss.com
Mon Jun 4 03:15:42 EDT 2007


Hi, 

I want to execute a method of bean which brings some static data from a text file and store it in database. 

This should happen only once and at the time of starting the app server. 

I could do it successfully when I mapped the method in pages.xml. But then this method gets executed each time when the page is rendered which  is not what I want. 

I read about @Startup annotation and assume that this would serve my purpose. 

I tried to implement that but my method is not getting executed. 

Can some one help me getting a sample example showing the use of @Startup ? 

Regards, 

Suraj


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4050810#4050810

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4050810



More information about the jboss-user mailing list