ejb@glassfish.java.net

Re: InvocationContext.setParameters() javadoc

From: Kenneth Saks <Kenneth.Saks_at_Sun.COM>
Date: Mon, 24 Apr 2006 10:55:04 -0400

Wonseok Kim wrote:

> Hi,
>
> While I running devtests (ejb/ejb30/interceptors/session - test#9),
> I found that InvocationContext.setParameters(params) can throw
> IllegalArgumentException if params' types doesn't match with original
> method's types. EJB 3.0 spec says this (added after PFD) and
> implementation does this well.
>
> But API javadoc is not updated to reflect IllegalArgumentException,

Hi Wonseok,

Yes, good catch. This will need to added to the javadoc. Thanks.

 --ken

>
> so I was confused before I check the spec and implementation carefully.
>
> http://fisheye5.cenqua.com/viewrep/glassfish/ejb-api/src/share/classes/javax/interceptor/InvocationContext.java?r=1.2
> <http://fisheye5.cenqua.com/viewrep/glassfish/ejb-api/src/share/classes/javax/interceptor/InvocationContext.java?r=1.2>
>
> /**
> * Sets the parameters that will be used to invoke the
> * business method.
> *
> * @exception java.lang.IllegalStateException if invoked within
> * a lifecycle callback method.
>
> */
> public void setParameters(Object[] params);
>
>
> Could you add the exception in the javadoc?
>
> Thanks...
>