On Jun 17, 2010, at 7:03 AM, Ivan wrote:

> Hi,
>    While working with AroundTimeout implementation, I found that OpenEJB
> treats it as a normal business method, and in EJBTimerServiceImpl, I can see
> some codes like :
>   --->
>   try {
>          RpcContainer container = (RpcContainer) deployment.getContainer();
>          Method ejbTimeout = deployment.getEjbTimeout();
>          container.invoke(deployment.getDeploymentID(),
> ejbTimeout.getDeclaringClass(), ejbTimeout, new Object[] {timer},
> timerData.getPrimaryKey());
>        }
>   <---
>     In my plan, I wish to handle AroundTimeout as normal lifecycle
> intercepor methods, it means that I need to set the Operation.TIMEOUT to
> invocation context. But with existing codes, I do not find a chance to
> configure it. I am wondering whether we could update the RpcContainer
> interface and add a new invoke method ? In that method, we could configure
> the Operation type.

We can probably treat it as a new InterfaceType.  Maybe InterfaceType.TIMEOUT 
or something.

>     Another thing is that if the user call the ejbTimeout method via client
> view, which interceptor methods should be invoked, AroundInvoke or
> AroundTimeout ? I guess that it should be AroundInvoke ?

Right, it would be a plain AroundInvoke.  Basically any method, say a 
PostConstruct method, could be exposed as a business method.  In that case it 
gets treated as a plain business method.


-David

Reply via email to