ejb@glassfish.java.net

Re: clarification needed on javax.interceptor.InvocationContext methods

From: Kenneth Saks <Kenneth.Saks_at_Sun.COM>
Date: Tue, 07 Mar 2006 12:11:34 -0500

Cheng Fang wrote:

> /**
> * Returns the context data associated with this invocation or
> * lifecycle callback.
> */
> public Map<String, Object> getContextData();
>
>Can we explicitly state that if no context data has been set, it returns
>an empty map, though people would assme so?
>
Yes, I made that clarification to the javadoc.

>
>
> /**
> * Returns the parameters that will be used to invoke
> * the business method. If setParameters has been called,
> * getParameters() returns the values to which the parameters
> * have been set.
> */
> public Object[] getParameters();
>
>Does it return null for lifecycle callbacks?
>
getParameters/setParameters will throw IllegalStateException when invoked
from callbacks.

 --ken