I'm assuming you are looking fo the purge(Class) operation.
Feel free to add a work.getEntityClass() method that returns what you
want (ie does Hibernate..getClass( entity ) for regular works and
return the entityClass for a PURGE_ALL work type).
On Aug 17, 2007, at 20:38, John Griffin wrote:
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.
>
_______________________________________________
hibernate-dev mailing list
hibernate-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev