Click HELP for text formatting instructions. Then edit this text and check the previewI want to make a smooth transition from my JSF & EJB 2.1 based technology to Seam and EJB 3. I do it in steps, application after application. However I got the problem I can't solve myself for few days - jboss cache versions. I use JBoss 4.2.3, in my current applications I use JBoss Cache 2.0.1 on java code level. Seam uses JBoss cache 1.x, making the cooperation of applications on the same server unavailable. I tried different ways to make it work, but have no other ideas. If anyone knows how to do it, please help. Below is the sample how I create and access cache in my current applications, in new Seam's one, I use it for caching page fragments via cache provider.
code:
MBeanServer server = MBeanServerLocator.locateJBoss();
ObjectName on = new ObjectName("jboss.cache:service=TreeCache");
TreeCacheViewMBean cacheWrapper =
(TreeCacheViewMBean) MBeanServerInvocationHandler.newProxyInstance(server, on,
TreeCacheViewMBean.class, false);
this.cache = cacheWrapper.getCacheService().getCache();
this.root = cache.getRoot();
Fqn fqn = Fqn.fromString(propertyName);
Node node = root.addChild(fqn);
node.put("value", value);
node.put("created", new Long(new java.util.Date().getTime()));