SourceForge.net Logo
Main Overview Wiki Issues Forum Build Fisheye

Welcome, Guest
Guest Settings
Help

Compass Support Forums » Compass » Compass Users

Thread: HibernateTransactionManager timeout

This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 7 - Pages: 1 - Last Post: Nov 28, 2011 1:00 AM Last Post By: clothworld
Doug Shifflett

Posts: 10
Registered: 7/3/08
HibernateTransactionManager timeout
Posted: Aug 11, 2008 2:22 PM
 
  Click to reply to this thread Reply
Is there some way to set the timeout for the HibernateTransactionManager? I am getting the following exception when certain searches are performed that cause a high number of hits.

org.springframework.orm.hibernate3.HibernateSystemException: transaction timeout expired; nested exception is org.hibernate.TransactionException: transaction timeout expired
org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:659)
org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412)
org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:377)
org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:840)
org.austinisd.lp.db.dao.RelatedLessonTeksDao.findByLessonIdAndTeksId(RelatedLessonTeksDao.java:86)
org.austinisd.lp.service.managers.RelatedLessonTeksManager.buildObjectsFromIds(RelatedLessonTeksManager.java:262)
org.austinisd.lp.service.managers.RelatedLessonTeksManager.search(RelatedLessonTeksManager.java:183)
org.austinisd.lp.web.controllers.RelatedTeksController.onSubmit(RelatedTeksController.java:56)
org.springframework.web.servlet.mvc.SimpleFormController.processFormSubmission(SimpleFormController.java:267)
org.springframework.web.servlet.mvc.AbstractFormController.handleRequestInternal(AbstractFormController.java:265)
org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:874)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:808)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:476)
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:441)
javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.austinisd.lp.framework.LoginCheckFilter.doFilter(LoginCheckFilter.java:122)

root cause

org.hibernate.TransactionException: transaction timeout expired
org.hibernate.jdbc.AbstractBatcher.setTimeout(AbstractBatcher.java:449)
org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:435)
org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:366)
org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:105)
org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1561)
org.hibernate.loader.Loader.doQuery(Loader.java:661)
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:223)
org.hibernate.loader.Loader.doList(Loader.java:2147)
org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2026)
org.hibernate.loader.Loader.list(Loader.java:2021)
org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:369)
org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:298)
org.hibernate.impl.SessionImpl.list(SessionImpl.java:1020)
org.hibernate.impl.QueryImpl.list(QueryImpl.java:74)
org.springframework.orm.hibernate3.HibernateTemplate$29.doInHibernate(HibernateTemplate.java:849)
org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:372)
org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:840)
org.austinisd.lp.db.dao.RelatedLessonTeksDao.findByLessonIdAndTeksId(RelatedLessonTeksDao.java:86)
org.austinisd.lp.service.managers.RelatedLessonTeksManager.buildObjectsFromIds(RelatedLessonTeksManager.java:262)
org.austinisd.lp.service.managers.RelatedLessonTeksManager.search(RelatedLessonTeksManager.java:183)
org.austinisd.lp.web.controllers.RelatedTeksController.onSubmit(RelatedTeksController.java:56)
org.springframework.web.servlet.mvc.SimpleFormController.processFormSubmission(SimpleFormController.java:267)
org.springframework.web.servlet.mvc.AbstractFormController.handleRequestInternal(AbstractFormController.java:265)
org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:874)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:808)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:476)
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:441)
javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.austinisd.lp.framework.LoginCheckFilter.doFilter(LoginCheckFilter.java:122)

Here is my configuration info:

<!-- COMPASS START -->
<bean id="compass" class="org.compass.spring.LocalCompassBean">
<property name="resourceLocations">
<list>
<value>classpath:lp.cpm.xml</value>
</list>
</property>
<property name="compassSettings">
<props>
<prop key="compass.engine.connection">tmp/compass</prop>
<prop key="compass.engine.analyzer.default.type">org.apache.lucene.analysis.standard.StandardAnalyzer</prop>
<prop key="compass.engine.analyzer.search.type">org.apache.lucene.analysis.standard.StandardAnalyzer</prop>
<prop key="compass.engine.analyzer.default.stopwords">a, and, the, of</prop>
<prop key="compass.engine.queryParser.default.defaultOperator">OR</prop>
<prop key="compass.transaction.factory">org.compass.spring.transaction.SpringSyncTransactionFactory</prop>
<prop key="compass.transaction.timeout">30</prop>
<prop key="compass.transaction.isolation">lucene</prop>
<prop key="compass.transaction.commitBeforeCompletion">false</prop>

