4 Replies Latest reply on Feb 23, 2009 9:43 AM by Brian Stansberry


    Ignacio Alvarez Newbie

      Hi all,

      I'm trying to setup a cache to test the performance of JBC 3.0 within JBoss AS 5.0. I'm quite a newbie, so take it easy with me ;-)

      Application to be used is SPECjAppServer 2004, which uses CMP2.0 EBs. These are the steps I followed:

      1.- I created a cache config in jboss-cache-manager-jboss-beans.xml file. No problem with that.
      2.- I created a new file under deploy/cluster SPECjAppServer-jboss-beans.xml with the following config:

      <?xml version="1.0" encoding="UTF-8"?>
      <deployment xmlns="urn:jboss:bean-deployer:2.0">
       <bean name="SPECjAppServerCache" class="org.jboss.cache.jmx.CacheJmxWrapper">
       <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.cache:service=SPECjAppServerTreeCache", exposedInterface=org.jboss.cache.jmx.CacheJmxWrapperMBean.class, registerDirectly=true)</annotation>
       <parameter><inject bean="SPECjAppServerCacheConfig"/></parameter>

      3.- At startup time I get the error:
      [exec] 18:39:12,843 ERROR [ProfileServiceBootstrap] Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
      [exec] *** CONTEXTS IN ERROR: Name -> Error
      [exec] SPECjAppServerCache -> java.lang.IllegalArgumentException: Wrong arguments. new for target java.lang.reflect.Constructor expected=[org.jboss.cache.Cache] actual=[org.jboss.cache.config.Configuration]

      The config is based on what I read in the JBC 3.0.0 user guide (by the way, the pdf misses parts of the code samples, although they are indeed in the html).

      I downloaded the jboss cache code (3.0.2) and org.jboss.cache.jmx.CacheJmxWrapper expects a cache in its constructor instead of cache config.

      Questions are:
      1.- What am I doing wrong?
      2.- Will I get this way a Cache for the SPECjAppServer Entity Beans?
      3.- CacheJmxWrapper is deprecated as per the source code but in the userguide says this is the preferred approach.
      4.- Also, I don't understand what's to be set on the name of the JMX. I set SPECjAppServerTreeCache.

      Thanks a lot for your help!!