[JBoss JIRA] Created: (JBCACHE-1053) RmiCacheServer thinks it can create a mbean proxy to a CacheImpl
by Brian Stansberry (JIRA)
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
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
19 years, 2 months
[JBoss JIRA] Created: (JBRULES-850) Cannot bind variable to unconstrained field
by Michael Anstis (JIRA)
Cannot bind variable to unconstrained field
-------------------------------------------
Key: JBRULES-850
URL: http://jira.jboss.com/jira/browse/JBRULES-850
Project: JBoss Rules
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: drools-brms
Reporter: Michael Anstis
Assigned To: Mark Proctor
Sometimes it is necessary to bind variables to fields in the LHS without constraining them. The binding then being used elsewhere perhaps in the RHS within an expression. The BRMS does not allow for this - fields must be constrained. Perhaps simply adding an extra option in the operator drop-down ("is equal to", "is not equal to") for "any" is the quickest workaround?
Requirement
rule "rule"
when
ObjectA( $v : value )
then
System.out.println($v * 1.5 + 100);
end
Generated DRL
rule "rule"
when
ObjectA( $v : value null null )
then
System.out.println($v * 1.5 + 100);
end
--
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
19 years, 2 months
[JBoss JIRA] Created: (JBCACHE-1058) Cache lifecycle methods can be invoked twice
by Brian Stansberry (JIRA)
Cache lifecycle methods can be invoked twice
--------------------------------------------
Key: JBCACHE-1058
URL: http://jira.jboss.com/jira/browse/JBCACHE-1058
Project: JBoss Cache
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Affects Versions: 2.0.0.CR1
Reporter: Brian Stansberry
Assigned To: Brian Stansberry
Fix For: 2.0.0.CR2
The separation of the CacheJmxWrapper from the Cache itself creates an inherent risk of invoking lifecycle methods twice in a microcontainer environment. For example:
1) MC constructs a Cache.
2) MC injects Cache into a CacheJmxWrapper, registers wrapper in JMX.
3) MC sees Cache exposes create() so it calls Cache.create().
4) MC see CacheJmxWrapper exposes create() so it calls CacheJmxWrapper.create().
5) CacheJmxWrapper.create() passes the call on to Cache.create(), so Cache.create() is called twice.
To deal with that, I coded CacheJmxWrapper so it wouldn't pass a create() call on to the wrapped cache if the cache was dependency injected. Then added JBCACHE-1047 as a help to people doing the above programatically who wouldn't blindly do step #3 above like the MC will.
But, all that's no good, because in the microcontainer case, since CacheJmxWrapper doesn't pass lifecycle calls through to the cache, user's can't create/start/stop/destroy the underlying cache via JMX.
A better solution is to either:
1) Have Cache expose information about what state it is in in terms of lifecycle transitions. CacheJmxWrapper then decides whether to pass the call on to Cache based on that state (e.g. don't pass on a create() call if the Cache is created or started).
2) Have Cache track information about what state it is in in terms of lifecycle transitions. Cache itself ignores redundant lifecycle calls.
I suppose #2 is better as it's better encapsulated. Either one really depends on doing JBCACHE-928.
--
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
19 years, 2 months