[JBoss Cache: Core Edition] - Re: JDBMCacheLoader location property
by cavani
'#data' is a parameter of location property.
The expected behavior is: when there is no '#databaseName', cluster name is used for this purpose.
The code is just inverted.
At JDBMCacheLoader start method:
(is basically the same for BDBJE)
| // test location
| File location = new File(locationStr);
| if (!location.exists())
| {
| boolean created = location.mkdirs();
| if (!created) throw new IOException("Unable to create cache loader location " + location);
|
| }
| if (!location.isDirectory())
| {
| throw new IOException("Cache loader location [" + location + "] is not a directory!");
| }
|
| /* Parse config string. */
| File homeDir;
| int offset = locationStr.indexOf('#');
| String cacheDbName;
| if (offset >= 0 && offset < locationStr.length() - 1)
| {
| homeDir = new File(locationStr.substring(0, offset));
| cacheDbName = locationStr.substring(offset + 1);
| }
| else
| {
| homeDir = new File(locationStr);
| cacheDbName = cache.getClusterName();
| }
|
my suggestion:
('homeDir' is unnecessary, just use 'location' where it is used)
| /* Parse config string. */
| int offset = locationStr.indexOf('#');
| String cacheDbName;
| if (offset >= 0 && offset < locationStr.length() - 1)
| {
| cacheDbName = locationStr.substring(offset + 1);
| locationStr = locationStr.substring(0, offset);
| }
| else
| {
| cacheDbName = cache.getClusterName();
| }
|
| // test location
| File location = new File(locationStr);
| if (!location.exists())
| {
| boolean created = location.mkdirs();
| if (!created) throw new IOException("Unable to create cache loader location " + location);
|
| }
| if (!location.isDirectory())
| {
| throw new IOException("Cache loader location [" + location + "] is not a directory!");
| }
|
Thanks,
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4192418#4192418
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4192418
17 years, 5 months
[Persistence, JBoss/CMP, Hibernate, Database] - Entity and second_lecel_cache in JBoss AS 5
by jimmyw83
I have big problems to enable entity cache with hibernate and jbosscache in JBoss 5.0.0.
The biggest problem is that i dont know how to monitor my cache.
I have a EJB project with entity-beans and remote facades to manage persistence.
And im only trying to setup a local-machine entity cache, and hopefully a second_level_cache aswell.
I set the property of hibernate.cache.region.factory_class to org.hibernate.cache.jbc2.MultiplexedJBossCacheRegionFactory in persistence.xml
And when i deploy the project, everything looks okay.
How do i log when hibernate cache makes the decision of putting entitys and querys got, to the cache.
And how can i reach the cache and see whats in it?
Is there any other source then persitence.xml you need to change to enable cache?
My persitence.xml look like this
| <properties>
| <property name="hibernate.show_sql" value="false"/>
| <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/>
|
| <property name="hibernate.cache.region.factory_class" value="org.hibernate.cache.jbc2.MultiplexedJBossCacheRegionFactory"/>
| <property name="hibernate.cache.use_query_cache" value="true"/>
| <property name="hibernate.cache.use_second_level_cache" value="true"/>
| <property name="hibernate.cache.region.jbc2.query.localonly" value="true"/>
| <property name="hibernate.current_session_context_class" value="jta"/>
| -- snip --
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4192403#4192403
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4192403
17 years, 5 months
[JBoss Cache: Core Edition] - searchable, pull-based cache solution
by dworq
His,
If anyone could please suggest, if JBossCache would be an appropriate solution in the following case?
I am looking for a distributable cache that could be asynchronously propagated to the remote clients (over internet, no vpn available).
The challenge is, to have pull-based updates to clients (that is, the clients should establish connection to be able work behind a firewall) that should maintain the latest state of their local cache based on the changes on the server.
And the second thing is to have this cache searchable:
- jofti seems not to support the last versions of JBossCache Core and especially POJO (its website is neither available at the moment);
- JBossCache Searchable Edition is based on full-text search which is inappropriate for the project because of speed and size concerns.
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4192393#4192393
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4192393
17 years, 5 months