A developer writes a stateful session bean FooBean with two local business interfaces Foo and
bar. The developer wants to write a business method called getBar for interface Foo that returns a
Bar reference to the same session bean identity on which the client onvokes getBar.
Which code, when inserted on line 12 below implements the getBar method with the wanted
behavior?
10. @Resource SessionContext sessionCtx;
11. public Bar getbar () {
12.
13. }
A.
Return (bar) this;
B.
Return (bar) new FooBarBean();
C.
Return (bar) sessionCtx.lookup(�FooBarBean�)
D.
Return (bar) sessionCtx.getBusinessObject(Bar.class);
E.
Return (bar) session Ctx.lookup(�java: comp/env/ejb/FooBarBean�);