-
1. Re: Is JBossCache good inside EJB model?
javaripper Jun 26, 2005 7:09 AM (in response to javaripper)OK,
I'm going to explain the issue I am confused about :
The problem with the restrictions in ejb is related to instance TreeCache directly inside the ejb, because TreeCache is a socket listener, thread creator what is forbidden in the ejb especification restrictions.
You have to get the TreeCache reference through JNDI and everything works fine.
Another posibility is the use of jmx to make the reference to the MBean TreeCache, in both cases the creation of TreeCache is not "placed" in the ejb thread but in JBoss.
I did not realize about the problem at that moment. -
2. Re: Is JBossCache good inside EJB model?
ben.wang Jun 29, 2005 1:18 PM (in response to javaripper)If you run TreeCache inside JBoss, the best way is always looking it up through MBean service.
-Ben -
3. Re: Is JBossCache good inside EJB model?
javaripper Jul 4, 2005 3:13 AM (in response to javaripper)
Only one more question:
Is this TreeCache MBean called by reference inside ejb?
I mean if we can't use threads control and TreeCache take control of ejb thread (for example in transactions locks)...are we breaking the ejb specs? -
4. Re: Is JBossCache good inside EJB model?
xavierpayne2 Jul 25, 2005 7:56 AM (in response to javaripper)If you look it up through the MBean Service and use whats passed back by that then yeah. It's basically a pass by reference. So its no different (to your ejb) than doing a remote or local lookup of an ejb.
We have ejbs use MBeans all the time. The only time you need to be careful is when you get them tangled up... Like for example having an EJB call an entity bean which calls a service which calls the same entity bean... Stuff like that is a problem.
In short EJB -> MBean = fine. Spec is preserved.