UnlockedSharedObjectException in ehcache management
---------------------------------------------------

                 Key: CDV-585
                 URL: https://jira.terracotta.org/jira//browse/CDV-585
             Project: Community Development
          Issue Type: Bug
    Affects Versions: 2.5.0
            Reporter: Tim Eck
            Assignee: Issue Review Board


source: http://forums.terracotta.org/forums/posts/list/723.page

If one takes a clustered ehcache CacheManager instance and try to register it 
with an MBeanServer, you'll get an UnlockedSharedObjectException. 

Making a call like this (passing a shared cacheManager) should produce the issue
net.sf.ehcache.management.ManagementService.registerMBeans(cacheManager, 
ManagementFactory.getPlatformMBeanServer(), true, true, true, true);


This is the exception text:
  com.tc.object.tx.UnlockedSharedObjectException: 
  
*******************************************************************************
  Attempt to access a shared object outside the scope of a shared lock.  
  All access to shared objects must be within the scope of one or more shared 
locks defined in your Terracotta configuration.  
  Please alter the locks section of your Terracotta configuration so that this 
access is auto-locked or protected by a named lock.

  For more information on this issue, please visit our Troubleshooting Guide at:
   http://terracotta.org/kit/troubleshooting


      Caused by Thread: main  in  VM(0)
      Shared Object Type: java.util.HashSet
  
*******************************************************************************

          at 
com.tc.object.tx.ClientTransactionManagerImpl.getTransaction(ClientTransactionManagerImpl.java:278)
          at 
com.tc.object.tx.ClientTransactionManagerImpl.checkWriteAccess(ClientTransactionManagerImpl.java:291)
          at 
com.tc.object.bytecode.ManagerImpl.checkWriteAccess(ManagerImpl.java:662)
          at 
com.tc.object.bytecode.ManagerUtil.checkWriteAccess(ManagerUtil.java:364)
          at java.util.HashSet.add(HashSet.java)
          at 
net.sf.ehcache.event.CacheManagerEventListenerRegistry.registerListener(CacheManagerEventListenerRegistry.java:65)
          at 
net.sf.ehcache.management.ManagementService.init(ManagementService.java:137)
          at 
net.sf.ehcache.management.ManagementService.registerMBeans(ManagementService.java:110)
          at Foo.main(Foo.java:11)



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://jira.terracotta.org/jira//secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
tc-dev mailing list
[email protected]
http://lists.terracotta.org/mailman/listinfo/tc-dev

Reply via email to