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 ]
Failure is not when you fall down; its only when you fail to get up again.
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?
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.