1 Reply Latest reply on Mar 3, 2005 4:50 PM by Thomas Diesler

    EJB3 web services

    David Mann Newbie

      Is there any information anywhere on deploying EJB3 session beans as web services using JSR 181? I would have thought that something like the following should create the session bean and deploy it as a web service:

      @WebService
      @SOAPBinding(style = SOAPBinding.Style.RPC, use = SOAPBinding.Use.ENCODED)
      @Stateless
      public class BaseObjectDAOBean implements BaseObjectDAO{
      
       @Inject
       protected EntityManager _manager;
      
       public BaseObject create(String name) {
       BaseObject bObj=new BaseObject();
       bObj.setName(name);
       _manager.persist(bObj);
       return bObj;
       }
      
       @WebMethod
       public BaseObject find(@WebParam long id) {
       return _manager.find(BaseObject.class,id);
       }
      }


      Where BaseObject is a bean (actually a EJB3 POJO CMP)..
      Has anyone looked into this? Should it work as-is or am I asking too much too soon? The power of this sort of business service deployment pattern would be amazing...

      Thanks