[jboss-user] [EJB 3.0] - Re: why @Remote is preferred over @Local?
do-not-reply at jboss.com
Thu Oct 19 05:39:30 EDT 2006
I don't agree. Sure, this is a problem, but the solution is not try to optimize local over remote.
Such as solution would create a undeterministic situation where sometimes calls get done local (with call-by-value and, for example, entity classes still attached) and sometimes calls get done remote (with call-by-reference, for example, entity classes detached). It would create hard-to-maintain, hard-to-debug and strange-error-behavior code.
The solution is to either:
* Deny/Warn deploy of code where the same java interface is used for both local and remote EJB3 interface.
* Deny/Warn deploy of code that uses plain injection (without arguments) on a java interface that have multiple EJB3 interfaces.
The design pattern we applied after discovering this behavior in JBoss is to Never use the same java interface for local and remote EJB3 interface.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3979297#3979297
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3979297
More information about the jboss-user