I recently gone through a Netbeans article about how to create and Enterprise Application Client that access EJB deploy on Glassfish.(Article Link Here) I have couples questions about this article.
The article exposes the EJB via a remote interface, I think this will result in application client have to make a remote invocation. There are overheads for doing this. While local interface parameters are passed by reference, remote interface parameters are passed by value, which results in parameters being copied -> this could be quite expensive.
So my question is why use remote
interface here? Is it because the client machine and the Glassfish might be on different machines (different JVM). So if I say that the client code and the Glassfish server are on the same machine (same JVM), can I somehow alter the design to use local interface to avoid overheads.
Since all the codes are provided in the article, I wont post it again here. Please let me know if you still insist me post the code