Hi Artem,
On Jul 29, 2008, at 8:52 PM, amelentev (SVN) wrote:
Author: amelentev
Date: 2008-07-29 20:52:51 +0200 (Tue, 29 Jul 2008)
New Revision: 11561
Modified:
platform/core/trunk/xwiki-core/src/main/resources/META-INF/plexus/
components.xml
Log:
XWIKI-2444: QueryManager in Store
set instantiation-strategy to per-lookup for prevent sharing of
query objects.
We shouldn't do this IMO. Using a per lookup strategy with components
is very very dangerous (I've experienced it several times). The
problem is that you need to explicitely remove the components as
otherwise you're creating a memory leak.
Thanks
-Vincent
Modified:
platform/core/trunk/xwiki-core/src/main/resources/META-INF/
plexus/components.xml
===================================================================
--- platform/core/trunk/xwiki-core/src/main/resources/META-INF/
plexus/components.xml 2008-07-29 17:38:19 UTC (rev 11560)
+++ platform/core/trunk/xwiki-core/src/main/resources/META-INF/
plexus/components.xml 2008-07-29 18:52:51 UTC (rev 11561)
@@ -52,6 +52,7 @@
<role>com.xpn.xwiki.store.query.Query</role>
<role-hint>hql</role-hint>
<implementation>com.xpn.xwiki.store.hibernate.query.HqlQuery</
implementation>
+ <instantiation-strategy>per-lookup</instantiation-strategy>
<requirements>
<requirement>
<role>org.xwiki.context.Execution</role>
@@ -62,6 +63,7 @@
<role>com.xpn.xwiki.store.query.Query</role>
<role-hint>hibernateNamed</role-hint>
<
implementation
com.xpn.xwiki.store.hibernate.query.HibernateNamedQuery</
implementation>
+ <instantiation-strategy>per-lookup</instantiation-strategy>
<requirements>
<requirement>
<role>org.xwiki.context.Execution</role>