2 Replies Latest reply on Oct 10, 2006 5:19 AM by Hideo GOTO

    How to reference a POJO EJB3 objects in scheduler-service.xm

    Hideo GOTO Newbie

      Hello,

      I migrated a working EJB2 application to EJB3(POJO /JBOSS-4.0.4GA) based one. While everything worked OK thanks to JBOSS's good documentations, I am facing to just an issue.

      I tried to refer to an EJB3(POJO) stateless session bean by JNDI name inside a dependency description (as here below) in scheduler-service.xml without success, although it was working by similor way in case of EJB2/JBOSS-3.2.5.

      jboss.j2ee:jndiName=someModule/SomePojoStatelessSessionBean/local,service=EJB3

      I would be happy if anyone could help me.

      Thanks in advance.

      Hideo GOTO

        • 1. Re: How to reference a POJO EJB3 objects in scheduler-servic
          Ravi K Newbie

          basically your lookup is broken right? happened to me too. the jndi name changed to <deployment_name>//..

          you can sure by looking at the jmx-console. in case of the 'default' jboss server go to http://localhost/jmx-console. click on 'service=JNDIView'. now invoke the list() method and search for your bean look at the exact namespace under which it is deployed. if you don't see your bean here . . . that's another problem.

          • 2. Re: How to reference a POJO EJB3 objects in scheduler-servic
            Hideo GOTO Newbie

            Thanks for your reply, Fakeer.

            Prior to post my S.O.S here, I had checked with JNDI view on the JMX Console, being aware of the syntaxical changes in JNDI reference in JBOSS4. In fact, I am using the same default JNDI name for invoking the same session bean from a client class without having problem.

            In the meantime, I tried to let the scheduler depend on other evident MBEANs, and had no problem. As a practical alternative , I let the scheduler depend on the persistance unit associated to the deployment unit as here below and confirmed that it works.

            &lt;depends&gt;persistence.units:.....,unitName=someUnitName&lt;/depends&gt;

            I understand that the dependency assignment normaly waits for a MBEAN, So, now, I am asking to myself if POJO EJB3 classes cannot be refered to as MBEAN.

            Anyway, thanks a lot for your suggestion, and your any further idea about here above will be welcome.