2 Replies Latest reply on Apr 22, 2005 4:32 PM by Bela Ban

    Unable to bind TreeCache TransactionManager in WSAD

    Ruchi Newbie

      I am facing an issue while starting TreeCache in wsad. It results in following exception -

      [4/22/05 14:09:47:703 IST] 56d69e6c SystemOut O 2005-04-22 14:09:47,703 [Servlet.Engine.Transports : 1] ERROR - binding of DummyTransactionManager failed

      javax.naming.NameNotFoundException: Name not found in context "java:".
      at com.ibm.ws.naming.ipbase.NameSpace.getParentCtxInternal(NameSpace.java:1663)
      at com.ibm.ws.naming.ipbase.NameSpace.getParentContext(NameSpace.java:1552)
      at com.ibm.ws.naming.urlbase.UrlContextImpl.getParentBindingData(UrlContextImpl.java:1641)
      at com.ibm.ws.naming.urlbase.UrlContextImpl.bind(UrlContextImpl.java:203)
      at com.ibm.ws.naming.urlbase.UrlContextImpl.bind(UrlContextImpl.java:342)
      at javax.naming.InitialContext.bind(InitialContext.java:368)
      at org.jboss.cache.transaction.DummyTransactionManager.getInstance(DummyTransactionManager.java:41)
      at org.jboss.cache.DummyTransactionManagerLookup.getTransactionManager(DummyTransactionManagerLookup.java:17)
      at org.jboss.cache.TreeCache.startService(TreeCache.java:867)
      at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
      at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:172)
      at net.sf.hibernate.cache.TreeCache.(TreeCache.java:51)
      at net.sf.hibernate.cache.TreeCacheProvider.buildCache(TreeCacheProvider.java:14)
      at net.sf.hibernate.cfg.Configuration.configureCaches(Configuration.java:1130)
      at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:790)


      The following code fails -

      public static DummyTransactionManager getInstance()
      {
      if(instance == null)
      {
      instance = new DummyTransactionManager();
      try
      {
      Properties p = new Properties();
      p.put("java.naming.factory.initial", "org.jboss.cache.transaction.DummyContextFactory");
      Context ctx = new InitialContext(p);
      ctx.bind("java:/TransactionManager", instance);
      ctx.bind("UserTransaction", new DummyUserTransaction(instance));
      }
      catch(NamingException e)
      {
      log.error("binding of DummyTransactionManager failed", e);
      }

      Any idea???????????????