Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

do we need a meaningful transaction?

 
pradeep arum
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in a SFSB in ejbCreate() we can not force a transaction rollback or find whether a transaction is rolledback or not because we are not in a meaningful transaction but we can access other bean methods & resource manager.
in a Entity bean , in ejbCreate() we can force a transaction rollback or find whether a transaction is rolledback or not & also we can access other bean methods & resource manager.is the ejbCreate() here (entity bean)in a meaningful transaction?
can somebody explain these scenarios please
another question is "do we need a meaningful transaction to call other beans methods or resource manager" ?
thanks
Pradeep
[ March 15, 2004: Message edited by: pradeep arum ]
 
Chris Johnson
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about this one: Entity ejbCreate, How do you have a meaningful
"client security context" without an entity object or a primary key?
 
Chris Johnson
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From what I gather, accessing resource managers and other enterprise beans
is disallowed if container does not have a "meaningful transaction context"
or a "client security context".
Also, to help answer my own question, To have EJBObject and primarykey
access, you must have a valid "entity object identity", which looks
apparently separate from having a "client security context".
Can anyone confirm this?
 
Nathaniel Stoddard
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes that's correct.
Sometimes methods are called by the container like ejbLoad and ejbStore. You can obviously get your own EJBObject at that point, but since no client actually invoked a method there's no client security context to use, so trying to do anything regarding security at that point would cause a runtime error.
While I was studying for the exam, I found that somebody had some very, very helpful notes regarding what was available to beans during its lifecycle. I forget who it was that put it up. I wrote some review in the results forum that you can do a search for (using my member #). It should help you clear up alot of these issues -- plus, it's a great cram tool right before you walk into the testing center.
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you mean the cheat sheets by Valentin Crettaz.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic