>
> If you don't believe it, how come when we turned off Optimized everything
> worked. As a different test, we didn't share PrimaryKey instances when
> calling findByPrimaryKey, and that worked as well! I'm not crazy here.
> I've been looking at this code for more than a week now trying to figure out
> why our InstanceCache was all fucked up and finally, finally found the
> solution. BTW, the Optimized flag isn't even documented within JBoss.....
>
Sure it is, from: http://www.jboss.org/documentation/HTML/ch06s08.html
<container-invoker-conf> configuration of the container invoker.
There are several elements which can nest within container-invoker-conf, one of which
is <Optimized>. This controls the behavior of
bean method calls within the Java VM in which jboss is running. If the value of
Optimized is "false" then the container will behave
per the EJB spec and all objects passed into and out of bean remote methods will be
marshalled over RMI regardless of whether the
client is running remotely or in the same VM as jboss.
If the value of Optimized is "true" then objects passed between bean methods and
clients in the jboss java VM will be passed by
reference rather than by value. This is much more efficient (and can result in
substantial performance improvements) but can result
in unexpected behavior. For example, if a bean has a member object and returns that
object from a get() method then the
EJB-specified behavior is to make a copy of that object which is returned over RMI to
the caller. Therefore if the caller modifies
the returned object in any way she will modify the copy of the object. If Optimized is
"true" then the caller will modify the
original object per se, rather than a copy.
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development