<prop key="compass.engine.optimizer.schedule">true</prop>
<prop key="compass.engine.optimizer.type">org.compass.core.lucene.engine.optimizer.AdaptiveOptimizer</prop>
<prop key="compass.engine.optimizer.adaptive.mergeFactor">20</prop>
<prop key="compass.engine.optimizer.schedule.period">200</prop>
<prop key="compass.engine.optimizer.schedule.daemon">true</prop>
<prop key="compass.engine.optimizer.schedule.fixedRate">false</prop>

<prop key="compass.transaction.lockPollInterval">200</prop>
<prop key="compass.transaction.lockTimeout">100</prop>
<prop key="compass.engine.cacheIntervalInvalidation">-1</prop>
<!-- prop key="compass.engine.store.jdbc.managed">true</prop -->
</props>
</property>
<property name="transactionManager">
<ref local="transactionManager" />
</property>
</bean>
<bean id="hibernateGpsDevice" class="org.compass.gps.device.hibernate.HibernateGpsDevice">
<property name="name"><value>hibernateDevice</value></property>
<property name="sessionFactory"><ref local="sessionFactory" /></property>
<property name="nativeExtractor"><bean class="org.compass.spring.device.hibernate.SpringNativeHibernateExtractor" /></property>
<property name="lifecycleInjector"><ref local="lifecycleInjector"/></property>

</bean>

<bean id="lifecycleInjector" class="org.compass.gps.device.hibernate.lifecycle.DefaultHibernateEntityLifecycleInjector">
<constructor-arg><value>true</value></constructor-arg>
</bean>

<bean id="compassGps" class="org.compass.gps.impl.SingleCompassGps" init-method="start" destroy-method="stop">
<property name="compass"><ref bean="compass" /></property>
<property name="gpsDevices">
<list>
<bean class="org.compass.spring.device.SpringSyncTransactionGpsDeviceWrapper">
<property name="gpsDevice" ref="hibernateGpsDevice" />
</bean>
</list>
</property>
</bean>
<!-- Transaction manager for a single Hibernate SessionFactory (alternative to JTA) -->
<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory"><ref local="sessionFactory"/></property>
</bean>
<!-- COMPASS END -->

Shay Banon

Posts: 4,028
Registered: 9/6/05
Re: HibernateTransactionManager timeout
Posted: Aug 11, 2008 3:24 PM   in response to: Doug Shifflett in response to: Doug Shifflett
 
  Click to reply to this thread Reply
I think that you can set it using Spring when you configure the transaction aspect definition (or, if you are using the @Transactional annotation, then you can set a timeout on it). Also, make sure you set the transaction to be read only, as it should improve the performance.

As a side note, you don't have to wrap just Compass search operations with Hibernate transactions, you can call CompassSession#beginLocalTransaction which won't start a database transaction.
linzhixiong123

Posts: 128
Registered: 9/30/11
Re: HibernateTransactionManager timeout
Posted: Sep 30, 2011 3:34 AM   in response to: Doug Shifflett in response to: Doug Shifflett
 
  Click to reply to this thread Reply
linzhixiong159159

Posts: 90
Registered: 10/4/11
Re: HibernateTransactionManager timeout
Posted: Oct 4, 2011 10:48 PM   in response to: Doug Shifflett in response to: Doug Shifflett
 
  Click to reply to this thread Reply
Coco

Posts: 25
Registered: 11/2/11
Re: HibernateTransactionManager timeout
Posted: Nov 2, 2011 11:21 PM   in response to: linzhixiong159159 in response to: linzhixiong159159
 
  Click to reply to this thread Reply
Peridot stems from olivine cabochons for salewhich inturn belongs to the a good number of packed minerals Wholesale Beadson this planet, then again jewel high-quality olivine is without a doubt pretty infrequent. Olivine tiger eye beadswas that comes with the celestial coral beadsbody overhead, on meteorites, at Mars and even on comets. It extraterrestrial abalone shell for saleolivine countries on this planet on pearl jewellerymeteorites once in a while and really now and again bits of jewel high-quality peridot you find secret with the meteorites. This is often exceptionally infrequent though provides a thrilling wisdom inside the foundation belonging to theGemstone Beads galaxy, research workers quote the fact that the peridot put together on meteorites can be a number of huge amounts of years of age. Then again a large number of peridot diamond at present starts on mines on this planet in considerably less Gemstone Beadsgrow old. Peridot is oftentimes located in lava money deposited and coatings in volcanic lung burning ash it will be mined in lot of websites by hand, explosives are frequently utilized for the start system of the procedure ofWholesale Beads exploration. Commonly peridot can be found in inhospitable venues which includes with the reams in Pakistan, that money deposited you find 15, 000 base together inside the West Himalayas. Because is barely nice good enough designed for 3 months belonging to the 365 days the time period it can also be mined is fixed. Money deposited in peridot designed for diamond you find within a number of venues in the country, plus Questions, South america, Japan, Kenya, Unique south america, Saudi Arabic, Pakistan, Norwegian, Tanzania and even Sri Lanka.
pylxwzhj

