1 Reply Latest reply on Nov 14, 2007 12:34 PM by Hanif Khatri

    Help with Weblogic to JBoss migration

    Hanif Khatri Newbie

      I have a problem with JNDI when moving from Weblogic 6 to JBoss 4.2.0.GA.

      I have a class which is bound to a JNDI name (Global), but when I do a lookup I always seem to get a copy rather than a reference. This code had previously worked ok on Weblogic.

      public class RuleCacheHolder implements Serializable // implements T3StartupDef, IRuleCacheHolder
      private static final long serialVersionUID = 2938516269249036614L;
      private String _className = this.getClass().getName();
      protected boolean noConnection = false;

      private String _cacheName;
      private String _cacheType;
      private String _types[];

      private Hashtable cache = new Hashtable();

      private static final String jndiName = "CACHE_HOLDER_";

      public RuleCacheHolder(String cacheName, String cacheType, String types[]) {

      try {
      new InitialContext().bind(jndiName + cacheName, this);
      // initialiseCache();

      // WebLogger.trace(_className+" CACHE_HOLDER_"+getCacheName()+"
      // CREATED...");
      } catch (NamingException ne) {


      After creation I populate the cache hashtable from a different class, however when a subsequent lookup is done the cache hashtable is empty. I am using a jndi prop file and have tried changing the CallByValue setting in jboss-service.xml. There are no errors or exceptions in the lookup.

      I have scoured the various sites to no avail so any help would be greatly appreciated.