This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Transaction Problem  RSS feed

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..
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!