[jboss-dev-forums] [Design of EJB 3.0] - Re: When is there an EJBObject?

wolfc do-not-reply at jboss.com
Sat Oct 6 10:08:51 EDT 2007


In the failing unit test a proxy to a bean with a remote business interface is cast to an EJBObject.
So we can agree that this is in fact an illegal construct?

We can still allow a home-less bean with a remote interface. It would result in a partially realized EJB 2.1 view, only usable by EJB 3 users. (EJBTHREE-1058)

I say for fully realized EJB 2.1 view you must have:
- a home interface (extending EJBHome or EJBLocalHome)
- a remote/local interface (extending EJBObject or EJBLocalObject)

A home interface without a remote/local interface would then be considered an illegal construct and should throw an exception at deployment time.
Same goes for returning some else that the defined remote/local interface from the home's create method(s).

In theory we could infer the remote/local interface from the home interface create method's return type. So an explicit remote/local interface definition is then optional.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4092269#4092269

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4092269



More information about the jboss-dev-forums mailing list