-->
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: connect the persistence file
PostPosted: Mon Oct 28, 2013 5:46 am 
Newbie

Joined: Thu Oct 24, 2013 4:28 pm
Posts: 5
I created a ejb project and would like to connect the persistence file to my hibernate file how can I do? ? Hibernate file is as follows

<? 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 name="">
  <! - Related to the connection START ->
  <property name="connection.driver_class"> oracle.jdbc.driver.OracleDriver < / property>
  <property name="connection.url"> jdbc : oracle : thin: @ localhost: 1521 : xe < / property>
  <property name="connection.user"> SYSTEM < / property>
  <property name="connection.password"> smurf < / property>
  <property name="connection.pool_size"> 2 < / property>
  <! - Related to the connection END
 Related to hibernate properties START ->
  <property name="show_sql"> true < / property>
  <property name="dialet"> org.hibernate.dialect.OracleDialect < / property>
  
  <property name="hbm2ddl.auto"> update < / property>
  <Mapping resource="it/Product.hbm.xml"/>
  <! - Related to hibernate properties END
 Related to mapping START
 Related to the mapping END - >
 < / session -factory >
</ hibernate- configuration>


Top
 Profile  
 
 Post subject: Re: connect the persistence file
PostPosted: Mon Oct 28, 2013 8:09 am 
Hibernate Team
Hibernate Team

Joined: Fri Sep 09, 2011 3:18 am
Posts: 295
Hi gaiapuffo,

I think you can use the "hibernate.ejb.cfgfile" property in the persistence.xml:
Quote:
<property name="hibernate.ejb.cfgfile" value="/hibernate.cfg.xml" />
.

More details about the configuration using JPA can be found here: http://docs.jboss.org/hibernate/entitymanager/3.6/reference/en/html/configuration.html#setup-configuration
Hope this help.

Cheers,
Davide


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.