Hi All,
we are using NHibernate.Search and Lucene (all updated to the latest
versions), everything is fine on Visual Studio, on our CI environment
(CC.net) sometimes we get this:

Cannot delete file 'c:\code\Vouchers\Index\Retailer.0\_0.cfs'.
>
> The process cannot access the file
> 'c:\code\Vouchers\Index\Retailer.0\_0.cfs' because it is being used by
> another process.
>

Forcing a build after this usually fix the problem.

Now, our build currently does this:

StopApplicationPool,
Clean,
RecreateDb,
Build,
RunUnitTests,
RunIntegrationTests,
Deploy,
StartApplicationPool,
RunAcceptanceTests,
CreateReleasePackage,
TagWithBuildLabel

I've the feeling that after running the AcceptanceTests on the WebApp the
Lucene session keeps holding an handle there...

We use Nhibernate.Search on ours Repositories, they all extend the Spring
HibernateDaoSupport, so basically we don't close the Session.

The code looks like:

            IFullTextSession fullTextSession =
> Search.CreateFullTextSession(Session);
>             string format = string.Format("(Description:({0}) OR
> Title:({0})) AND unTokenizedExpired:False", parameters);
>             IFullTextQuery textQuery =
> fullTextSession.CreateFullTextQuery<Voucher>(format).SetSort(Sort).SetMaxResults(10);
>             return textQuery.List<Voucher>();
>

On the tests, we have two types of tests, the ones extending
AbstractTransactionalDbProviderSpringContextTests from Spring (roll back the
transaction)

and others extending just AbstractDependencyInjectionSpringContextTests and
using TransactionTemplate to perform operations.

All the tests on NHibernate.Search are of this second type.

Does this system make sense to you guys?

While writing this long email I also thought that we never flush the session
(not on tests nor on repositories), could be this a problem?


Many thanks in advance,

Antonio

--
http://www.the-arm.com

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"NHibernate Contrib - Development Group" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com.ar/group/nhcdevs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to