[JBoss Cache: Core Edition] - Custom Eviction Policy and JDBC Cache loader
by jorgemoralespou_2
I want to achive this behaviour:
Have a cache with a JDBCCacheLoade for secondary storage
Have some regions configured to evict nodes, and some to remove
Only have in secondary storage nodes being evicted, once, and only once, they have been evicted
For this, I have done a custom eviction Policy to remove data from cache, as related in here. I have configured a default eviction Policy for the cache, and region eviction policies for different regions, if they have to bee persisted with a normal eviction policy, if they have to be removed with a custom remove policy.
What I experience is that my data is being written to secondary storage as soon as I write into cache, and once the eviction work runs, it removes data from database that has the custom remove policy.
Question is:
How can I configure caches, to only persist when eviction policy is run?
Cache version is a custom patched JBC1.4.1.SP9.
Here is my config.
| <server>
| <classpath codebase="./lib" archives="jboss-cache.jar, jgroups.jar" />
|
| <mbean code="com.xxx.cache.core.mbean.ServiceDataCacheWithListener"
| name="jboss.cache:service=XXXServicesDataCache">
|
| <depends>jboss:service=Naming</depends>
| <depends>
| jboss.jca:name=jdbc/somservices,service=DataSourceBinding
| </depends>
| <attribute name="IsolationLevel">NONE</attribute>
| <attribute name="CacheMode">REPL_ASYNC</attribute>
| <attribute name="UseReplQueue">false</attribute>
| <attribute name="ReplQueueInterval">0</attribute>
| <attribute name="ReplQueueMaxElements">0</attribute>
| <attribute name="ClusterName">
| SOMServicesCache-Cluster
| </attribute>
| <attribute name="ClusterProperties">file:///opt/cache-config.xml</attribute>
| <attribute name="FetchInMemoryState">${cache.service-data.fetch-in-memory:true}</attribute>
| <attribute name="InitialStateRetrievalTimeout">${cache.service-data.state-retrieval-timeout:15000}</attribute>
| <attribute name="SyncReplTimeout">2000</attribute>
| <attribute name="LockAcquisitionTimeout">10000</attribute>
| <attribute name="EvictionPolicyClass">
| org.jboss.cache.eviction.LRUPolicy
| </attribute>
| <attribute name="EvictionPolicyConfig">
| <config>
| <attribute name="wakeUpIntervalSeconds">30</attribute>
| <region name="/_default_">
| <attribute name="maxNodes">100000</attribute>
| <attribute name="timeToLiveSeconds">86400</attribute>
| </region>
| </config>
| </attribute>
| <attribute name="UseRegionBasedMarshalling">true</attribute>
| <attribute name="InactiveOnStartup">false</attribute>
| <attribute name="CacheLoaderConfiguration">
| <config>
| <passivation>false</passivation>
| <preload>/</preload>
| <shared>true</shared>
| <cacheloader>
| <class>
| org.jboss.cache.loader.ClusteredCacheLoader
| </class>
| <properties>timeout=30000</properties>
| <async>true</async>
| <fetchPersistentState>false</fetchPersistentState>
| <ignoreModifications>false</ignoreModifications>
| </cacheloader>
| <cacheloader>
| <class>org.jboss.cache.loader.MyJDBCTimestampCacheLoader</class>
| <properties>
| cache.jdbc.datasource=java:jdbc/services
| cache.jdbc.table.name=service_data
| cache.jdbc.table.create=true
| cache.jdbc.table.drop=false
| cache.jdbc.table.primarykey=service_data_pk
| cache.jdbc.fqn.column=fqn
| cache.jdbc.fqn.type=varchar(255)
| cache.jdbc.node.column=node
| cache.jdbc.node.type=blob
| cache.jdbc.parent.column=parent
| cache.jdbc.timestamp.column=timestamp
| cache.jdbc.timestamp.type=timestamp
| </properties>
| <async>true</async>
| <fetchPersistentState>true</fetchPersistentState>
| <ignoreModifications>false</ignoreModifications>
| </cacheloader>
| </config>
| </attribute>
| </mbean>
| </server>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4174053#4174053
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4174053
17 years, 7 months
JBoss AS vs JBoss Web Server
by Humphrey, Keith # Atlanta
Can someone point me in the right direction? I am new to JBoss. Do I
need to have a web server if I am running JBoss AS? If so, why?
Can forward me a link explaining?
Thanks,
Keith Humphrey
RelayHealth Data Services
1564 NE Expressway
Atlanta, GA 30329
404-728-2307 Office
keith.humphrey(a)relayhealth.com
17 years, 7 months
[Beginners Corner] - jBPM + WebServices + EJB 3.0
by cdc08x
Hi all!
I've been searching for days for a good solution to my problem: due to university work, I have to find something able to describe the behaviour of a web-application (server-side) as a graph (state-transitions network), in XML, then translate it as a real application able to make its status evolve through calls to multiple methods, as a WebService. The WebService must be encoded using EJB 3.0 (that is, a Stateless Session Bean, linked somehow to the conversational logic - stateful, of course).
This seems to be something that's covered by Seam 2.0. Is it correct?
I've read its documentation, explored the examples, but, before going on, I would like to be sure I'm on the right way.
Could someone suggest me some useful links to documents / articles / anything about the solution to my question?
Thank you very very much, in advance.
--
Claudio Di Ciccio
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4174051#4174051
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4174051
17 years, 7 months