Hi,
I am using MassIndexer for indexing. While the massindexer works fine with hibernate's default connection provider, when I move to C3P0 connection provider, the application acquire's a lock on index file but does nothing. The application doesn't throw any excpetion either. The request just wait for a long time and I dont see anything happening, its more like a thread having acquired lock but doing nothing on it. Any idea what would be possible prob ?
Code:
FullTextSession ftSession = SessionUtil.getFullTextSessionInstance();
ftSession.getTransaction().begin();
try {
ftSession.createIndexer(Employee.class)
.batchSizeToLoadObjects(100)
.cacheMode(CacheMode.IGNORE)
.threadsToLoadObjects(10)
.threadsForSubsequentFetching(25)
.startAndWait();
} catch (InterruptedException e) {
e.printStackTrace();
log.error("InterruptedException in "+CLASS_NAME+":indexRecord() >>", e);
}
Configuration Fields
Code:
<property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property name="hibernate.connection.url">jdbc:oracle:thin:@test:1522:Domain</property>
<property name="hibernate.connection.username">test</property>
<property name="hibernate.connection.password">pwd</property>
<property name="hibernate.connection.pool_size">10</property>
<property name="connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property>
<property name="c3p0.acquire_increment">1</property>
<property name="c3p0.idle_test_period">100</property>
<property name="c3p0.max_size">10</property>
<property name="c3p0.max_statements">0</property>
<property name="c3p0.min_size">5</property>
<property name="c3p0.timeout">1800</property>
<property name="current_session_context_class">thread</property>
<property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>
<property name="show_sql">true</property>
<property name="dialect">org.hibernate.dialect.Oracle10gDialect</property>
<property name="hibernate.hbm2ddl.auto">update</property>
<!-- Hibernate search configuration -->
<property name="hibernate.search.default.directory_provider">org.hibernate.search.store.FSDirectoryProvider</property>
<property name="hibernate.search.default.indexName">Index</property>
<property name="hibernate.search.default.indexBase">/indexes</property>
<property name="hibernate.search.default.batch.merge_factor">10</property>
<property name="hibernate.search.default.batch.max_buffered_docs">10</property>