We have an application that was written during the ejb1.0 spec. I decided to take advantage of some of the ejb2.0+ spec improvments so I created local views of a bunch of our entity beans in order to gain performance improvement.
However, I found that the InvokerInterceptor interceptor in jboss (one of the default interceptors) already optimizes by making local invocations if the client and server are in the same JVM. I even verified this in the debugger.
I am wondering if it is worth the trouble to provide local views of the beans at all. Is there still some advantage to providing local views of the beans? Why would you ever want to create a local view since jboss already optimizes for in VM calls?
I did some minimal profiling to see if using local interfaces results in performance improvement. It did show marginal improvement but it is not conclusive. Am I missing something?
Portability of call by reference semantics.