2 Replies Latest reply on Feb 21, 2006 8:38 PM by aazaroff

    why 3.2.6 lookup fails when upgrading to 4.0

    aazaroff Newbie

      I have a context lookup that is failing in 4.0.3 that works perfectly fine in 3.2.6. We are looking to upgrade our server but there is a schedulable class that needs to lookup objects in the jndi:local/.... context and now it cannot find them because jboss now adds an @somenumber to the end of the jndi name. I have scoured the docs for about 10 hours over the last 2 days and can find nothing about this in the erata I have looked into the jboss-service.xml for the naming config which led me to xmldesc/NamingService-xmbean.xml, which I cannot find any config in to govern how or why this extension is added to the bean name.

      I can get to the local OK but when I list the objects bound in the context I get all the names that have the @somenumber at the end so my lookups fail.

      For some reason all the applications that have the names mapped into the local ejb namespace (java;comp/env) for the components work fine but I can find no way to add a resource reference to the jboss varia scheduler mbean which is where my schedulable class runs from.

      Here is the code that works in 3.2.6 but fails in 4.0.3

      javax.naming.InitialContext ctx = new javax.naming.InitialContext();
      if (posDataServices==null) {
      logger.debug("getting data service bean");
      this.posDataServices = ((possystems.webservices.posdataservices.PosDataServicesLocalHome) ctx.lookup("local/PosDataServicesBean")).create();
      }

      Here is a list of everything bound in the local context along with the error message:

      the name is:FspXmlfeedrequestsBean@17381025 with class:$Proxy70
      the name is:XmlfeedrequestsBean@13194107 with class:$Proxy70
      the name is:PosDataServicesBean@12882632 with class:$Proxy61
      the name is:TransporterServiceInvokerBean@10616280 with class:$Proxy71
      the name is:PosMarsLoggerBean@549721 with class:$Proxy55
      the name is:AppServerPropertiesBean@21322996 with class:$Proxy54
      the name is:Properties@18891813 with class:$Proxy53
      getting data service bean
      2006-02-21 15:36:00,010 INFO [STDOUT] javax.naming.NameNotFoundException: PosDataServicesBean not bound
      ot bound


      Andre