-
1. Re: threads in jboss
genady_yadata May 13, 2007 4:53 AM (in response to genady_yadata)I should add that I'm talking about some "heavyweight" processing, not just serving bean instances in parallel.
-
2. Re: threads in jboss
weston.price May 15, 2007 7:23 AM (in response to genady_yadata)You are prohibited from starting threads within the EJB container. If you need threads you can do it from the WebContainer within a Servlet or JSP.
-
3. Re: threads in jboss
weston.price May 15, 2007 7:24 AM (in response to genady_yadata)Or via a custom MBean which is usually what most people do.
-
4. Re: threads in jboss
genady_yadata May 15, 2007 7:26 AM (in response to genady_yadata)"weston.price@jboss.com" wrote:
Or via a custom MBean which is usually what most people do.
Do you mean message driven beans? -
5. Re: threads in jboss
weston.price May 15, 2007 7:30 AM (in response to genady_yadata)No. I mean a JMX MBean. MessageDrivenBeans are EJB application components and as such you are prohibited from using threads. Some people use MDB's to achieve parallel processing in the application server but these threads are managed by JBoss and you have no control over them.
-
6. Re: threads in jboss
genady_yadata May 15, 2007 7:32 AM (in response to genady_yadata)Can you please provide a pointer to an example?
Thanks! -
8. Re: threads in jboss
genady_yadata May 15, 2007 8:04 AM (in response to genady_yadata)Ok, I think I get the idea. Are there any limitations on threads created by the MBean?
Can the MBean interact with the rest of the EJB3 components using regular ejb3 bean injections and transaction management, or everything will have to go through JNDI? -
9. Re: threads in jboss
weston.price May 15, 2007 8:05 AM (in response to genady_yadata)You will have to use JNDI. Can you give me an idea of what you would like to use threads for?
-
10. Re: threads in jboss
genady_yadata May 15, 2007 9:20 AM (in response to genady_yadata)Occasionally our application needs to iterate over large amounts of data (that's in the DB, and we use hibernate to access it). Since the process is both computation and IO intensive, we'd like to balance between io/cpu load by using threads.