SourceForge.net Logo
Main Overview Wiki Issues Forum Build Fisheye

Welcome, Guest
Guest Settings
Help

Compass Support Forums » Compass » Compass Users

Thread: CompassGps.index() number of open hibernate sessions (database connections)

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


Permlink Replies: 20 - Pages: 2 [ 1 2 | Next ] - Last Post: Dec 3, 2011 4:40 AM Last Post By: longchamp
Rene Kamp

Posts: 3
Registered: 5/31/08
CompassGps.index() number of open hibernate sessions (database connections)
Posted: May 31, 2008 12:00 PM
 
  Click to reply to this thread Reply
Hello,

I'm currently working on a project that uses spring, hibernate, compass as its backbone. The setup is pretty straight forward where for compass we use a file based index and hibernate gps device, all configured through spring. Everything works fine untill one time I wanted to rebuild the index using the same code like I always did:

if (!this.compassGps.isPerformingIndexOperation()) {
this.compassGps.index();
}

Only this time, it appeared nothing happened. The gps mirror index was created but stayed empty and the index method never finished. After enabling some logging it appeared several hibernate sessions were opened but never closed. Looking further into this it appeared that for every entity made searchable, an hibernate session was opened and stayed open during the entire index operation. As I was executing the code on my local developing environment I hadn't bothered with the connection pool setting but increasing the number maximum allowed connections to be equal or greater then the number of searchable entities the index was created successfully again.

As I don't believe this is intended it could be either a bug or me using compass in a wrong way. Below is the compass part of the spring context, nothing to fancy I think but perhaps I missed something in the configuration.

Sorry if this has been stated somewhere before but I couldn't find any information regarding it.


<!-- COMPASS START -->
<bean id="compass" class="org.compass.spring.LocalCompassBean">
<property name="classMappings">
<list>
...
</list>
</property>
<property name="compassConfiguration">
<bean class="org.compass.annotations.config.CompassAnnotationsConfiguration"></bean>
</property>
<property name="compassSettings">
<props>
<prop key="compass.engine.connection">${compass.engine.connection}</prop>
<prop key="compass.transaction.factory">${compass.transaction.factory}</prop>
</props>
</property>
<property name="transactionManager" ref="transactionManager" />
</bean>

<bean id="hibernateGpsDevice" class="org.compass.gps.device.hibernate.HibernateGpsDevice">
<property name="name" value="hibernateDevice" />
<property name="sessionFactory" ref="sessionFactory" />
<property name="nativeExtractor"><bean class="org.compass.spring.device.hibernate.SpringNativeHibernateExtractor" /></property>
</bean>

<bean id="compassGps" class="org.compass.gps.impl.SingleCompassGps" init-method="start" destroy-method="stop">
<property name="compass" ref="compass" />
<property name="gpsDevices">
<list>
<bean class="org.compass.spring.device.SpringSyncTransactionGpsDeviceWrapper">
<property name="gpsDevice" ref="hibernateGpsDevice" />
<property name="transactionManager" ref="transactionManager" />
</bean>
</list>
</property>
</bean>
<!-- COMPASS END -->

Shay Banon

