OK, I’m past that problem and have fixed a couple more but I’m now stumped. I’m trying to purge a single entity and the add() method of BatchedQueueingProcessor creates a Work instance. I’ve traced this and the correct entity is being used to create the Work instance. When the prepareWorks() method executes this statement:

 

Class entityClass = Hibernate.getClass( work.getEntity() );

 

The entityClass variable is not my original object’s class, it’s ‘java.lang.Class’. When the

 

DocumentBuilder<Object> builder = searchFactoryImplementor.getDocumentBuilders().get( entityClass );

 

statement executes, the builder is obviously ‘null’ so it returns and no processing is done. I am stumped at the return of ‘java.lang.Class’. Anyone have ideas?? I can’t go any further with this until we figure this out.

 

 

John G.

 

 

 

You should not need to have access, I think.

Workers from the WorkerFactory take entity and work type. All of them are stored by the BatchedQueueingProcessor Then before tx commit, QueueingProcessor.prepareWorks prepare the queue and create Lucene specific works (queue of LuceneWork).

after tx commit, the LuceneWork queue is processed. Either by accessing Lucene or by sending a JMS message.

 

 

 

On  Aug 16, 2007, at 00:29, John Griffin wrote:

 

> By default the WorkerFactory creates a TransactionalWorker. How can I

> set up the Configuration object in my tests so that the SearchFactory

> will return an instance of LuceneWorker? This is critical to the Purge

> implementation.

> 

> 

> 

> Thx,

> 

> 

> 

> John G.

>