Hi Chris, Are you sure you have declared a local as well as remote interface for your bean?. Currently I get the local interface for a EJB3 session bean in RPC servlet like so:
public class SystemServiceImpl extends RemoteServiceServlet implements SystemService { private static org.apache.log4j.Logger log = Logger.getLogger(SystemServiceImpl.class); public Boolean verifyJackrabbit() { try { Context ctx = new InitialContext(); AdminConsoleLocal admin = (AdminConsoleLocal) ctx.lookup("AdminConsoleEJB/local"); if (admin.verifyJackrabbit()){ ...... ...... } regards gregor On Sep 15, 11:03 am, chris_wesdorp <[EMAIL PROTECTED]> wrote: > Hi, > > for a reason not yet clear to me the '@EJB' annotation does not work > for the RemoteServiceServlet class. However, instead of using the EJB > annotation the bean can be found using JNDI lookups. But why is it > only possible to get the Remote interface? > > I have three projects: > * one EJB project which contains EJB's, remote and home interfaces for > these ejb's and JPA entity classes used for database persistence with > toplink. > * one GWT project, implementing the RemoteServiceServlet for client > communication. A protected variable is added for the ejb to this > servlet, an annotation is added but it is not filled on > initialization. JNDI must be used to retrieve a remote interface for > the EJB. > * one web application containing a single servlet connecting to the > local interface of the EJB using the @EJB annotation on a protected > variable of the Local interface type. The variable is automatically > filled. > > All projects are packed into an EAR file and deployed to glassfish. > > Why isn't is possible to use EJB annotations for the > RemoteServiceServlet ? > Are there other options to retrieve the Local interface for an EJB? > > I hope to get some answers on this, > Chris --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---