This content has been marked as final.
Show 4 replies
-
1. Re: how to do custom start() in bean
jaikiran Oct 19, 2011 2:15 AM (in response to zhfeng)What type of a bean is it? You can mark it as a @javax.ejb.Singleton and @javax.ejb.Startup bean to have it started on application deployment. Also you can mark the start() method with @PostConstruct so that it gets invoked on bean instantiation:
@javax.ejb.Singleton @Startup public class XTSServiceTestRunnerBean implements XTSServiceTestRunner { @PostConstruct public void start() { ... } ...
-
2. Re: how to do custom start() in bean
zhfeng Oct 19, 2011 2:43 AM (in response to jaikiran)OK, it works!
and @PreDestroy to stop()
P.S. is there different between ejb bean and none-ejb bean ?
Amos
-
3. Re: how to do custom start() in bean
jaikiran Oct 19, 2011 2:52 AM (in response to zhfeng)Amos Feng wrote:
P.S. is there different between ejb bean and none-ejb bean ?
Depends on what you mean by non-ejb bean.
-
4. Re: how to do custom start() in bean
zhfeng Oct 19, 2011 3:13 AM (in response to jaikiran)well, such as stateless web bean ?