5 Replies Latest reply on Aug 7, 2007 8:52 AM by Pete Muir

    Third-party EJBs as seam components

    Patrick Ruhkopf Newbie

      Hi there,

      Consider an EAR file containing a seam application and a third-party ejb-jar. Now, can I just use components.xml to give these EJBs a name and seam scope and then use them as usual seam components?

      And what happens if I deploy the ejb-jar by itself? Would this work:

      @Name("myRemoteEJB")
      public class RemoteEJBManager
      {
       private RemoteInterface ejb;
      
       @Create
       public void create() throws NamingException {
       InitialContext ic = new InitialContext();
       RemoteInterface ejb = (RemoteInterface)
       ic.lookup(RemoteInterface.class.getName());
       }
      
       @Unwrap
       public RemoteInterface getEjb() {
       return ejb;
       }
      
      }


      Thank your very much!