[jboss-user] [JBoss Cache: Core Edition] - Replication, CacheMarshaller, Region

ekobir do-not-reply at jboss.com
Wed May 13 12:21:21 EDT 2009


Hi All

As I would like to store some custom  externalizable classes in the cache, i created  region on the cache. But it didnt help me not to get ClassNotFoundException.

Scenario exactly as explained in faq.
[url]
http://www.jboss.org/file-access/default/members/jbosscache/freezone/docs/3.0.3.GA/faq_en/html_single/index.html#d0e666
[/url]

 I'm using JBoss EAP 5.0.0 (Only supported version available). It uses jbosscache 3.0,3GA.  My jboss-beans.xml file under META-INF of ear file. So when class is loaded, 
cache will be created on that server.

My Question is

What is the best way for handling class loader problem? 
Do I need to write a Marshaller from scratch or is there any delegation available for application to provide class loader?



please find cache configuration below. 

  | <!-- First we create a Configuration object for the cache -->
  |     <bean name="ConfigurationCacheConfig"
  |          class="org.jboss.cache.config.Configuration">
  |              <!-- Externally injected services -->
  |         <property name="runtimeConfig">
  |             <bean class="org.jboss.cache.config.RuntimeConfig">
  |                 <property name="transactionManager">
  |                     <inject bean="jboss:service=TransactionManager"
  |                        property="TransactionManager"/>
  |                 </property>
  |                 <property name="muxChannelFactory">
  |                     <inject bean="JChannelFactory"/>
  |                 </property>
  |             </bean>
  |         </property>
  | 
  |         <property name="multiplexerStack">udp</property>
  |         <property name="clusterName">
  |             ${jboss.partition.name:DefaultPartition}-ConfigurationCache
  |         </property>
  |         <property name="nodeLockingScheme">OPTIMISTIC</property>
  |         <property name="isolationLevel">NONE</property>
  |         <property name="cacheMode">REPL_SYNC</property>
  |         <property name="stateRetrievalTimeout">15000</property>
  |         <property name="syncReplTimeout">20000</property>
  |         <property name="lockAcquisitionTimeout">15000</property>
  |         <property name="exposeManagementStatistics">true</property>
  | 
  |         <property name="cacheLoaderConfig">
  |             <bean class="org.jboss.cache.config.CacheLoaderConfig">
  |                    <!-- Do not change these TODO it was true -->
  |                 <property name="passivation">false</property>
  |                 <property name="shared">false</property>
  | 
  |                 <property name="individualCacheLoaderConfigs">
  |                     <list>
  |                         <bean class="org.jboss.cache.loader.FileCacheLoaderConfig">
  |                            <!-- Where passivated sessions are stored -->
  |                             <property name="location">${jboss.server.data.dir}${/}session</property>
  |                            <!-- Do not change these -->
  |                             <property name="async">false</property>
  |                             <property name="fetchPersistentState">true</property>
  |                             <property name="purgeOnStartup">true</property>
  |                             <property name="ignoreModifications">false</property>
  |                             <property name="checkCharacterPortability">false</property>
  |                         </bean>
  |                     </list>
  |                 </property>
  |             </bean>
  |         </property>
  |     </bean>
  | 
  |    <!-- Factory to build the Cache. -->
  |     <bean name="DefaultCacheFactory" class="org.jboss.cache.DefaultCacheFactory">
  |         <constructor factoryClass="org.jboss.cache.DefaultCacheFactory"
  |                    factoryMethod="getInstance" />
  |     </bean>
  |    <!--The cache itself-->
  |     <bean name="ConfigurationCache" class="org.jboss.cache.Cache">
  |         <constructor factoryMethod="createCache">
  |             <factory bean="DefaultCacheFactory"/>
  |           <parameter class="org.jboss.cache.config.Configuration"><inject bean="ConfigurationCacheConfig"/></parameter>
  |           <parameter class="boolean">false</parameter>
  |         </constructor>
  |     </bean>
  | 

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4230898#4230898

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4230898



More information about the jboss-user mailing list