3 Replies Latest reply on Jul 26, 2002 4:41 AM by ludovic

    MyHow to write a CMP (again) ?

    ludovic

      I've changed my source since the last time and my cmp doesn't work ? I've got a javax.naming.NameNotFoundException.
      Since two weeks I try to use it and I really need some help.
      This is the source of my web-service : If someone wants to look it. Thanks.

      I create and I deploy fine the files tracking.jar, tracking.war and tracking.wsr.

      I can call my CMP with a client using rmi and the method : ...lookup("VerifiantTracking");

      And the web-service.xml file :

      <deployment
      xmlns="http://xml.apache.org/axis/wsdd/"
      targetNamespace="http://net.jboss.org/tracking"
      xmlns:tracking="http://net.jboss.org/tracking"
      xmlns:jbnet="http://net.jboss.org/server"
      xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">

      <ejb-ref>
      <ejb-ref-name>VerifiantTracking</ejb-ref-name>
      <ejb-link>tracking/VerifiantTracking</ejb-link>
      </ejb-ref>














        • 1. Re: MyHow to write a CMP (again) ?
          jeffdelong

          I don't know if I can help, but I have an example working. Here is my web-service.xml:

          <deployment name="OrderService"
          targetNamespace="http://org.jboss.docs.cmp2.commerce/OrderManager"
          xmlns:OrderManager="http://org.jboss.docs.cmp2.commerce/OrderManager"
          xmlns="http://xml.apache.org/axis/wsdd/"
          xmlns:jbnet="http://org.jboss.docs.cmp2.commerce/server"
          xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">

          <!-- this is an extension to the Axis deployment descriptor which allows to
          specify the naming environment for the deployed ws logic -->

          <!-- OrderManager reference -->
          <ejb-ref>
          <ejb-ref-name>ejb/OrderManager</ejb-ref-name>
          <ejb-ref-type>Session</ejb-ref-type>
          org.jboss.docs.cmp2.commerce.OrderManagerHome
          org.jboss.docs.cmp2.commerce.OrderManager
          <ejb-link>OrderManagerEJB</ejb-link>
          </ejb-ref>



          <!-- the final jndi name that this provider sits upon-->




          This is with JBOSS 3.0.0. The beanJndiName "commerce/OrderManager" is the same as the jndiName in my jboss.xml

          <ejb-name>OrderManagerEJB</ejb-name>
          <jndi-name>commerce/OrderManager</jndi-name>


          My application.xml looks like this:


          <display-name>commerce</display-name>

          commerce.jar


          OrderService.wsr



          and my OrderService.wsr has the web-service.xml, as well as my ejb's home and remote interface classes.

          OrderManager is a stateless session bean that provides a facade to the commerce cmp2 example. (I think from reading the project page for Jboss.NET that its EJB support is limited to session beans).

          By the way I seem to remember getting NameNotFoundExceptions when I tried to use java:comp/env/ejb/OrderManagerEJB, but you appear to be using the global jndi name that is successful from you RMI client.

          Hope this helps.

          • 2. Re: MyHow to write a CMP (again) ?
            ludovic

            Thanks Jeff, I will try now to change my source again.

            • 3. Re: MyHow to write a CMP (again) ?
              ludovic

              Everything is working fine. It's great !