• Post Reply Bookmark Topic Watch Topic
  • New Topic

Stateless session bean traceability  RSS feed

 
Java Juan
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Java Juan
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!