This content has been marked as final.
Show 8 replies
-
1. Re: The default local interface (vs. EJBTHREE-785)
bill.burke Oct 9, 2007 12:55 PM (in response to wolfc)The letter of the law is, if the bean's implementation does not match the default pattern (implements one interface that isn't declared remote or local), then you must be explicit on what the Remote and/or local interface is. Its pretty simple and clear to me.
-
2. Re: The default local interface (vs. EJBTHREE-785)
wolfc Oct 9, 2007 1:13 PM (in response to wolfc)The failing scenario is:
@Stateless class MyBean extends SuperBean implements SomeInterface {} interface SomeInterface {} class SuperBean implements RemoteInterface {} @Remote interface RemoteInterface {}
If I follow the letter than SomeInterface will become the only business interface (local).
If I follow EJBTHREE-785 than RemoteInterface will become the only business interface (remote).
I think we can get away with the following:
* If the bean class has no interface (including interfaces from superclasses) explicitly declared as a business interface and the bean class implements a single interface, than that interface is assumed to be the local business interface of the bean. -
3. Re: The default local interface (vs. EJBTHREE-785)
wolfc Oct 9, 2007 1:17 PM (in response to wolfc)Or even better:
* If bean class implements a single interface, that interface is assumed to be a business interface of the bean. This business interface will be a local interface unless the interface is designated as a remote business interface by use of the Remote annotation on the bean class or interface or by means of the deployment descriptor. -
4. Re: The default local interface (vs. EJBTHREE-785)
wolfc Oct 9, 2007 2:35 PM (in response to wolfc)Another failing scenario: http://jira.jboss.com/jira/browse/EJBTHREE-1062
-
5. Re: The default local interface (vs. EJBTHREE-785)
bill.burke Oct 9, 2007 2:52 PM (in response to wolfc)"wolfc" wrote:
The failing scenario is:@Stateless class MyBean extends SuperBean implements SomeInterface {} interface SomeInterface {} class SuperBean implements RemoteInterface {} @Remote interface RemoteInterface {}
If I follow the letter than SomeInterface will become the only business interface (local).
The spec says nothing about inheritance of interfaces.
If I follow EJBTHREE-785 than RemoteInterface will become the only business interface (remote).
Nope, just read EJBTHREE_785. What Gavin wants is this:public class MyBean implements MyRemote {} @Stateless public class SubBean extends MyBean {}
Business interface of SubBean has a remote interface of MyRemote. -
6. Re: The default local interface (vs. EJBTHREE-785)
bill.burke Oct 9, 2007 2:55 PM (in response to wolfc)"wolfc" wrote:
Another failing scenario: http://jira.jboss.com/jira/browse/EJBTHREE-1062
Which is still different than the example you gave. -
7. Re: The default local interface (vs. EJBTHREE-785)
wolfc Oct 10, 2007 5:03 AM (in response to wolfc)"bill.burke@jboss.com" wrote:
The spec says nothing about inheritance of interfaces."EJB 3 4.6.2" wrote:
The session bean class may have superclasses and/or superinterfaces. If the session bean has superclasses, the business methods, lifecycle callback interceptor methods, the timeout callback method, the methods of the optional SessionSynchronization interface, the Init or ejbCreate<METHOD> methods, the Remove methods, and the methods of the SessionBean interface, may be de?ned in the session bean class, or in any of its superclasses. A session bean class must not have a superclass that is itself a session bean class.
Combined with 4.6.6 doesn't really allow for business interfaces to be defined by a superclass, but the water gets real murky. So I let EJBTHREE-785 pass."bill.burke@jboss.com" wrote:
Nope, just read EJBTHREE_785. What Gavin wants is this:public class MyBean implements MyRemote {} @Stateless public class SubBean extends MyBean {}
Business interface of SubBean has a remote interface of MyRemote.
That's exactly what is working. It's EJBTHREE-1062 that has stopped working and the first scenario I sketched is an expectancy problem.
So we need to choice either option A or B.
I like A in the sense that it's closer to the spec and thus easier on the TCK. I like B because it is more closely aligned with EJBTHREE-785. It all depends on what you would expect to happen in the 'outside the box' scenarios. I need a definitive statement to bring it into the box. -
8. Re: The default local interface (vs. EJBTHREE-785)
alrubinger Oct 10, 2007 3:27 PM (in response to wolfc)"wolfc" wrote:
Or even better:
* If bean class implements a single interface, that interface is assumed to be a business interface of the bean. This business interface will be a local interface unless the interface is designated as a remote business interface by use of the Remote annotation on the bean class or interface or by means of the deployment descriptor.
I think this is the correct case."wolfc" wrote:
The failing scenario is:@Stateless class MyBean extends SuperBean implements SomeInterface {} interface SomeInterface {} class SuperBean implements RemoteInterface {} @Remote interface RemoteInterface {}
If I follow the letter than SomeInterface will become the only business interface (local).
Disagree with the last statement; unclear here whether the spec dictates that "SomeInterface" must be the *only* local business interface:"EJB3 4.6.6" wrote:
If bean class implements a single interface, that interface is assumed to be the (local) business interface of the bean.
So the question becomes: can we intrepret "the" as "a"?
If so, in the case above I'd have "SomeInterface" be exposed as local business, as well as "RemoteInterface" as remote business.
S,
ALR