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

quilleashm do-not-reply at jboss.com
Mon Jun 4 04:11:16 EDT 2007


  | @Name( "xxx" )
  | @Scope( ScopeType.APPLICATION )
  | @Startup
  | public class MyClass
  | {
  |    @Create
  |    public void create()
  |    {
  |        // init stuff here
  |    }
  | }
  | 

The key things are:

@Startup is only valid with application and session, in your case you want application scope.

Using @Create to have initialisation code run when the component creates.  In this case the component is created on application startup.

HTH.

Mike.


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

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



More information about the jboss-user mailing list