SourceForge.net Logo
Main Overview Wiki Issues Forum Build Fisheye

Welcome, Guest
Guest Settings
Help

Compass Support Forums » Compass » Compass Users

Thread: How can a different transaction processor be used.

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


Permlink Replies: 6 - Pages: 1 - Last Post: Nov 23, 2011 3:41 AM Last Post By: lorna lee
ollie-1-kinobi

Posts: 2
Registered: 7/10/09
How can a different transaction processor be used.
Posted: Jul 13, 2009 7:30 AM
 
  Click to reply to this thread Reply
Hi,

I'm using Compass 2.2.0/Lucene 2.4.1 and I've specified the following in a XML Schema based configuration (using Compass::Spring):
<compass:transaction processor="read_committed" />

However, when checking the log4j debug level logging the following is observed:

DEBUG main: (DefaultLuceneQueryParser.java:76) - Query Parser configured with allowLeadingWildcard true and allowConstantScorePrefixQuery true
DEBUG main: (AsyncTransactionProcessorFactory.java:133) - Async Transaction Processor will wait for 10000ms if backlog is full
DEBUG main: (AsyncTransactionProcessorFactory.java:139) - Async Transaction Processor blocking batch size is [5] with timeout of 100ms
DEBUG main: (AsyncTransactionProcessorFactory.java:144) - Async Transaction Processor non blocking batch size is [5]
DEBUG main: (AsyncTransactionProcessorFactory.java:149) - Async Transaction Processor process before close is set to true
DEBUG main: (AsyncTransactionProcessorFactory.java:154) - Async Transaction Processor will use [5] concrrent threads to process transactions
DEBUG main: (AsyncTransactionProcessorFactory.java:159) - Async Transaction Processor uses UID based hashing for concurrent processing
DEBUG main: (AsyncTransactionProcessorFactory.java:163) - Starting Async polling transaction processor
DEBUG main: (TransactionFactoryFactory.java:35) - Using transaction factory org.compass.core.transaction.LocalTransactionFactory@11978b
DEBUG main: (FirstLevelCacheFactory.java:56) - Using first level cache http://org.compass.core.cache.first.NullFirstLevelCache

The RecommittedTransactionProcessorFactory never seems to be used.
Shay Banon

Posts: 4,028
Registered: 9/6/05
Re: How can a different transaction processor be used.
Posted: Jul 13, 2009 9:22 AM   in response to: ollie-1-kinobi in response to: ollie-1-kinobi
 
  Click to reply to this thread Reply
Maybe in your code you change the session settings to use a different transaction processor?
ollie-1-kinobi

Posts: 2
Registered: 7/10/09
Re: How can a different transaction processor be used.
Posted: Jul 13, 2009 11:53 AM   in response to: Shay Banon in response to: Shay Banon
 
  Click to reply to this thread Reply
Hi Shay,

I've tried the following code, but I still see the same debug output as before.
public void testAGo() {

CompassConfiguration conf = new CompassConfiguration()
.addClass(Author.class);
conf.configure();

Compass compass = conf.buildCompass();
compass.getSettings().setSetting(
LuceneEnvironment.Transaction.Processor.TYPE,
LuceneEnvironment.Transaction.Processor.ReadCommitted.NAME);
compass = conf.buildCompass();
CompassSession session = compass.openSession();

compass.getSearchEngineIndexManager().cleanIndex();
try {
Author author1 = new Author();
author1.setId(1L);
author1.setName("Charles Dickens");
session.save(author1);
Author author2 = new Author();
author2.setId(2L);
author2.setName("Enid Blyton");
session.save(author2);
session.commit();
} catch (CompassException ce) {
session.rollback();
}

}

With the following compass.cfg.xml:
<compass-core-config xmlns="http://www.compass-project.org/schema/core-config"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.compass-project.org/schema/core-config
http://www.compass-project.org/schema/compass-core-config-2.2.xsd">

<compass name="default">

<connection>
<file path="target/test-index"/>
</connection>

</compass>

</compass-core-config>
Shay Banon

Posts: 4,028
Registered: 9/6/05
Re: How can a different transaction processor be used.
Posted: Jul 14, 2009 1:48 PM   in response to: ollie-1-kinobi in response to: ollie-1-kinobi
 
  Click to reply to this thread Reply
I see now. The debug logging is just there since the Async transaction processor gets initialized even with default configuration. This allows to easily choose a specific session to be processed by it (just by setting it on the session settings).

If you use read committed, you should see read committed logs when you perform operations, and not async ones.
louisvuittonbox

Posts: 411
Registered: 8/23/11
Re: How can a different transaction processor be used.
Posted: Aug 23, 2011 9:41 PM   in response to: ollie-1-kinobi in response to: ollie-1-kinobi
 
  Click to reply to this thread Reply
Producing fabulous high end fashion year after year and season after season, gucci outlet is arguably the world's most prestigious designer of clothes. As you would expect from a gucci outlet online that started out solely making leather goods, they are best known for their classic range of gucci bags and gucci handbags which usually feature the trademark company logo or pattern and come either in leather or canvas finishes which look perfect when coupled with matching gucci shoes. Ladies Gucci Shoes are simply the perfect footwear for any occasion and here at Profile we stock a large selection including Gucci Boots, Flats and High Heels. They are designer shoes of the highest quality.
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