nithya anand [
http://community.jboss.org/people/anandkrish] created the discussion
"hibernate-jbosscache2 and mvcc issues"
To view the discussion, visit:
http://community.jboss.org/message/543483#543483
--------------------------------------------------------------
HI,
We opted to implement JbossCache-core-3.x on Local (means not on cluster) since it comes
with mvcc. We were on jboss 4.2.3 (with hibernate 3.2) and realized that jbosscache-core-
3 needs hibernate 3.3. So we upgraded to Jboss 5 which comes with jbossCache-core - 3.0.1,
Hibernate 3.3.1 and hibernate-jbosscache2 (3.3.1).
Issues:
1. Maven dependency conflict: hibernate-jbosscache2 (3.3.1) has a dependency on
jbosscache-core-2.1.1.GA. We found that hibernate-jbosscache2 (3.3.2) has a dependency on
jbosscache-core-3.x.GA, but we didn't want to mess up with the default jars that comes
with JBOSS 5.
2. MVCC: (Caching turned on) Since with all these jar issues I want to make sure that the
cache is working with mvcc turned on. But couldn't find any info on log that says that
mvcc is turned on.
the following is our persistence.xml
<persistence-unit name="abcdb">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>MySqlDS</jta-data-source>
<properties>
<property name="hibernate.show_sql" value="false"/>
<property name="hibernate.format_sql"
value="false"/>
<property name="hibernate.use_sql_comments"
value="false"/>
<property name="hibernate.dialect"
value="org.hibernate.dialect.MySQL5InnoDBDialect" />
<property name="hibernate.connection.useUnicode"
value="true"/>
<property name="hibernate.connection.characterEncoding"
value="UTF-8"/>
<!-- Caching configuration -->
<property name="hibernate.cache.use_second_level_cache"
value="true"/>
<property name="hibernate.cache.region.factory_class"
value="org.hibernate.cache.jbc2.MultiplexedJBossCacheRegionFactory"/>
<property name="hibernate.cache.region.jbc2.cfg.shared"
value="blahblah.xml"/>
<property name="hibernate.current_session_context_class"
value="jta"/>
<property name="jboss.entity.manager.jndi.name"
value="java:/abcdb"/>
<property name="jboss.entity.manager.factory.jndi.name"
value="java:/abcdbfactory"/>
<property name="hibernate.transaction.factory_class"
value="org.hibernate.transaction.JTATransactionFactory"/>
<property name="hibernate.transaction.manager_lookup_class"
value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
</properties>
</persistence-unit>
3. I wanted to provide a config file (even though not mandatory) for my JbossCache
configuration to make sure mvcc is turned on.
But, even if i don't have blahblah.xml on my classpath, it wouldn't complaint. I
don't see any error saying that blahblah.xml is missing.
Questions:
1. how can I make sure that my jbosscache is running on mvcc mode.
2. whats with the "hibernate.cache.region.jbc2.cfg.shared"
value="blahblah.xml" file? do we need it at all?
Please answer my questions.
Thanks,
Anand.
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/543483#543483]
Start a new discussion in JBoss Cache at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]