You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LightGuard edited this page Jan 25, 2012
·
1 revision
@Startup
Seam 2 provides the @Startup annotation that can be applied to an application or session scoped component. A Startup-annotated component is instantiated immediately after the context is started up, instead of instantiating the component lazily when first needed by a client.
There are two possible alternatives in Java EE 6:
EJBSingleton beans – which can be marked to be instantiated eagerly at application startup using the @Startup annotation. Combined with the fact that these components can benefit from declarative transaction management, these components are good candidates for performing database imports, etc.
Observing Solder’s events which notify the component when the application starts or when the request or session context is activated due to a servlet request.