-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Yet another startup speed question
PostPosted: Tue Jun 01, 2004 10:34 am 
Newbie

Joined: Sun May 23, 2004 3:37 pm
Posts: 4
Hi all,

I am using v22branch and I am experiencing a long time to startup hibernate. I've read something about serialization implemented in version 2.2 but I don't know if its enabled by default or if I should set some property. I am loading 2 simple one-to-many collection classes.
Is there any improvement in startup speed?

All the code to initialize hibernate and to use it has been generated automatically by Hibernate Synchronizer. AFAIK there should be much difference in speed if I just did my initialization procedures. There is no overhead introduced by Synchronizer.

Here are my hibernate xml files (the attributes are in portuguese, but I guess this is not a problem):

Code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-configuration
    PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
    "http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">

<hibernate-configuration>
   <session-factory>
      <!-- dialect for PostgreSQL -->
      <property name="dialect">net.sf.hibernate.dialect.PostgreSQLDialect</property>

      <!-- local connection properties -->
      <property name="hibernate.connection.url">jdbc:postgresql://fred:5432/cceng</property>
      <property name="hibernate.connection.driver_class">org.postgresql.Driver</property>
      <property name="hibernate.connection.username">cceng</property>
      <property name="hibernate.connection.password">cceng</property>
         
<!--
      <property name="hibernate.connection.provider_class">net.sf.hibernate.connection.C3P0ConnectionProvider</property>
      <property name="hibernate.c3p0.minPoolSize">5</property>
      <property name="hibernate.c3p0.maxPoolSize">20</property>
      <property name="hibernate.c3p0.timeout">1800</property>
      <property name="hibernate.c3p0.max_statement">50</property>
-->
   
      <property name="hibernate.show_sql">true</property>
      <property name="hibernate.use_outer_join">true</property>

      <mapping resource="RecRdv.hbm" />
      <mapping resource="Trecho.hbm" />
   </session-factory>
</hibernate-configuration>


RecRdv.hbm:

Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
   "-//Hibernate/Hibernate Mapping DTD//EN"
   "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" >

<hibernate-mapping package="business">
   <class
      name="RecRdv"
      table="rec_rdv"
   >
      <id
         name="Key"
         type="java.lang.String"
         column="key"
         length="32"
      >
         <generator class="uuid.hex"/>
      </id>
      <property
         name="Identificador"
         column="identificador"
         type="java.lang.String"
         length="30"
         not-null="false"
      />
      <property
         name="Status"
         column="status"
         type="business.types.RecRdv.StatusEnumType"
         not-null="false"
      />
      <property
         name="Gdh"
         column="gdh"
         type="timestamp"
         not-null="false"
         length="8"
      />
      <property
         name="Denominacao"
         column="denominacao"
         type="string"
         not-null="false"
         length="50"
      />
      <property
         name="Extensao"
         column="extensao"
         type="java.lang.Float"
         not-null="false"
      />
      <property
         name="Coordenadas"
         column="coordenadas"
         type="business.types.postgis.MultiPointType"
         not-null="false"
      />
      <set name="Trechos" cascade="all-delete-orphan" lazy="true" inverse="true">
         <key column="rec_rdv_key"/>
         <one-to-many class="Trecho"/>
      </set>
   </class>
</hibernate-mapping>


Trecho.hbm:

Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
   "-//Hibernate/Hibernate Mapping DTD//EN"
   "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd" >

<hibernate-mapping package="business">
   <class
      name="Trecho"
      table="trecho"
   >
      <id
         name="Key"
         type="java.lang.String"
         column="key"
         length="32"
      >
         <generator class="uuid.hex"/>
      </id>

      <property
         name="TipoRodovia"
         column="tipo_rdv"
         type="business.types.Trecho.TipoRodoviaEnumType"
         not-null="false"
         length="4"
      />
      <property
         name="CondicaoMeteorologica"
         column="cond_met"
         type="business.types.Trecho.CondicaoMeteorologicaEnumType"
         not-null="false"
         length="4"
      />
      <property
         name="CondicaoEspecial"
         column="cond_esp"
         type="business.types.Trecho.CondicaoEspecialEnumType"
         not-null="false"
         length="4"
      />
      <property
         name="Coordenadas"
         column="coordenadas"
         type="business.types.postgis.MultiPointType"
         not-null="false"
      />
      <property
         name="TipoFluxo"
         column="tipo_fluxo"
         type="business.types.Trecho.TipoFluxoEnumType"
         not-null="false"
         length="4"
      />
      <property
         name="LarguraAcostamento"
         column="larg_acost"
         type="java.lang.Float"
         not-null="false"
         length="4"
      />
      <property
         name="LarguraPista"
         column="larg_pista"
         type="java.lang.Float"
         not-null="false"
         length="4"
      />
      <property
         name="CaracteristicaTerreno"
         column="caracteristica"
         type="business.types.Trecho.CaracteristicaTerrenoEnumType"
         not-null="false"
         length="4"
      />

      <many-to-one
         name="RecRdv"
         class="RecRdv"
         not-null="true"
      >
         <column name="rec_rdv_key"/>
      </many-to-one>
   </class>
</hibernate-mapping>


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 01, 2004 11:04 am 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
http://www.hibernate.org/194.html - besides if you are using v22branch you should really be able to figure this out yourself by reading the source, as this is not even alpha.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.