[jboss-jira] [JBoss JIRA] Updated: (JBCACHE-1053) RmiCacheServer thinks it can create a mbean proxy to a CacheImpl
Manik Surtani (JIRA)
jira-events at lists.jboss.org
Tue May 15 12:43:52 EDT 2007
[ http://jira.jboss.com/jira/browse/JBCACHE-1053?page=all ]
Manik Surtani updated JBCACHE-1053:
-----------------------------------
Fix Version/s: 2.0.0.CR2
RMICacheServer/Loader should be deprecated/removed.
Will fix for TCP though.
> RmiCacheServer thinks it can create a mbean proxy to a CacheImpl
> ----------------------------------------------------------------
>
> Key: JBCACHE-1053
> URL: http://jira.jboss.com/jira/browse/JBCACHE-1053
> Project: JBoss Cache
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 2.0.0.CR1
> Reporter: Brian Stansberry
> Assigned To: Manik Surtani
> Fix For: 2.0.0.CR2
>
>
> RmiCacheServer.start() has this:
> MBeanServer server = JmxUtil.getMBeanServer();
> if (cacheName != null && server != null)
> {
> cache = (CacheImpl) MBeanServerInvocationHandler.newProxyInstance(server, cacheName, CacheImpl.class, false);
> }
> There won't be anything registered in JMX that you can proxy with the CacheImpl API.
> This could work:
> MBeanServer server = JmxUtil.getMBeanServer();
> if (cacheName != null && server != null)
> {
> CacheJmxWrapperMBean wrapper = (CacheJmxWrapperMBean ) MBeanServerInvocationHandler.newProxyInstance(server, cacheName, CacheJmxWrapperMBean.class, false);
> cache = (CacheImpl) wrapper.getCache();
> }
> In this case, cache is no longer a JMX proxy though, it's a ref to the underlying cache.
> Probably better is just to get rid of this lookup and require injection of the CacheImpl or the CacheJmxWrapper.
> Also, it would be nice if RemoteTreeCacheImpl could delegate to Cache instead of CacheImpl. Then there's no need to cast the wrapper.getCache() call and it's simpler to do dependency injection.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list