Hi!
The most correct way to do this is to write your own MBean/Service. AFAIK threads are not
allowed inside an EJB (some application servers will allow threads in the EJB). So writing
your own MBean that will take care of multithreading might solve your problem.
Creating MBeans is about adding a new service entry in you jboss-app.xml that will point
out a your-service.xml file.
You MBean javacode must implement an interface s.a. YourServiceMBean (Notice the pattern
interface name ends with MBean, the implementation does not);
mbean interface: YourServiceMBean
mbean impleementation: YourService
You are looking up MBeans in the same way as you do with an EJB with the
iniCtx.lookup(...)
The MBean has some life cycle methods that you might want to use:
start(), stop(), ... Start is called when the service is deployed. Check the JBoss
application server documentation for more details.
Hope this can help you.
Cheers
/Oskar
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4096383#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...