4 Replies Latest reply on Jul 3, 2007 1:50 PM by ramdas

    Using Jboss Cache 1within WebLogicServer 10.0

    ramdas

      I am attempting to use JBoss cache 1.2.3 from with WLS 10.0. As a reference i attempted to install the demo sample specified in http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossCacheAndWebLogic

      When i start the WebLogic server i get a bunch of different exceptions as shown below. I am not able to understand why WLS is attempting to authenticate when the startup class tries to register in the JNDI tree.

      Any clues?

      Thanks

      Ramdas



      2007-06-01 17:27:55,502 ERROR [org.jboss.cache.transaction.DummyTransactionManager]org.jboss.cache.transaction.DummyTransactionManager binding of DummyTransactionManager failed

      2007-06-01 17:27:58,115 ERROR [jboss.cache.example.j2eeservices.JBossCacheManager]org.jboss.cache.example.j2eeservices.JBossCacheManager Problems Saving Cache In JNDI
      javax.naming.AuthenticationException [Root exception is javax.security.auth.login.FailedLoginException: [Security:090304]Authentication Failed: User weblogic javax.security.auth.login.FailedLoginException: [Security:090302]Authentication Failed: User weblogic denied]

        • 1. Re: Using Jboss Cache 1within WebLogicServer 10.0
          manik

          Don't use the dummy transaction manager. This tries to bind to JNDI and fails.

          Use the GenericTransactionManagerLookup instead, which should detect the WebLogic transaction manager.

          • 2. Re: Using Jboss Cache 1within WebLogicServer 10.0
            ramdas

            Thanks. That helped.
            I am relatively new to the JBoss cache world and since i am porting this code over from running within JBoss to WLS, i am not sure what all in the code belongs to the JBoss cache vs JBoss AS.

            In my application code, the JNDI lookup is done using the MBeanServerLocator class as shown here:
            MBeanServer server = MBeanServerLocator.locate();
            cache = (TreeCacheMBean)MBeanProxyExt.create(TreeCacheMBean.class,"jboss.cache:service=TreeCache", server);
            The cache is then manipulated using cache.put() and cache.get() methods.

            I am assuming the TreeCache is registered into the JBoss AS JNDI automatically by the JBoss AS framework using the "replySync-service.xml" configuration file.

            In the sample that u have put out, if i understand it right, the job of registering the TreeCache is being done by the JBossCacheManager class.

            Was wondering if it was possible to use the MBeanServerLocator within WebLogic server to locate the JBoss cache ? Or would I need to use the JBossCacheManager approach to register the TreeCache?

            Thanks

            Ramdas

            • 3. Re: Using Jboss Cache 1within WebLogicServer 10.0
              manik

              Even in JBoss AS you shouldn't be using the DummyTransactionManager. The GenericTransactionManagerLookup would locate the JBossTransactionManager, which comes with JBoss AS.

              There is no such thing as a JBossCacheManager. What I was talking about was a JTA compliant TransactionManager.

              To bind JBC to JNDI use a startup class which instantiates and binds a JBoss Cache instance. See http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossCacheAndWebLogic - the example is for WLS 8.1, but I'm sure the concepts apply to WLS 10 as well.

              • 4. Re: Using Jboss Cache 1within WebLogicServer 10.0
                ramdas

                Was able to deploy the example from http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossCacheAndWebLogic -
                This helped me register the JBoss cache in WLS' JNDI tree and use the cache from my app.

                Thanks

                Ramdas