Forums Register Login

Stateless session bean traceability

+Pie Number of slices to send: Send
Lets if I have multiple stateless session beans called consurrently, each executing a different Use case such as withdraw, deposit etc. How do I trace if one each one has completed executing its use case . In short how do I trace the successfill execution of these stateless session beans
+Pie Number of slices to send: Send
Usually with a standard trace package (like Log4J or the JDK 1.4 logging facility) that appends a thread ID to each trace file entry. That way you can separate out each use case by thread, since each EJB method is guaranteed by the container to execute on a single thread.
Kyle
+Pie Number of slices to send: Send
Well given this situation, where I have multiple session beans acting concurrently , what if I want one to execute on the successfull\unsuccessful execution of the other. How do I find out if the other session bean has been successfull and then continue executing or abort etc.
+Pie Number of slices to send: Send
You can't. EJB's are not a solution for concurrent programming. They were not designed as such. If you have a problem like this, you need to handle it using standard Java threading techniques outside of the EJB container.
Kyle
Here. Have a potato. I grew it in my armpit. And from my other armpit, this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 502 times.
Similar Threads
Basic Object Pooling doubt
EJBHomeFactory pattern and Stateless Session Bean
Confused with Stateless Session Bean
Stateless Session bean : Multiple Clients reference
Hibernate and stateless session beans
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 06:48:55.