gavin wrote:
you don't need an actual running MBean server to use the same treecache.xml. It should Just Work.
Thanks Gavin, I just gave it a try. After fix some loose ends, I made it up running. The parts missing in RC1 are jboss-common.jar and log4j since TreeCache use JBoss logger and in turn uses log4j. Anotherthing change is in treecache.xml, change the cachemode to literal string instead of number since the treecache jar rc1 bundled does conversion itself.
Now the hard part, I got the following exception:
Code:
TreeCache is a full transactional cache: ...
at net.sf.hibernate.cache.TreeCache.unlock(TreeCache.java:102)
at net.sf.hibernate.cache.ReadWriteCache.get(ReadWriteCache.java:92)
at net.sf.hibernate.impl.SessionImpl.doLoad(SessionImpl.java:2030)
at net.sf.hibernate.impl.SessionImpl.immediateLoad(SessionImpl.java:1857)
at net.sf.hibernate.proxy.LazyInitializer.initialize(LazyInitializer.java:49)
at net.sf.hibernate.proxy.LazyInitializer.initializeWrapExceptions(LazyInitializer.java:56)
at net.sf.hibernate.proxy.LazyInitializer.getImplementation(LazyInitializer.java:156)
at net.sf.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializer.java:72)
at net.sf.hibernate.proxy.HibernateProxy$$EnhancerByCGLIB$$7cbe25aa.getFactory(<generated>)
...
I don't use tx for query operation at all, but in this case it seems transaction is mandatory. What should I do instead of creating transaction?