-->
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: Hibernate and WSAD
PostPosted: Mon Jan 19, 2004 12:47 pm 
Newbie

Joined: Sun Jan 18, 2004 10:00 am
Posts: 3
Does anyone has a *WORKING* hibernate.cfg.xml file that can be used to run Hibernate under WSAD 5.1.1 including the use of datasource and JTA transactions, so that I can replace the stupid CMP Entity beans by a combination of stateless session beans and persistance using Hibernate

thank you in advance


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jan 27, 2004 5:25 pm 
Newbie

Joined: Wed Sep 17, 2003 9:02 pm
Posts: 13
Here is an working configuration file. Please change the italic and underlined information to suit your needs:

<?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 name="sessionfactoryname">

<!-- properties -->

<!-- ******************************************************************************* -->
<!-- uncomment this section to use the data source services as defined by WebSphere -->
<!-- ******************************************************************************* -->
<property name="connection.datasource">datasourcename</property>

<!-- ******************************************************************************* -->

<!-- ******************************************************************************* -->
<!-- JNDI and Dialect Properties -->
<!-- ******************************************************************************* -->
<property name="jndi.url">IIOP://server:port/</property>
<property name="jndi.class">com.ibm.websphere.naming.WsnInitialContextFactory</property>
<property name="dialect">net.sf.hibernate.dialect.OracleDialect</property>

<!-- ******************************************************************************* -->
<!-- Miscellaneous properties -->
<!-- ******************************************************************************* -->
<property name="show_sql">true</property>
<property name="use_outer_join">true</property>
<property name="query.imports">net.sf.hibernate.test, net.sf.hibernate.eg</property>
<property name="jdbc.use_streams_for_binary">true</property>
<property name="jdbc.batch_size">0</property>

<!-- mapping files -->

<mapping resource="TABLE.hbm.xml"/>
<mapping resource="SQLFILE.sql.hbm.xml"/>

</session-factory>

</hibernate-configuration>


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.