2 Replies Latest reply on Oct 11, 2012 6:12 AM by Prabhakar reddy Komatreddy

    Can we configure ehcache provider details in jboss 7 datasource?

    Prabhakar reddy Komatreddy Newbie

      Hello,

       

      In my application, i am using hibernate, mysql, ehcache.

       

      The below is hibernate config file.

      hibernate.cfg.xml

      -------------------------

      <?xml version='1.0' encoding='UTF-8'?>

      <!DOCTYPE hibernate-configuration PUBLIC

      "-//Hibernate/Hibernate Configuration DTD 3.0//EN"

      "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">

       

      <hibernate-configuration>

      <session-factory>

      <property name="connection.driver_class">oracle.jdbc.driver.OracleDriver

      </property>

      <property name="connection.url">jdbc:oracle:thin:@www.java4s.com:1521:XE</property>

      <property name="connection.username">system</property>

      <property name="connection.password">admin</property>

       

      <property name="cache.provider_class">org.hibernate.cache.EhCacheProvider</property>

       

      <property name="dialect">org.hibernate.dialect.OracleDialect</property>

      <property name="show_sql">true</property>

      <property name="hbm2ddl.auto">update</property>

       

      <mapping resource="Product.hbm.xml"></mapping>

      </session-factory>

      </hibernate-configuration>

       

      Now i am creating datasource in jboss 7, and i would like to move the ehcache configuration into that datasource.

       

      Is it possible to configure application related stuff in jboss like configuring ehcache provider details in datasource?

       

      Can anybody discuss this, please.

       

      Thanks in advance.