Hi,
The
EJB spec says that,
Accessing resource managers and enterprise beans is disallowed in the session bean methods
for which the Container does not have a meaningful transaction context or client security context.
It also says that
If a session bean instance attempts to access a resource manager or an enterprise bean, and that access is
not allowed (as state by the spec), the behavior is undefined by the EJB architecture.
So your code in theory could work it's just not gauranteed to work in all EJB containers. This hurts your EJB's potential for reusability.
HFEJB is saying what is mandated by the spec so you will need to know it for the exam.
Hope this helps,
Mike
Mike Cogan<p> <a href="http://www.revisingscbcd.co.uk" target="_blank" rel="nofollow">www.revisingscbcd.co.uk</a> <br /> <a href="http://www.revisingscea.co.uk" target="_blank" rel="nofollow">www.revisingscea.co.uk</a> <br /> <a href="http://www.revisingscjp.co.uk" target="_blank" rel="nofollow">www.revisingscjp.co.uk</a> <br /> <a href="http://www.revisingscwcd.co.uk" target="_blank" rel="nofollow">www.revisingscwcd.co.uk</a>