I have an enterprise application that currently deploys and runs on WebSphere and Weblogic that I would like to port to JBoss.
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.
We were having some issues getting started with mbeans and were open to using JBoss 6, which supports EJB 3.1. So, we decided to go with a @Startup @Singleton bean with @PostConstruct and @PreDestroy methods.
Works like a charm.