Posts: 4,028
Registered: 9/6/05
Re: CompassGps.index() number of open hibernate sessions (database connecti
Posted: May 31, 2008 5:26 PM   in response to: Rene Kamp in response to: Rene Kamp
 
  Click to reply to this thread Reply
Basically, what Compass does, is try and create a thread per entity type in order to index it concurrently. This means that Compass will open a session per entity type since it will index it in parallel. I did not understand if you are referring to Compass creating a session per entity instance, or entity type.

If you want to restrain the amount of threads Compass creates in order to index (by default, a thread per type), then you can configure the gps device to inject a setter called: setParallelIndexExecutor(..), with an instance of ConcurrentParallelIndexExecutor which can accept the number of threads in its constructor.
Rene Kamp

Posts: 3
Registered: 5/31/08
Re: CompassGps.index() number of open hibernate sessions (database connecti
Posted: Jun 1, 2008 8:40 AM   in response to: Shay Banon in response to: Shay Banon
 
  Click to reply to this thread Reply
Thank you for your response. With hibernate session per searchable entity I meant entity type, sorry for the confusion there.

Setting the ConcurrentParallelIndexExecutor as you suggested does tackle the problem I described but only when the maximum number of allowed threads is set to a number lower then the maximum number of simultaneously connections allowed by the connection pool. If this is not the case, the index operation results in a complete deadlock again.

If the indexing is done asynchronous per searchable entity type, shouldn't there be at least some threads be able to start while some others are being blocked because there are no more connection available? When the first threads finish the connections are released and the blocked ones can now execute. Currently they all appear to be in a blocking state if not all of them are successfully able to acquire a connection at the same time.
Shay Banon

Posts: 4,028
Registered: 9/6/05
Re: CompassGps.index() number of open hibernate sessions (database connecti
Posted: Jun 1, 2008 12:24 PM   in response to: Rene Kamp in response to: Rene Kamp
 
  Click to reply to this thread Reply
This behavior is really up to Hibernate and the jdbc connection pool you use. Compass does not do anything complicated, it opens a Hibernate session and starts reading data using it.
Rene Kamp

Posts: 3
Registered: 5/31/08
Re: CompassGps.index() number of open hibernate sessions (database connecti
Posted: Jun 1, 2008 1:37 PM   in response to: Shay Banon in response to: Shay Banon
 
  Click to reply to this thread Reply
Well, I did some digging and things appear to lock up somewhere within the hibernate transaction started by the ScrollableHibernateIndexEntitiesIndexer. As the ConcurrentParallelIndexExecutor gives me a way to prevent this lockup from happening I'm not going to take the time to dig any further. I've marked this question as answered now, thank you for your time.
louisvuittonbox

Posts: 411
Registered: 8/23/11
Re: CompassGps.index() number of open hibernate sessions (database connections)
Posted: Aug 23, 2011 10:33 PM   in response to: Rene Kamp in response to: Rene Kamp
 
  Click to reply to this thread Reply
Looking for a new ghd lisseur? Now, you can make your hair to be curl or straight with styler ghd, which is a suitable styling tool, you are able to use it to change your hairstyle which you like in a entirely very less period of time. This useful product was created and designed by the Farouk Systems, and today lisser ghd are loved by more and more young girls and graceful ladies. There are many ghd hair straighteners around the whole world nowadays, and GHD Outlet online store may be the best choice for you, if you want to buy discount Ghd IV salon styler.As a professional ghd France online seller, we provide Ghd Iv Styler,Ghd Iv Salon Styler,Ghd Iv,Ghd Salon Styler,ghd iv mini styler,ghd straighteners sale,ghd gold styler and so on at lower price, you can find different designs, colors of GHD IV Styler are listed in our livraison gratuite. When you find your ideal GHD IV Styler, you can order them soon, and we will send our products to you witnin a week, no tax sale, fast free shipping. Hope you enjoy your shopping here.
feifei

Posts: 128
Registered: 9/5/11
Re: CompassGps.index() number of open hibernate sessions (database connections)
Posted: Sep 13, 2011 3:14 AM   in response to: Rene Kamp in response to: Rene Kamp
 
  Click to reply to this thread Reply
We are the best soccer jersey supplier, all the soccer jerseys on jerseybbs.com are REPLICA SOCCER JERSEYS, but their quality are good, because many soccer jersey shopping websites are selling our discount soccer jerseys, espcially the thailand quality cheap soccer jerseys, They are the same as the official jerseys

According to a figure that most of the luxury brands consumer in China range frome 2os to 30s.
wholesale polo shirts are all young Women's love, wearing the designers will attract passerby glance, it make them be in good mood all the day.

feidufang
With the increase in printing needs all over the world, manufacturers of Ink Cartridges are hard pressed to meet the ever-increasing demand. Consumer satisfaction ranks highest in the quest to fulfill company priorities. Buying printers is relatively cheap nowadays, but unfortunately, the Ecco Key West Mens same thing cannot be said about the CISS or cartridges that require to be replaced often.

cocogamer.com is one of most reliable sellers which engage in r4i gold and r4i sdhc , including all the most popular R4i and R4 3DS Cards at favorable price
China Ceramic Tile Manufacturer exporter and supplier with a factory in China, manufacture all kinds of Ceramic Tile, wall tiles, Floor Tiles!


The online store to buy replica Louis Vuitton bags, wallets and purse of top most designer

R4 Series,r4i Series,R4DS,R4i SDHC,R4i Gold,R4i Card for NDSi XL/NDSi/DSL/NDS - UseeGames.Com




feifei

Posts: 128
Registered: 9/5/11
Re: CompassGps.index() number of open hibernate sessions (database connections)
Posted: Sep 13, 2011 3:16 AM   in response to: Rene Kamp in response to: Rene Kamp
 
  Click to reply to this thread Reply
BrandDream, Top designer apparel supplier, FREE SHIPPING(for orders of 10pcs to US, UK, CA and AU), louboutin shoes, Cheap Ralph Lauren polo shirts, Cheap Ed Hardy Wholesale, juicy couture tracksuits, Cheap Christian Louboutin Shoes, Discount Sheepskin Boots, Wholesale Abercrombie, Christian Audigier Clothing and Shopping
wholesale designer clothing, accept Credit Card and PayPal, Quality Guarantee, Good Discounts and Trusty Business.

Do you know the different between the replica and fake watch? In fact the replica watches is made from the similar material and parts with the orginal one,the more important it is legal, however the fake is illegal.

A wide range of high quality and excellent perfermance wholesale Jerseys, wholesale nike shox, Cheap Nike airmax Shoes wholesale and Cheap Nike airmax Shoes in our shop welcome your visit.wholesale Jerseys, wholesale nike shox, Cheap Nike airmax Shoes, Cheap Nike airmax Shoes wholesale.
cheap soccer jerseys,replica soccer jerseys are very high sales volume, and many people liked to buy it replica soccer jerseyscheap soccer jerseys.

We mainly deal with handbags, shoes, garment, promotions and gifts. wholesale designer handbags, Wholesale shoes from china, wholesale fashion accessories, wholesale designer sunglasses, wholesale products from china. For many years' experience, our companies has been always complying with the contract and attaching great importance to good faith.

feidufang

Newest styles and brands of hats & caps including baseball caps, new era cap, DC fitteds, fillipino flag hats and sports team caps.

Anviz Biometric manufactures a complete range of biometric products including Fingerprint Time Attendance , fingerprint access control, fingerprint lock, USB fingerprint reader, OEM fingerprint module Fingerprint Access Control etc.

We specialize in shower head andtowel rack of high quality and favorable price .The shower head that we provide has many advantages: 1. They quickly bring water; 2. The handles of environmental protection are in favour of our health;3.The color and style are wonderful. At the same time ,towel rack that we provide is durable and beautiful.We are sure that we will offer you satisfactory products and service

elva99

Posts: 14
Registered: 9/19/11
Re: CompassGps.index() number of open hibernate sessions (database connections)
Posted: Sep 19, 2011 9:36 PM   in response to: Rene Kamp in response to: Rene Kamp
 
  Click to reply to this thread Reply
Low priced UGG Hunter wellies really are a large number of Tory Burch outlets in some cases about the most Tory Burch outlet california usual hunter wellies within tons of all those cheap wallets outlet with each other by means of girls Tory Burch bags outlet. They"re usual additionally Tory Burch ballet flats like well-known people for womens flip flops Artist experience relating to all of these hunter wellies Tory Burch Slippers outlet for a gear. In that respect there will probably Tory Burch heels outlet in some cases looked into an immense Tory Burch wedges outlet variety about type and additionally peep toe wedge shoes color choice just for nightfall ugg hunter wellies Uggs outlet.
Tory burch grew up honing an individual's basic Uggs outlet store elementary type and additionally robust clever Uggs boots outlet option, consider the single most Ugg nightfall boots brand-new cloth, consider not likely Uggs sundance II only just expanding dainty composing and additionally Ugg ultra short add on, still outline exquisiteness, the moment bailey button Uggs expanding purses. The country's astounding tier Ugg classic mini boots about superior quality profits the software any classic short Ugg boots top-quality name..
monifa08

Posts: 21
Registered: 9/21/11
Re: CompassGps.index() number of open hibernate sessions (database connections)
Posted: Sep 21, 2011 4:21 AM   in response to: Rene Kamp in response to: Rene Kamp
 
  Click to reply to this thread Reply
If you want to buy more similar louboutin shoes, please go our louboutin online store.The classic and unique signature red leather sole can make your more sexy, enchanting and confident. Do not tell me that you are not interested in this stylish and elegant Cheap Louboutin Shoes.
monifa08

Posts: 21
Registered: 9/21/11
Re: CompassGps.index() number of open hibernate sessions (database connections)
Posted: Sep 21, 2011 4:22 AM   in response to: Rene Kamp in response to: Rene Kamp
 
  Click to reply to this thread Reply
Some of them even do not remember how many Christian Louboutin Ankle Boots they have bought and some of them just buy them for collection because of its particular style or color.The women who wear the discount christian louboutin sandals are more able to attract men gaze.The red bottom of the Christian Louboutin make it be highlighted among different kinds of high heels.Furthermore the Christian Louboutin not only improve his own brand feature but also follows fashion trends. Louboutin shoes,it combine classical trend with fashion perfectly.
monifa08

Posts: 21
Registered: 9/21/11
Re: CompassGps.index() number of open hibernate sessions (database connections)
Posted: Sep 21, 2011 4:23 AM   in response to: Rene Kamp in response to: Rene Kamp
 
  Click to reply to this thread Reply
As the Italian fashion sports brand MONCLER is famous for high quality, durable, excellent workmanship , specially the MONCLER down jacket is main product. As most of the main consumer groups are who love exercise,so MONCLER product color modeling are classic, no too many fancy designs. Wearing a Moncler Jacket 2011 you are the fashionista in 2011 winter !
monifa08

Posts: 21
Registered: 9/21/11
Re: CompassGps.index() number of open hibernate sessions (database connections)
Posted: Sep 21, 2011 4:23 AM   in response to: Rene Kamp in response to: Rene Kamp
 
  Click to reply to this thread Reply
Original cheap uggs boots are made out of the finest pure sheep skin on one side that has tanned into it a layer of fleece on the other side and that is not only one of the finest natural skins that keeps your feet warm but also breathes like only a natural material can due to the tiny pores in it. This combination of sheepskin on the outside and a layer of fleece on the inside keep your feet both warm and dry as the fleece wicks away all the moisture from your feet and prevents them from getting too hot when the temperature rises. uggs for cheap would bring you a nice warm winter.
Lily Delva

Posts: 4
Registered: 9/27/11
Re: CompassGps.index() number of open hibernate sessions (database connections)
Posted: Sep 28, 2011 1:28 AM   in response to: Rene Kamp in response to: Rene Kamp
 
  Click to reply to this thread Reply
The economic crisis we have is not an obstacle to the ability to buy Designer Handbags. How do these people can be expensive at all Cheap UGGS ? Thank you for wholesale Green Bay Packers Jerseys products. Largely limited to warehouses and Cheap Moncler Jackets stores. Big Bag products Cheap Puma Shoes are very popular on the Internet. This construction Nike Dunk High makes the purchase of bags within reach as a provider of wholesale and drop shippers Supra Shoes Skytop all the time to find ways to present their products and UGG Boots Classic Tall Chestnut marketing products online market. Many types and brands that are best for you to choose Ferrari Puma Shoes from all the Cheap Louis Vuitton Handbags sold at a lower price. Wholesale drop shippers, Cheap NFL Jerseys the profitability of their company, they always do they have enough stock of these designer bags, Women Canada Goose Jackets to come on-line customers and over again.
You should be from reputable Men Supra Shoes online wholesale suppliers and drop shippers buy Salehoo to ensure that products Coach Replica Handbags are purchased online authentic and original. Salehoo Nike Shox R4 also ensure that their online directory of wholesale suppliers and drop shippers have to do. Wholesale Timberland Boots Comments are not even available online customers quality.
happy2011

Posts: 41
Registered: 9/29/11
Re: CompassGps.index() number of open hibernate sessions (database connections)
Posted: Sep 29, 2011 2:43 AM   in response to: Rene Kamp in response to: Rene Kamp
 
  Click to reply to this thread Reply
HD Video Converter for Mac, professional HD converter on mac, provides you the functions of decording and encording HD videos, including:(HD) AVI, H.264/AVC, (HD) MPEG4 TS, (HD) MPEG2 TS, WMV HD, HD MOV, MKV, TS, DivX, RM, 3GP, MP4 etc. formats video.
DRM Removal,m4v converter for mac,remove drm,3gp converter,video converter for mac,mov to avi
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