-
1. Re: why @Remote is preferred over @Local?
boby Aug 22, 2006 4:10 AM (in response to metelka)Hi,
I made several tests and I find the same conclusion.
So if anyone knows why the remote is used instead of the local, that will be nice ??
My solution is to use @EJB inject like that :@EJB(mappedName = "masterServices/ResourcesSessionBean/local") private ResourcesSession resourcesSession;
thanks,
j. Bordeau -
2. Re: why @Remote is preferred over @Local?
metelka Aug 22, 2006 11:10 AM (in response to metelka)I've created JIRA issue http://jira.jboss.com/jira/browse/EJBTHREE-663 quite a while ago... but nothing happened yet :(
-
3. Re: why @Remote is preferred over @Local?
erazero Oct 19, 2006 5:39 AM (in response to metelka)Hi
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.
Regards
F Persson -
4. Re: why @Remote is preferred over @Local?
wolfc Oct 19, 2006 8:56 AM (in response to metelka)I've rejected this issue (as per spec 4.6.7 bullet 5.4).
See also http://jira.jboss.com/jira/browse/EJBTHREE-751