Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Transaction Problem

Jack Nicholson
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am doing transactions in Stateless SessionBean using container managed transactions.
I am having one common class which does transactions for me, which will be called from usersessionbeans.
The Constraint is that i don't want to use two lookups for ejb. only one.
Now Option left is that the common class can not be transacting bean as it will be out of boundry of container transactions. & will not support ACID properties.
can anybody tell me solution for this ??
MYTHOUGHT - I am thinking of doing common transaction class, which will be EJB.
& User EJB will extend that common ejb class. & so we can use sessioncontext for rollbacking purpose.
but here the problem is that --- sessionbean get executes as if sessionbean executes or it executes as if simple bean method called???
I mean will it set the context before that ejb methods invoked(transactions) of common transacting class.
& it should not throw error when transaction will come to rollback. as i am using context.setRollbackOnly() method for this.
But i am not sure about this.
Can any body give me thought on this..
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic