<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    hibernate-jbosscache2 and mvcc issues
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="http://community.jboss.org/people/anandkrish">nithya anand</a> in <i>JBoss Cache</i> - <a href="http://community.jboss.org/message/543483#543483">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>HI,</p><p>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).</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Issues:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>1. Maven dependency conflict:&#160; 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.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>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.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>the following is our persistence.xml</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>&#160;&#160;&#160; &lt;persistence-unit name="abcdb"&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;provider&gt;org.hibernate.ejb.HibernatePersistence&lt;/provider&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;jta-data-source&gt;MySqlDS&lt;/jta-data-source&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;properties&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;property name="hibernate.show_sql" value="false"/&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;property name="hibernate.format_sql" value="false"/&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;property name="hibernate.use_sql_comments" value="false"/&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5InnoDBDialect" /&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;property name="hibernate.connection.useUnicode" value="true"/&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;property name="hibernate.connection.characterEncoding" value="UTF-8"/&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;!-- Caching configuration --&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;property name="hibernate.cache.use_second_level_cache" value="true"/&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;property name="hibernate.cache.region.factory_class" value="org.hibernate.cache.jbc2.MultiplexedJBossCacheRegionFactory"/&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;property name="hibernate.cache.region.jbc2.cfg.shared" value="<span style="color: #ff0000;">blahblah.xml</span>"/&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;property name="hibernate.current_session_context_class" value="jta"/&gt;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; <br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;property name="jboss.entity.manager.jndi.name" value="java:/abcdb"/&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;property name="jboss.entity.manager.factory.jndi.name" value="java:/abcdbfactory"/&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;property name="hibernate.transaction.factory_class" value="org.hibernate.transaction.JTATransactionFactory"/&gt; <br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/&gt;<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/properties&gt;<br/>&#160; &lt;/persistence-unit&gt;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>3. I wanted to provide a config file (even though not mandatory) for my JbossCache configuration to make sure mvcc is turned on.</p><p>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.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Questions:</p><p>1. how can I make sure that my jbosscache is running on mvcc mode.</p><p>2. whats with the "hibernate.cache.region.jbc2.cfg.shared" value="blahblah.xml" file? do we need it at all?</p><p>Please answer my questions.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Thanks,</p><p>Anand.</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/543483#543483">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JBoss Cache at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2052">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>