[jboss-dev-forums] [Design of EJB 3.0] - Re: EJBTHREE-1062 and metadata
emuckenhuber
do-not-reply at jboss.com
Thu May 22 03:40:45 EDT 2008
Yup i thought of doing the same to fix the tests.
But shouldn't metadata validate and fail when parsing the example above?
Referring to the RemoteProcessor which does smth like this:
| // Although this is not explicitly allowed by the spec, we accept it
| // EJB 3 4.6.7
| if(EJBObject.class.isAssignableFrom(businessInterface))
| {
| if(metaData.getRemote() != null)
| throw new IllegalArgumentException("2.1 bean " + metaData.getEjbName() + " already has a remote interface " + metaData.getRemote() + ", can't add " + businessInterface.getName());
| metaData.setRemote(businessInterface.getName());
| }
| else
| {
| metaData.getBusinessRemotes().add(businessInterface.getName());
| }
|
That means if you have:
| @Stateful(name="AnotherName")
| @Remote(MyStateful.class)
| @RemoteHome(MyStatefulHome.class)
| public class MyStatefulBean
| {
| ...
| }
|
| public interface MyStatefulHome extends EJBHome
| {
| public MyStateful create(String x);
| }
|
| public interface MyStateful extends EJBObject
| {
|
| }
|
Which would be ok as the return type of the RemoteHome extends EJBObject - it would just set MyStateful as Remote interface - and @Remote will be more or less ignored.
Is that ok / the expected behaviour?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4152568#4152568
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4152568
More information about the jboss-dev-forums
mailing list