[jboss-dev-forums] [Design of EJB 3.0] - Re: IsLocalInterceptor not detecting local container
bstansberry@jboss.com
do-not-reply at jboss.com
Thu Mar 8 10:01:57 EST 2007
No, IsLocalInterceptor only checks whether it itself was created in VM and routes locally if it was. Basically, it's:
| private static final long stamp = System.currentTimeMillis();
| private long marshalledStamp = stamp;
|
| private boolean isLocal()
| {
| return stamp == marshalledStamp;
| }
|
| public Object invoke(Invocation invocation) throws Throwable
| {
| if (isLocal())
| {
| ... bypass remoting; route directly to Container
| return result;
| }
| else
| {
| // continue on to remoting
| return invocation.invokeNext();
| }
| }
|
Now that I think about it, that's definitely not good enough; you have to check for the local bean before routing locally. What if it's been undeployed locally, but some proxy is stored in-VM somewhere (e.g. in a web session)? The way it is now the call will fail.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4026256#4026256
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4026256
More information about the jboss-dev-forums
mailing list