Posts: 719
Registered: 10/15/11
Re: HibernateTransactionManager timeout
Posted: Nov 26, 2011 3:24 AM   in response to: Doug Shifflett in response to: Doug Shifflett
 
  Click to reply to this thread Reply
The generals, meanwhile,

Coach Outlet

issued an unusual apology for the

Chanel Handbags

deaths of at least 38 people

Coach Outlet

during the week of unrest

Chanel Bags

and the injuries of more than 2,000.

Coach Factory Outlet

But even as they hailed the dead

Coach Outlet Online

as “martyrs,” the generals also appeared

Coach Outlet

to justify killing them as criminals

Coach Outlet

who had attacked the Interior Ministry.

Coach Outlet Online

And they denied — despite the statements

Louis Vuitton Bags

of many witnesses, doctors and

Coach Factory Outlet

even the health ministry — that security

Louis Vuitton Bags

forces had fired live ammunition or birdshot in

Coach Outlet

their clashes with protesters, further inflaming anger.
clothworld

Posts: 1,130
Registered: 11/16/11
Re: Belstaff Jacken
Posted: Nov 27, 2011 8:14 PM   in response to: Doug Shifflett in response to: Doug Shifflett
 
  Click to reply to this thread Reply
Girl chrysanthemum tea in Belstaff Jacken this beautiful spring flowers unexpectedly Belstaff Lederjacke encountered the outskirts of discrete Belstaff Jacke sub-chapter applied for many years fiance, wanted to win this for the Belstaff Gangster master and servant is affectionate sister, Miss Bu excuse to get out, a couple of discrete years of nothing to fall back Passions, chrysanthemum tea sub-learned chapter assumes the chest, willing to temporarily BU family, peace of mind start off on a journey to Kyoto to Herren Jacke Belstaff visit sub-chapter test.The promotion type Caterpillar Boots soft article follows up frequently when Cat Boots the above several kind of soft Caterpillar UK articles are effective such soft article or is the direct coordinate promotion use, or is uses, buys the request to create the product falling short of demand, through competes psychological influence effect Mens Caterpillar Shoes many kinds of factors to urge you to have the purchase desire. The so-called event Cat Boots For Men news body, is seeks for one for the propaganda by the head, writes by media event's technique, lets the reader think that as if is the event which yesterday just occurred.
clothworld

Posts: 1,130
Registered: 11/16/11
Re:Timberland Boots Sale
Posted: Nov 28, 2011 1:00 AM   in response to: Doug Shifflett in response to: Doug Shifflett
 
  Click to reply to this thread Reply
Thought that Timberland Boots Sale all matters need Cheap Timberland Boots by oneself primarily, ever not to Timberland UK consider others' Timberland Boots standpoint Special Timberland Boots or the sentiment, arrogant, Mens Timberland Chukka Boots are supercilious. Passes through time lothes not to be able to put on again second time, likes trading the race car frequently. Had been infatuated with the guitar, but by artistic layman's paternal grandmother was ridiculed, no longer Mens Timberland Boat Shoes moves. “later will talk incessantly paternal grandmother not in the words, the majority of properties turned over to me”, by now paternal Mens Timberland Roll-Top Boots grandmother did not know Mens Timberland Custom Boots has brought the emaciated girl from Womens Timberland 6 Inch Boots where, announced that must give the Womens Timberland Boots entire fortune he, this was also insufficient, old woman added that must cut off his all sources of income. In order to recall this absurd condition, but is working with the high graciousness astronomy, discovered All Timberland Boots that oneself likes on this enemy unexpectedly, he New Timberland Boots feels flustered to his Lovers Timberland Boots action. Unexpectedly graciousness star's side had Timberland Beach Sandals the mature perfect man handsome world, but has received Womens Timberland Roll-Top Boots US since the high school Timberland Kids Boots time's good friend to be Mens Timberland Boots also unable to own sentiment to neglect again, finally Women's Timberland Boots Snow finally with graciousness star Mens Timberland 6 Inch Boots in the same place.
Legend
Guru: 2001 + pts
Expert: 501 - 2000 pts
Super-star: 101 - 500 pts
Assistant: 51 - 100 pts
Participant: 0 - 50 pts
Helpful Answer (5 pts)
Correct Answer (10 pts)

Point your RSS reader here for a feed of the latest messages in all forums