is the ejbCreate() in SFSB not in a transaction? if it is not ,how can we access resource manager & other beans methods in ejbCreate()because bean law says :to access other bean methods or resource manager the method needs to be in a meaningful transaction
Failure is not when you fall down; its only when you fail to get up again.
Spec section 7.6.1 pg 79-81 and 17.6.5 pg 363-364. Although the spec never comes out completely and says it, it looks like 'meaningful transaction context' includes: - transactions created via container-managed transaction demarcation - transactions created via bean-managed transaction demarcation - methods executed in an unspecified transaction context When reading HFE I started thinking that anything not in the first 2 categories was thus in the 3rd category, but in going through the spec I've concluded that doesn't add up. The spec seems to specifically single out some methods as executing in an unspecified transaction context to give the container vendor free reign as to how they'll deal with transactionality. There are other methods that lack a transaction context entirely (like the no-arg constructor for a bean, or setSessionContext), and those are the methods that can't access a resource manager.
Reid - SCJP2 (April 2002)
Wait for it ... wait .... wait .... NOW! Pafiffle! A perfect tiny ad!