[jboss-user] [JBoss Cache] - JBoss cache configuration

Andriy Samulyak do-not-reply at jboss.com
Thu Oct 28 04:14:46 EDT 2010


Andriy Samulyak [http://community.jboss.org/people/a.samulyak] created the discussion

"JBoss cache configuration"

To view the discussion, visit: http://community.jboss.org/message/568777#568777

--------------------------------------------------------------
Can ynyone help me with configuring jboss cache to store data in DB.

I added custom configuration to 'jboss-cache-manager-jboss-beans.xml':


<entry>
        <key>custom-cache</key>
        <value>
            <bean name="WCCache" class="org.jboss.cache.config.Configuration">
                <property name="nodeLockingScheme">PESSIMISTIC</property>
                <property name="isolationLevel">REPEATABLE_READ</property>
                <property name="cacheMode">REPL_ASYNC</property>
                <property name="lockParentForChildInsertRemove">true</property>
                <property name="lockAcquisitionTimeout">15000</property>
                <property name="evictionConfig">
                    <bean class="org.jboss.cache.config.EvictionConfig">
                        <property name="wakeupInterval">5000</property>
                        <property name="defaultEvictionRegionConfig">
                            <bean class="org.jboss.cache.config.EvictionRegionConfig">
                                <property name="regionName">/</property>
                                <property name="evictionAlgorithmConfig">
                                    <bean class="org.jboss.cache.eviction.LRUAlgorithmConfig">
                                        <property name="maxNodes">10000</property>
                                        <property name="timeToLive">0</property>
                                        <property name="maxAge">0</property>
                                    </bean>
                                </property>
                            </bean>
                        </property>
                    </bean>
                </property>
                <property name="cacheLoaderConfig">
                    <bean class="org.jboss.cache.config.CacheLoaderConfig">
                        <property name="passivation">true</property>
                        <property name="shared">false</property>

                        <property name="individualCacheLoaderConfigs">
                            <list>
                                <bean class="org.jboss.cache.loader.JDBCCacheLoaderConfig">
                                    <property name="datasourceName">java:/DefaultDS</property>
                                    <property name="nodeType">longblob</property>
                                    <property name="async">false</property>
                                    <property name="fetchPersistentState">true</property>
                                    <property name="purgeOnStartup">false</property>
                                    <property name="ignoreModifications">false</property>
                                </bean>
                            </list>
                        </property>
                    </bean>
                </property>
            </bean>
        </value>
    </entry>


the problem is that DataTource deploys after cache start, so while chache deploy I receive error that DS is not boud.

*Is there any way to make my cache configuration start after DS is delpoyed?*

Thanks
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/568777#568777]

Start a new discussion in JBoss Cache at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2052]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20101028/45bf5ead/attachment.html 


More information about the jboss-user mailing list