jsr345-experts@ejb-spec.java.net

[jsr345-experts] Re: Methods on Object.class and no-interface view rules?

From: David Blevins <david.blevins_at_gmail.com>
Date: Tue, 14 Feb 2012 15:19:53 -0800

On Feb 14, 2012, at 2:41 PM, Marina Vatkina wrote:

> Experts,
>
> The current EJB spec (see section 4.9.8) defines a no-interface view business methods as
>
> "All public methods of the bean class and any superclasses are exposed as business methods through the no-interface view."
>
> This would include all public methods of the Object.class
>
> Do we want to restrict this list to toString() method only?

It might already be required elsewhere, at least in part.

I know there are tests for equals() wrt to business local views. Haven't checked if the same tests exist for no-interface views. If they don't, they should.

Someone asked me a month or two ago about finalizer methods on no-interface views as well. Those shouldn't be business methods either.

We currently treat all Object.class methods as non-business methods. I'd have to double check our impl to see what happens if you override toString(), but I know for sure if you don't we will give you a default toString() that includes some internal ejb metadata.

Definitely +1 to explicitly excluding Object.class methods. Open to including toString() as a business method in either overridden or non-overriden form if people want that.


-David