[jboss-dev-forums] [Design of POJO Server] - EJB References

anil.saldhana@jboss.com do-not-reply at jboss.com
Mon Nov 13 16:13:37 EST 2006


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?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3985615#3985615

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3985615



More information about the jboss-dev-forums mailing list