lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Edgar Poce" <>
Subject Re: Lucene & EJBs
Date Sat, 24 May 2003 19:40:28 GMT
I am using Lucene in an EJB environment but I didn't test it thoroughly. I
am new in both technologies, so it wouldn't be strange I made a wrong

Stateless Session Bean: IndexWriter
Stateless Session Bean: IndexReader
EntityBean: IndexInformation

IndexInformation has the location for accessing the index based on a key.
IndexReader makes the queries with the location set in IndexInformation.
IndexWriter writes a new index in a different location ([indexKey]+[time]),
it doesn't overwrite the old one, so there is no lock problem. When it
finishes the index, it sets a new location in IndexInformation and new
queries are made against the new Index. IndexWriter also waits x time  and
tries to delete the old index (just in case it is in use by an IndexReader
started before the completion of the new index).

I guess it is wrong beacuse It accesses the filesystem but It could be
solved with a jdbc storage.

Please let me know if it is obvious it will stop working soon.


----- Original Message ----- 
From: "Eric Jain" <>
To: "Lucene Users List" <>
Sent: Friday, May 23, 2003 5:42 AM
Subject: Re: Lucene & EJBs

> > Managing the update notification and
> > reindexing in the writer is the problem.
> My current solution is to have all updates done through a JMX MBean.
> This MBean is also responsible for (re)binding an IndexReader to JNDI at
> startup and after updating.
> A JCA wrapper would allow things such as whether or not the current
> operation is being executed in a transaction to be passed on to such a
> Lucene MBean - certainly useful if you intend to modify the index from
> an EJB. Of course you would still have to implement the rollback
> function yourself...
> --
> Eric Jain
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message