-->
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: Standalone Hibernate Appplication to create lucene index
PostPosted: Fri Aug 13, 2010 9:29 am 
Newbie

Joined: Tue May 19, 2009 4:49 am
Posts: 14
Hi All,

For my application , I need to create a utlity batch file which will create the lucene index file from database (DB2).

I have tried quite a few things, my configuration (hbm xml) looks like :
<property name="connection.url">jdbc:db2://appDB:50000/DBDATA</property>
<property name="connection.username">user</property>
<property name="connection.password">password</property>
<property name="connection.driver_class">com.ibm.db2.jcc.DB2Driver</property>
<property name="hibernate.dialect">org.hibernate.dialect.DB2Dialect</property>
<property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
<property name="hibernate.transaction.manager_lookup_class"> org.hibernate.transaction.WebSphereExtendedJTATransactionLookup</property>
<property name="jta.UserTransaction">java:comp/UserTransaction</property>
<property name="hibernate.connection.release_mode">after_statement</property>
<property name="hibernate.transaction.auto_close_session">true</property>
<property name="hibernate.search.default.indexBase">C:/luceneIndexes</property>

I am not very much sure if I can use JTA transacations here . But if I switch to JDBC transaction , the hibernate code to populate indexes fails,as I am using ScrollableResults.

Any help will be appreciated .TIA.


Top
 Profile  
 
 Post subject: Re: Standalone Hibernate Appplication to create lucene index
PostPosted: Sun Aug 15, 2010 9:32 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hi, usage of JTATransactions is recommended even in standalone applications.
As it's standalone, you should not define a websphere transaction lookup.

_________________
Sanne
http://in.relation.to/


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.