Hi, 

this question concerns the JBoss Cache and Hibernate.

Hibernate have a "limitation" that I would like to overcome.

Hibernate cannot use the Same Schma for 2 different databases. Using C-JDBC is 
not the answer either.

See:
http://forum.hibernate.org/viewtopic.php?t=937847
http://forum.hibernate.org/viewtopic.php?t=938654&highlight=schema+multiple+database

I read in the JBoss faq http://docs.jboss.org/jbcache/FAQ.html and in the 
documentation that the JBoss cache can use a Cache Loader (since 1.1) to 
persist its cache objects (FileCacheLoader, BdcjeCacheLoader and 
JDBCCacheLoader).

anonymous wrote : 
  | JBossCache 1.2 released:
  | - JDBC CacheLoader: allows to load/store data from DB
  | - Common dta transfer format: this allows for replication between different
  | CacheLoaders, e.g. FileCacheLoader and JDBCCacheLoader. Also
  | enables replication e.g. between MySQL and Oracle
  | (still needs more testing though) 

Would it be possible that 2 SessionFactory (each connect to a different 
physical DB, with a different schma: Schema 1 on DB1:Oracle, Schema 2 on 
DB2:Sybase) use the SAME cache loader? I means that if a Parent table is on 
Sybase, the Children data (on Oracle) could be retreived in memory because it 
could have been load in the same cache before?

But from this mail: 
http://forum.hibernate.org/viewtopic.php?t=938654&highlight=schema+multiple+database
 
it seems that it isn't the case.
anonymous wrote : First, no, Hibernate will not be implementing in-memory joins

But if the CacheLoader do the job, could it be possible? I think about 2 
BdcjeCacheLoader for each SessionFactory loading in the same SleepyCat BD?

anonymous wrote : BdbjeCacheLoader: this implementation is based on the 
Sleepycat Java Edition database, a fast and efficient transactional database. 
It uses a single file for the entire store. 
http://www.sleepycat.com/jeforjbosscache for details.

Another options could be, using the JDBCCacheLoader, and cache the DB1:Oracle 
data inside the DB2:Sybase in a extended schema? So, the connection factory on 
DB2:Sybase might have all the data? 

I know this sound tricky to say the less, but could it be feasible by writing a 
CustomClassLoader?

The goal of all this is to simulate a transparent SQL INNER JOIN between two 
physical databases and avoid tousand of "SQL SELECT" on a real DB.

Note that the DB1:Oracle maintain only read-only data (easily cachable) and 
only updated by a batch process each day at 12AM. The DB2:Sybase would be the 
transactinoal (r/w) database.

Thanks for replying

Etienne.
Montreal



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

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


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-Development mailing list
JBoss-Development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to