posted 15 years ago
On which line is the exception thown?
According my thinking, the excepption is thrown at line 16 getEJBHome() as this method returns remote Home,and when this method is called and the bean does not have a remote home "illigal State Exception " is thrown.
Please correct if i am wrong.
Given an interface:
@Local
public interface MyI {
public Set go(Set s);
}
Given an excerpt from a stateful session bean that implements this business interface:
9. @Stateful
10. @TransactionAttribute(TransactionAttributeType.REQUIRED)
11. public class MyStatefulBean implements MyI {
12. @Resource SessionContext ctx;
13. public Set go(Set s) {
14. ctx.getRollbackOnly();
15. ctx.getEJBOjbect();
16. ctx.getEJBHome();
17. throw new Exception("Will I, won't I?");
18. }
50. }
No deployment descriptor is used. Which statement is correct?
An exception is thrown on line 14.
An exception is thrown on line 15.
An exception is thrown on line 16.
An exception is thrown on line 17.