I am not sure how to configure ecache with my Hibernate JBoss service. The documentation at
http://www.hibernate.org/66.html has helped me get the service running just fine, but I am not sure how to enable ecache and specify usage. I am using Hibernate 2.1.3.
Here is my jboss-service.xml file and my best guess at how to enable caching in the mbean (<attribute name="CacheUsage">read-write</attribute>). But this does not seem to work. Should I be using a separate ecache.xml file? If so, is there an example online that works with the hibernate.sar?
Thanks in advance.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE server>
<server>
<mbean code="net.sf.hibernate.jmx.HibernateService" name="jboss.jca:service=TrialBuilderHibernate">
<depends>jboss.jca:service=RARDeployer</depends>
<depends>jboss.jca:service=LocalTxCM,name=TBOracleDS</depends>
<attribute name="MapResources">
com/novartis/edms/tb/entities/Actobj.hbm.xml,
com/novartis/edms/tb/entities/CheckOutTrial.hbm.xml,
com/novartis/edms/tb/entities/Choice.hbm.xml,
com/novartis/edms/tb/entities/ChoiceList.hbm.xml,
com/novartis/edms/tb/entities/ChoiceLists.hbm.xml,
com/novartis/edms/tb/entities/Evaluation.hbm.xml,
com/novartis/edms/tb/entities/Field.hbm.xml,
com/novartis/edms/tb/entities/RunField.hbm.xml,
com/novartis/edms/tb/entities/FontObj.hbm.xml,
com/novartis/edms/tb/entities/RuleBook.hbm.xml,
com/novartis/edms/tb/entities/Rule.hbm.xml,
com/novartis/edms/tb/entities/Page.hbm.xml,
com/novartis/edms/tb/entities/SubPage.hbm.xml,
com/novartis/edms/tb/entities/PageLite.hbm.xml,
com/novartis/edms/tb/entities/PublishedTrial.hbm.xml,
com/novartis/edms/tb/entities/Trial.hbm.xml,
com/novartis/edms/tb/entities/TrialLite.hbm.xml,
com/novartis/edms/tb/entities/CustUserParm.hbm.xml,
com/novartis/edms/tb/entities/StudyUserParm.hbm.xml,
com/novartis/edms/tb/entities/Valobj.hbm.xml,
com/novartis/edms/tb/entities/Visit.hbm.xml,
com/novartis/edms/tb/entities/VisitPage.hbm.xml
</attribute>
<attribute name="JndiName">java:/HibernateFactory</attribute>
<attribute name="Datasource">java:/TBOracleDS</attribute>
<attribute name="Dialect">net.sf.hibernate.dialect.OracleDialect</attribute>
<!-- Use the default value. attribute name="UseOuterJoin">true</attribute-->
<attribute name="ShowSql">false</attribute>
<attribute name="UserTransactionName">UserTransaction</attribute>
<attribute name="TransactionStrategy">net.sf.hibernate.transaction.JTATransactionFactory</attribute>
<attribute name="TransactionManagerLookupStrategy">net.sf.hibernate.transaction.JBossTransactionManagerLookup</attribute>
<attribute name="CacheProvider">net.sf.ehcache.hibernate.Provider</attribute>
<attribute name="CacheUsage">read-write</attribute>
</mbean>
</server>