6 Replies Latest reply on Sep 28, 2005 6:36 PM by pmckinstry

    Source files of JBossCache

    fredatwork

      Ben,
      See my HBM files , java code and log file :
      HBM:
      <?xml version="1.0"?>
      <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN"
      "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">
      <hibernate-mapping>


      <id name="id" unsaved-value="null" column="ID" type="java.lang.String">


      <many-to-one name="impuesto"
      class="gov.afip.pampa.component.supa.model.ImpuestoEntity"
      column="CODIGO_IMPUESTO"/>
      <many-to-one name="concepto"
      class="gov.afip.pampa.component.supa.model.ConceptoEntity"
      column="CODIGO_CONCEPTO"/>











      </hibernate-mapping>



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

      CODE FILE:


      SessionFactory sessions =
      new Configuration().configure("/META-INF/ctacte-session-factory.cfg.xml")
      .buildSessionFactory();

      Session s = sessions.openSession();

      ICEntity ic = new ICEntity();
      ic.setId("ID_EX");

      s.save(ic);
      s.flush(); // here propagate to L2
      s.close();

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

      Configuration Session

      <?xml version='1.0' encoding='utf-8'?>
      <!DOCTYPE hibernate-configuration PUBLIC
      "-//Hibernate/Hibernate Configuration DTD 2.0//EN"

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

      <hibernate-configuration>

      <!-- a SessionFactory instance listed as /jndi/name -->
      <session-factory>
      <!-- este es datasource para correr con jboss -->
      java:/PampaDS
      true
      true

      net.sf.hibernate.dialect.OracleDialect

      net.sf.hibernate.transaction.JTATransactionFactory

      net.sf.hibernate.transaction.JBossTransactionManagerLookup
      true
      true

      net.sf.hibernate.cache.TreeCacheProvider
      ctacte
      <!-- este es factory para correr unit test -->
      <!--
      develop
      develop
      jdbc:oracle:thin:@10.20.108.187:1521:OCRP
      oracle.jdbc.driver.OracleDriver
      true
      true
      net.sf.hibernate.dialect.OracleDialect
      net.sf.hibernate.cache.OSCacheProvider
      false
      -->


      </session-factory>

      </hibernate-configuration>


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

      Log File


      4:48:07,765 DEBUG [SessionImpl] executing flush
      14:48:07,765 DEBUG [TreeCache] _put(null, "//net/sf/hibernate/cache/UpdateTimestampsCache/SUPA.IC_ENTITY", item, 11051201477)
      14:48:07,765 DEBUG [Node] createChild: fqn=//net/sf/hibernate/cache/UpdateTimestampsCache
      14:48:07,765 DEBUG [LRUPolicy] nodeAdded(): fqn- //net/sf/hibernate/cache/UpdateTimestampsCache
      14:48:07,765 DEBUG [RegionManager] getRegion(): not user-specified region found for this fqn- //net/sf/hibernate/cache/UpdateTimestampsCache will use the global default region
      14:48:07,765 DEBUG [Node] createChild: fqn=//net/sf/hibernate/cache/UpdateTimestampsCache/SUPA.IC_ENTITY
      14:48:07,765 DEBUG [LRUPolicy] nodeAdded(): fqn- //net/sf/hibernate/cache/UpdateTimestampsCache/SUPA.IC_ENTITY
      14:48:07,765 DEBUG [RegionManager] getRegion(): not user-specified region found for this fqn- //net/sf/hibernate/cache/UpdateTimestampsCache/SUPA.IC_ENTITY will use the global default region
      14:48:07,765 DEBUG [LRUPolicy] nodeModified(): redirecting to node visited. fqn- //net/sf/hibernate/cache/UpdateTimestampsCache/SUPA.IC_ENTITY
      14:48:07,765 DEBUG [LRUPolicy] nodeVisited(): fqn- //net/sf/hibernate/cache/UpdateTimestampsCache/SUPA.IC_ENTITY
      14:48:07,765 DEBUG [RegionManager] getRegion(): not user-specified region found for this fqn- //net/sf/hibernate/cache/UpdateTimestampsCache/SUPA.IC_ENTITY will use the global default region
      14:48:07,765 DEBUG [EntityPersister] Inserting entity: [gov.afip.pampa.component.supa.model.ICEntity#ID_EX]
      14:48:07,765 DEBUG [BatcherImpl] about to open: 0 open PreparedStatements, 0 open ResultSets
      14:48:07,765 DEBUG [SQL] insert into SUPA.IC_ENTITY (CODIGO_IMPUESTO, CODIGO_CONCEPTO, PERIODO_DESDE, PERIODO_HASTA, FECHA_DESDE, FECHA_HASTA, ID) values (?, ?, ?, ?, ?, ?, ?)



      Any Help ?

      /Carlos.-