-
1. Re: Local and Remote interfaces
gjeudy Oct 29, 2008 2:26 PM (in response to hcura)The local interface and remote interfaces cannot be the same. You have to use different interfaces. Usually I would have the local interface extend the remote interface as what you want to expose remotely is usually a subset of what is available locally. In the end the choice is yours.
PS: no need to mess with the JNDI pattern in Seam.
Now if your EJB uses persistence then you are likely to hit a problem with your persistence context management. See my post relating to this subject.
Example:
@Stateless @Local(WorkspaceServiceLocal.class) @Remote(WorkspaceService.class) @Name("workspaceService") public class WorkspaceServiceImpl implements WorkspaceService, WorkspaceServiceLocal { ... }
-
2. Re: Local and Remote interfaces
hcura Oct 29, 2008 2:59 PM (in response to hcura)Thanks for your answer. Maybe I didn't make my self clear regarding the interfaces. I know an interface can't be both local and remote at the same time; what I meant was that i needed to have both available and make the bean implement them.
Back to the problem..
I've tried your approach before but (with the @Local and @Remote annotations) in reverse order (local interface first) and didn't work. Now with remote first it seams to work. I've made some simple test runs and should be fine.
Thanks.