The copy() method of the invocation context looks broken,
per invocation, a new copy of the context is added. This however is not correctly
copying the mutable objects, in this case the dispatcher.
Others that should be passed by copy to the incoming thread are the descriptor, and
possibly the interceptors.
| RCS file: /cvsroot/jboss/jmx/src/main/org/jboss/mx/server/InvocationContext.java,v
|
| public final void copy(final InvocationContext src)
| {
| if (sc == null)
| return;
|
| this.descriptor = src.descriptor.copy();
| this.interceptors = src.interceptors.copy();
| }
|
The above is pseudo code. If the dispatcher will never evolve with additional state
then it makes sense to move the args to the invocation. Otherwise the dispatcher
should be one of the objects to copy in the above snippet. I have not verified that it
actually fixes the problem you're seeing.
The more you copy the more your throughput suffers of course. It's also a decision
whether you copy (and be safe on concurrency) or try to correctly synchronize mutable
invocation context (more error prone but at some point more efficient).
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3831855#3831855
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3831855
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development