users@glassfish.java.net

Re: Problem using remote interface so one enterprise app can access another

From: Witold Szczerba <pljosh.mail_at_gmail.com>
Date: Thu, 12 Feb 2009 08:28:12 +0100

2009/2/12 <glassfish_at_javadesktop.org>:
> The real question is how to place AppA's remote interface into a shared library or project so the only thing AppB contains is the remote interface...and not the EJB. I tried to place the remote interface into a library project, but the @Remote annotation then fails because it's not an EJB project. Do I need to forget the annotations and have the remote interface extend java.rmi.Remote? What is the best way to architect this?

No, you do not have to forget annotations. It is a simple classpath
issue. Just add javaee.jar (it's JavaEE API, you can find it in
Glassfish/lib, any other JavaEE server or somewhere in NB) to the
classpath and your library project will build correctly.

Regards,
Witold Szczerba