Tim Haley [http://community.jboss.org/people/ymaraner] created the discussion

"POJO Service in an ear to provide lifecycle hooks?"

To view the discussion, visit: http://community.jboss.org/message/590372#590372

--------------------------------------------------------------
I have an enterprise application that currently deploys and runs on WebSphere 
and Weblogic that I would like to port to JBoss. When the application is 
started, there is some initialization code that needs to be run. When the 
application is stopped, there is some cleanup code that needs to be run. I am 
trying to determine the proper way to do this in JBoss 5. On another thread, I 
read that a Service MBean could provide that functionality. Can I simply 
annotate an EJB 3.0 stateful session bean with @Service to make it a singleton, 
@Management to make it an MBean, implement the management lifecycle methods and 
package the bean inside my ear file? The documentation says that the lifecycle 
methods are for the lifecycle of the bean, will my bean have the same lifecycle 
as my application? How can I ensure that it does? I would appreciate any help 
you can provide, including pointing me to the right place in the documentation.
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/590372#590372]

Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]

_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to