0 Replies Latest reply on Dec 23, 2005 2:46 AM by Alex B

    Hibernate & rg.hibernate.cache. JndiBoundTreeCacheProvider

    Alex B Newbie

      I am failing to use TreeCache with Hibernate in jboss 4.0.3 sp1

      I successfully deployed boss.cache:service=TreeCache as mbean
      After that I registered it under jndi name MyCache

      <server>
       <mbean
       code="org.jboss.invocation.jrmp.server.JRMPProxyFactory"
       name="mydomain:service=proxyFactory,type=jrmp,target=factory">
       <attribute
       name="InvokerName">jboss:service=invoker,type=jrmp</attribute>
       <attribute
       name="TargetName">jboss.cache:service=TreeCache</attribute>
      
       <attribute name="JndiName">MyCache</attribute> <attribute
       name="InvokeTargetMethod">true</attribute> <attribute
       name="ExportedInterface">org.jboss.cache.TreeCacheMBean</attribute>
       <attribute name="ClientInterceptors"> <iterceptors>
       <interceptor>org.jboss.proxy.ClientMethodInterceptor</interceptor>
       <interceptor>org.jboss.proxy.SecurityInterceptor</interceptor>
       <interceptor>org.jboss.invocation.InvokerInterceptor</interceptor>
       </iterceptors> </attribute>
       <depends>jboss:service=invoker,type=jrmp</depends>
       <depends>boss.cache:service=TreeCache</depends>
       </mbean>
      </server>
      


      I specified for Hibernate mbean
      <mbean code="org.jboss.hibernate.jmx.Hibernate" name="jboss.har:service=ThunderSMS">
       <attribute name="DatasourceName">java:/SmsFactoryDS</attribute>
       <attribute name="SessionFactoryName">java:/hibernate/ThunderSMS</attribute>
       <attribute name="Dialect">org.hibernate.dialect.PostgreSQLDialect</attribute>
       <attribute name="CacheProviderClass">org.hibernate.cache. JndiBoundTreeCacheProvider</attribute>
       <attribute name="DeployedTreeCacheObjectName">MyCache</attribute>
       <attribute name="ShowSqlEnabled">true</attribute>
       <attribute name="QueryCacheEnabled">true</attribute>
       </mbean>
      </server>
      


      Unfortunately during deployment I get following exception
      org.jboss.util.NestedRuntimeException: Key properties cannot be empty; - nested throwable: (javax.management.MalformedObjectNameException: Key properties cannot be empty)
      


      Could anyone advice me anything or just provide with some existing example ?

      thanx
      Alex