SCBCD - SCWCD - SCJD - SCJP - OCA
As we all know, we can't instantiate threads from within EJBs. But the question is:
Do we need threads, to perform operations faster may be, or to split a lengthy transaction?
Of course dealing with threads directly is tricky and probably that's one of the reasons why it is forbidden in EJB, but if there is a solution that provides the feeling of threading how far would you need it and use it?
SCBCD - SCWCD - SCJD - SCJP - OCA
SCBCD - SCWCD - SCJD - SCJP - OCA
"Eagles may soar but weasels don't get sucked into jet engines" SCJP 1.6, SCWCD 1.4, SCJD 1.5,SCBCD 5
Chris Hurst wrote:You can use a work manager if your container supports it (yet) , its morally ok to ask the container for a thread and allow it to determine if it should create or allocate you an existing one from a pool .
The devil is in how your 'work' communicates the results ;-), I use that with my JCA in Glassfish and communicate out via MDB.
This might be useful or chekc your container documentation...
http://www.devx.com/Java/Article/28815
Christian Gossart
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Do you find any problems with classloading in Glassfish - we have a JCA adapter that shares classes with our main application. This works fine in WAS, but in Glassfish the classloading order means that our shared classes are loaded in the JCA container. When our application then uses those classes, Glassfish give it the instances that were loaded in the JCA container, which causes problems when they then try to access resources that exist only in our application ear.
"Eagles may soar but weasels don't get sucked into jet engines" SCJP 1.6, SCWCD 1.4, SCJD 1.5,SCBCD 5
Consider Paul's rocket mass heater. |