"emuckenhuber" wrote : 1) In this case we have MyStatefulBean ->
MyStatefulHome -> MyStateful.
| As we define a RemoteHome, the MyStateful interface must extend the EJBObject?
Yes. Because Home interfaces must return local/remote interfaces, and local/remote must
extend EJBLocalObject/EJBObject.
"emuckenhuber" wrote : 2) then we have 4.6.6 where they say: The interface must
not extend the javax.ejb.EJBObject or javax.ejb.EJBLocalObject interface.
| Which more or less means that a business interface can't be a Session Bean's
Local or Remote Interface?
Let's draw up some definitions first, because the wording in the spec is a little
tricky.
* Business Interface - The EJB3 View, may be local or remote, and is denoted by the
corresponding @Local and @Remote annotations.
* Remote Interface - The EJB2.x View, must extend from EJBObject, may only be obtained via
the return of a create{METHOD} method of a Home interface (for SFSB) or the
"create" method of a Home interface (for SLSB). See Spec 3.6.2.
So in regards to 4.6.6, they're talking only about *Business* interfaces, yes, saying
that a business interface cannot also be a remote/local interface.
My solution to these tests is to make:
public interface MyStatefulRemote extends EJBObject{...}
|
| public interface MyStatefulRemoteBusiness{...}
|
| public interface MyStatefulRemoteHome extends EJBHome{
| public MyStatefulRemote create() throws CreateException, RemoteException;
| }
|
| @Stateful
| @RemoteHome(MyStatefulRemoteHome.class)
| @Remote(MyStatefulRemoteBusiness.class)
| public class MyStatefulBean implements MyStatefulRemoteBusiness{...}
S,
ALR
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4152529#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...