[jboss-jira] [JBoss JIRA] Commented: (JBCACHE-1001) Stopping standalone JBC (with -Dcom.sun.management.jmxremote) throws javax.management.InstanceNotFoundException: jboss.system:service=ServiceController

Galder Zamarreno (JIRA) jira-events at lists.jboss.org
Thu Mar 8 11:49:22 EST 2007


    [ http://jira.jboss.com/jira/browse/JBCACHE-1001?page=comments#action_12355512 ] 
            
Galder Zamarreno commented on JBCACHE-1001:
-------------------------------------------

Brian,

Indeed, Hibernate create the cache instances themselves:

OptimisticTreeCacheProvider:
....
cache = new org.jboss.cache.TreeCache();
PropertyConfigurator config = new PropertyConfigurator();
config.configure( cache, resource );
TransactionManagerLookup transactionManagerLookup =
....

so they should call startService()/stopService()

However, if they do this, they've never gonna get this cache 
registered in MBeanServer, even if it runs inside AS.

I guess it would then be customer's responsability to make
sure that the cache config file ends in *-service.xml and they 
make use of:

<property name="cache.provider_configuration_file_resource_path">hb-cache-service.xml</property>

The downside of all this is that, in my standalone example, I 
would need to code myself the registration of this cache into the an 
MBeanServer so that later I can use JConsole to inspect it, correct?

> Stopping standalone JBC (with -Dcom.sun.management.jmxremote) throws javax.management.InstanceNotFoundException: jboss.system:service=ServiceController
> -------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: JBCACHE-1001
>                 URL: http://jira.jboss.com/jira/browse/JBCACHE-1001
>             Project: JBoss Cache
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 1.4.1.SP2
>            Reporter: Galder Zamarreno
>         Assigned To: Manik Surtani
>            Priority: Minor
>
> Start a new instance of JBossCache -Dcom.sun.management.jmxremote.
> It registers jboss.cache:service=TreeCache-Cluster but when you stop the cache, it throws this:
> 18:53:58,531  WARN TreeCache:195 - Error in stop jboss.cache:service=TreeCache-Cluster
> javax.management.InstanceNotFoundException: jboss.system:service=ServiceController
>         at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.getMBean(DefaultMBeanServerInterceptor.java:1010)
>         at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:804)
>         at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)
>         at org.jboss.system.ServiceMBeanSupport.stop(ServiceMBeanSupport.java:189)
>         at org.hibernate.cache.OptimisticTreeCacheProvider.stop(OptimisticTreeCacheProvider.java:103)
>         at org.hibernate.impl.SessionFactoryImpl.close(SessionFactoryImpl.java:800)
>         at com.acme.hbcache.events.EventManager.main(Unknown Source)
> I haven't got time to look at this right now, making a note of it so that I can come back to it later.
> I need to try 2.0.

-- 
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