7 Replies Latest reply on Jan 3, 2007 2:29 PM by anil.saldhana

    EJB References

    anil.saldhana

      Scott, the following code in org.jboss.ejb.EjbUtil does not make sense:

      private static String resolveLink(MBeanServer server, DeploymentInfo di, String link, boolean isLocal)
       {
      ...
      else
       {
       // <ejb-link> contains a Bean Name, scan the DeploymentInfo tree
       DeploymentInfo top = di;
       while (top != null)
       {
       top = top.getParent();
       }
      
       return resolveAbsoluteLink(top, link, isLocal);
       }
      }
      
       private static String resolveAbsoluteLink(DeploymentContext ctx, String link, boolean isLocal)
       {
       ....
       ApplicationMetaData appMD = ctx.getTransientAttachments().getAttachment(ApplicationMetaData.class);
       if (appMD != null)
       {
       ...
       }
      
      


      Because of the while loop in the first method, the deployment context passed to the second method is always null.

      Can you check and fix?

        • 1. Re: EJB References
          starksm64

          There are now two EjbUtil and EjbUtil50. The latter Thomas did and may of tested. I just update EjbUtil to get the ejb2 deployers to compile under the vdf. If the EjbUtil50 is correct, we can migrate to it and drop the EjbUtil.

          • 2. Re: EJB References
            bill.burke

            I hope EjbUtil50 is based on the EJB reference stuff I did for the EJB3 codebase. If you want to have *real* dependencies on an EJB container at the MC level, then you'll need the org.jboss.injection codebase.

            • 3. Re: EJB References
              starksm64

              Its doubtful. Its likely just a port of the j2ee1.4 resolution semantics to the vdf classes in jboss5.

              • 4. Re: EJB References
                anil.saldhana

                 

                ant -Dtest=org.jboss.test.naming.test.SecurityUnitTestCase one-test

                will show a case where the deployment context passed is null. Basically the EjbUtil updates are not complete.

                • 5. Re: EJB References
                  anil.saldhana

                  Here is the thread on the EJBReferences.

                  • 6. Re: EJB References
                    anil.saldhana

                    Where are we with MDBs getting reference to JMS destinations?

                    ant -Dtest=org.jboss.test.security.test.EJBSpecUnitTestCase one-test


                    Caused by: javax.naming.NameNotFoundException: QueueC not bound


                    The queues are created. But the jndi lookup is failing.

                    Maybe the JMSContainerInvoker/JMSProviderAdapter need look here?

                    Also looks like the queues are started after the ejb deployment for this test case. Maybe that is where the issue is.

                    • 7. Re: EJB References
                      anil.saldhana

                      If a jar contains a sar, shouldn't the sar be deployed first?

                      If you run the


                      ant -Dtest=org.jboss.test.security.test.EJBSpecUnitTestCase one-test


                      It seems the ejb deployment which is contained in the jar is happening before the queues that need to be created, whose defs are contained inside the embedded sar.