From all that I have been reading I would expect to see a heavy performance penalty for using the remote EJB interface instead of the local EJB interface. But when I attempt to do some hard timings I see almost no pentalty for using a romote interface when the caller and callee are both in the same JBoss application (same jvm). I only see the huge penalty (factor of 100) when using the remote interface outside of JBoss.
Is this what you would expect? Is this normal or is JBoss doing some really cool optimization on the use of remote within the same application?
local create : 0.0157 milliseconds
remote create: 0.0172 mill
client create: 1.8114 mill
Remote is optimized to local when it is actually local.
We avoid the serialization/marshalling which is
a big performance hit.