8 Replies Latest reply on Feb 4, 2005 11:14 PM by Ben Wang

    Using JBossCache on BEA WebLogic

    Manik Surtani Master

      Hello all.

      I've written a short HOWTO on using JBossCache (1.1) with BEA WebLogic (8.1), and I've even written a startup/shutdown class which runs the distributed cache as a service in WebLogic.

      Pls see http://www.jboss.org/wiki/Wiki.jsp?page=JBossCacheAndWebLogic

      Feedback is appeciated! :)

        • 1. Re: Using JBossCache on BEA WebLogic
          Ben Wang Master

          This is awesome. Do you mind if we move this under JBossCache wiki page?

          BTW, any volunteer for Websphere HOWTO? :-)


          • 2. Re: Using JBossCache on BEA WebLogic
            Manik Surtani Master


            By the way, it is linked from the JBossCache wiki page - see the last para on http://www.jboss.org/wiki/Wiki.jsp?page=JBossCache

            I could try Websphere as well, but my experience/exposure to it is limited. Might be more efficient for someone skilled up in Websphere to give it a go. If no one has the time though, I could take it up ...

            • 3. Re: Using JBossCache on BEA WebLogic
              Manik Surtani Master

              OK, chaps - I've looked at WebSphere 5.1, and there is no way to run startup classes. I spoke to a friend who has done a lot of work with WebSphere before, and he had to use a pretty messy kludge with a WAR file that gets deployed first, with a servlet with a static block that acts as a startup class.

              Very ugly stuff.

              Also, I did notice that WebSphere has something called a Dynamic Cache Service - I wonder if this is distributed, and whether this makes JBossCache on WS superfluous.

              Has there been many requests for JBossCache on WS?

              • 4. Re: Using JBossCache on BEA WebLogic
                Bela Ban Master

                Not really; most people use WebLogic

                • 5. Re: Using JBossCache on BEA WebLogic
                  kc gan Newbie

                  I received the following error when running the examples given in http://www.jboss.org/wiki/Wiki.jsp?page=JBossCacheAndWebLogic

                  ERROR [org.jboss.cache.transaction.DummyTransactionManager] binding of DummyTransactionManager failed
                  javax.naming.OperationNotSupportedException: bind not allowed in a ReadOnlyContext; remaining name '/TransactionManager'
                  at weblogic.jndi.factories.java.ReadOnlyContextWrapper.newOperationNotSupportedException(ReadOnlyContextWrapper.java:145)
                  at weblogic.jndi.factories.java.ReadOnlyContextWrapper.newOperationNotSupportedException(ReadOnlyContextWrapper.java:161)
                  at weblogic.jndi.factories.java.ReadOnlyContextWrapper.bind(ReadOnlyContextWrapper.java:57)
                  at weblogic.jndi.internal.AbstractURLContext.bind(AbstractURLContext.java:45)
                  at javax.naming.InitialContext.bind(InitialContext.java:355)
                  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:1046)
                  at org.jboss.cache.example.j2eeservices.JBossCacheManager.main(JBossCacheManager.java:75)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:324)
                  at weblogic.t3.srvr.StartupClassService.invokeMain(StartupClassService.java:229)
                  at weblogic.t3.srvr.StartupClassService.invokeClass(StartupClassService.java:160)
                  at weblogic.t3.srvr.StartupClassService.access$000(StartupClassService.java:36)
                  at weblogic.t3.srvr.StartupClassService$1.run(StartupClassService.java:121)
                  at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
                  at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
                  at weblogic.t3.srvr.StartupClassService.invokeStartupClass(StartupClassService.java:116)
                  at weblogic.t3.srvr.PostDeploymentStartupService.resume(PostDeploymentStartupService.java:63)
                  at weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131)
                  at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:966)
                  at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:361)
                  at weblogic.Server.main(Server.java:32)

                  why having this error? Please help.

                  • 6. Re: Using JBossCache on BEA WebLogic
                    Ben Wang Master

                    Looks like it is still using the DummyTransactionManager instead of Weblogic one.

                    Which version is this?


                    • 7. Re: Using JBossCache on BEA WebLogic
                      kc gan Newbie

                      JBossCache is version 1.2.
                      Weblogic is version 8.1.

                      How do I change the transaction manager to weblogic one?

                      • 8. Re: Using JBossCache on BEA WebLogic
                        Ben Wang Master

                        So do you GenericTransactionManagerLookup? If you do, I don't know what's the problem without looking into it.