You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Luca Tagliani <l....@prismaeng.it> on 2008/02/11 18:34:53 UTC
DataStore Garbage Collector problem
Hi all,
I am developing a webapp using Jackrabbit. I switched my blobs to
DataStore in the last days, but I have the following problem with the
GarbageCollector:
I create a separate thread that started in a separate servlet
I log in with system credentials retrieving the repository from JNDI (this
actually works fine)
Continuously run three instruction:
gc.scan();
gc.stopScan();
int numDeleted = gc.deleteUnused();
The strange behaviour (or so it seems to me) is that when I stop then
restart the application all my datastore object are cleaned, an from that
moment, even if I delete a node, it isn't deleted from the datastore.
Well, to be clearer I attach my code of the thread and the servlet.
Anyone can help me understand how I should use the GarbageCollector ?
Thanks in advance
Luca Tagliani
http://www.nabble.com/file/p15416402/WrDataStoreGarbageCollector.java
WrDataStoreGarbageCollector.java
http://www.nabble.com/file/p15416402/WrDataStoreGarbageCollectorServlet.java
WrDataStoreGarbageCollectorServlet.java
--
View this message in context: http://www.nabble.com/DataStore-Garbage-Collector-problem-tp15416402p15416402.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
Re: Shutdown Hangs
Posted by Simon Jentzsch <si...@yahoo.de>.
Thanks for your help!!!
it works!
Spring Modules 0.9 fixed the problem.
Jukka Zitting schrieb:
> Hi,
>
> On Fri, Mar 7, 2008 at 6:35 PM, Simon Jentzsch <si...@yahoo.de> wrote:
>
>> When shutting down Spring calls the "shutdown()"-Method, which aquires
>> the lock and then closes all sessions. But when the last session will be
>> closed, it will call the shutdown-method again [5], but this time he is
>> waiting for the lock.
>>
>
> This is incorrect, the TransientRepository.shutdown() method newer
> directly calls RepositoryImpl.shutdown().
>
> The problem can be traced back to the TransientRepositoryFactoryBean:
>
>
>> [11] org.apache.jackrabbit.core.RepositoryImpl.shutdown
>> (RepositoryImpl.java:948)
>> [12]
>> org.springmodules.jcr.jackrabbit.TransientRepositoryFactoryBean.destroy
>> (TransientRepositoryFactoryBean.java:67)
>>
>
> It should not be possible for TransientRepositoryFactoryBean to
> directly invoke methods in RepositoryImpl, bypassing the
> TransientRepository class.
>
> I looked deeper into this, and it seems that in an earlier version of
> TransientRepositoryFactoryBean [1] this was done using reflection to
> reach into the internals of the TransientRepository instance. It seems
> like this was fixed recently [2], and as far as the CVS tags are
> correct the fix should be in Spring Modules 0.9 that was released ...
> yesterday!
>
> [1] https://springmodules.dev.java.net/source/browse/springmodules/projects/jcr/src/java/org/springmodules/jcr/jackrabbit/TransientRepositoryFactoryBean.java?hideattic=0&rev=1.1&view=markup
> [2] https://springmodules.dev.java.net/source/browse/springmodules/projects/jcr/src/java/org/springmodules/jcr/jackrabbit/TransientRepositoryFactoryBean.java?hideattic=0&rev=1.2&r1=1.1&r2=1.2
>
> BR,
>
> Jukka Zitting
>
>
___________________________________________________________
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
Re: Shutdown Hangs
Posted by Jukka Zitting <ju...@gmail.com>.
Hi,
On Fri, Mar 7, 2008 at 6:35 PM, Simon Jentzsch <si...@yahoo.de> wrote:
> When shutting down Spring calls the "shutdown()"-Method, which aquires
> the lock and then closes all sessions. But when the last session will be
> closed, it will call the shutdown-method again [5], but this time he is
> waiting for the lock.
This is incorrect, the TransientRepository.shutdown() method newer
directly calls RepositoryImpl.shutdown().
The problem can be traced back to the TransientRepositoryFactoryBean:
> [11] org.apache.jackrabbit.core.RepositoryImpl.shutdown
> (RepositoryImpl.java:948)
> [12]
> org.springmodules.jcr.jackrabbit.TransientRepositoryFactoryBean.destroy
> (TransientRepositoryFactoryBean.java:67)
It should not be possible for TransientRepositoryFactoryBean to
directly invoke methods in RepositoryImpl, bypassing the
TransientRepository class.
I looked deeper into this, and it seems that in an earlier version of
TransientRepositoryFactoryBean [1] this was done using reflection to
reach into the internals of the TransientRepository instance. It seems
like this was fixed recently [2], and as far as the CVS tags are
correct the fix should be in Spring Modules 0.9 that was released ...
yesterday!
[1] https://springmodules.dev.java.net/source/browse/springmodules/projects/jcr/src/java/org/springmodules/jcr/jackrabbit/TransientRepositoryFactoryBean.java?hideattic=0&rev=1.1&view=markup
[2] https://springmodules.dev.java.net/source/browse/springmodules/projects/jcr/src/java/org/springmodules/jcr/jackrabbit/TransientRepositoryFactoryBean.java?hideattic=0&rev=1.2&r1=1.1&r2=1.2
BR,
Jukka Zitting
Re: Shutdown Hangs
Posted by Simon Jentzsch <si...@yahoo.de>.
Hi Marcel,
Thanx for your response. It's not easy to get a good threaddump, because
when you shutdown tomcat as a service this option is not available, but
i used the jdb running the tomcat in debugmode.
I debugged it many times now, and so far thisis my explanition:
[1] java.lang.Object.wait (native method)
[2] java.lang.Object.wait (Object.java:485)
[3]
EDU.oswego.cs.dl.util.concurrent.WriterPreferenceReadWriteLock$WriterLock.acquire
(null)
[4] org.apache.jackrabbit.core.RepositoryImpl.shutdown
(RepositoryImpl.java:939)
[5] org.apache.jackrabbit.core.TransientRepository.stopRepository
(TransientRepository.java:275)
[6] org.apache.jackrabbit.core.TransientRepository.loggedOut
(TransientRepository.java:427)
[7] org.apache.jackrabbit.core.SessionImpl.notifyLoggedOut
(SessionImpl.java:573)
[8] org.apache.jackrabbit.core.SessionImpl.logout (SessionImpl.java:1.246)
[9] org.apache.jackrabbit.core.XASessionImpl.logout
(XASessionImpl.java:403)
[10] org.apache.jackrabbit.core.RepositoryImpl.doShutdown
(RepositoryImpl.java:981)
[11] org.apache.jackrabbit.core.RepositoryImpl.shutdown
(RepositoryImpl.java:948)
...
When shutting down Spring calls the "shutdown()"-Method, which aquires
the lock and then closes all sessions. But when the last session will be
closed, it will call the shutdown-method again [5], but this time he is
waiting for the lock.
Any Idea why this happens?
thanx
simon
This is my Threaddump:
> http-80-1:
[1] java.lang.Object.wait (native method)
[2] java.lang.Object.wait (Object.java:485)
[3] org.apache.tomcat.util.net.AprEndpoint$Worker.await
(AprEndpoint.java:1.256)
[4] org.apache.tomcat.util.net.AprEndpoint$Worker.run
(AprEndpoint.java:1.281)
[5] java.lang.Thread.run (null)
ajp-8009-1:
[1] java.lang.Object.wait (native method)
[2] java.lang.Object.wait (Object.java:485)
[3] org.apache.tomcat.util.net.AprEndpoint$Worker.await
(AprEndpoint.java:1.256)
[4] org.apache.tomcat.util.net.AprEndpoint$Worker.run
(AprEndpoint.java:1.281)
[5] java.lang.Thread.run (null)
ajp-8009-Poller-7:
[1] java.lang.Object.wait (native method)
[2] java.lang.Object.wait (Object.java:485)
[3] org.apache.tomcat.util.net.AprEndpoint$Poller.run
(AprEndpoint.java:1.126)
[4] java.lang.Thread.run (null)
ajp-8009-Poller-6:
[1] java.lang.Object.wait (native method)
[2] java.lang.Object.wait (Object.java:485)
[3] org.apache.tomcat.util.net.AprEndpoint$Poller.run
(AprEndpoint.java:1.126)
[4] java.lang.Thread.run (null)
ajp-8009-Poller-5:
[1] java.lang.Object.wait (native method)
[2] java.lang.Object.wait (Object.java:485)
[3] org.apache.tomcat.util.net.AprEndpoint$Poller.run
(AprEndpoint.java:1.126)
[4] java.lang.Thread.run (null)
ajp-8009-Poller-4:
[1] java.lang.Object.wait (native method)
[2] java.lang.Object.wait (Object.java:485)
[3] org.apache.tomcat.util.net.AprEndpoint$Poller.run
(AprEndpoint.java:1.126)
[4] java.lang.Thread.run (null)
ajp-8009-Poller-3:
[1] java.lang.Object.wait (native method)
[2] java.lang.Object.wait (Object.java:485)
[3] org.apache.tomcat.util.net.AprEndpoint$Poller.run
(AprEndpoint.java:1.126)
[4] java.lang.Thread.run (null)
ajp-8009-Poller-2:
[1] java.lang.Object.wait (native method)
[2] java.lang.Object.wait (Object.java:485)
[3] org.apache.tomcat.util.net.AprEndpoint$Poller.run
(AprEndpoint.java:1.126)
[4] java.lang.Thread.run (null)
ajp-8009-Poller-1:
[1] java.lang.Object.wait (native method)
[2] java.lang.Object.wait (Object.java:485)
[3] org.apache.tomcat.util.net.AprEndpoint$Poller.run
(AprEndpoint.java:1.126)
[4] java.lang.Thread.run (null)
ajp-8009-Poller-0:
[1] java.lang.Object.wait (native method)
[2] java.lang.Object.wait (Object.java:485)
[3] org.apache.tomcat.util.net.AprEndpoint$Poller.run
(AprEndpoint.java:1.126)
[4] java.lang.Thread.run (null)
ajp-8009-Acceptor-0:
[1] java.lang.Thread.sleep (native method)
[2] org.apache.tomcat.util.net.AprEndpoint$Acceptor.run
(AprEndpoint.java:994)
[3] java.lang.Thread.run (null)
http-80-Sendfile-0:
[1] java.lang.Object.wait (native method)
[2] java.lang.Object.wait (Object.java:485)
[3] org.apache.tomcat.util.net.AprEndpoint$Sendfile.run
(AprEndpoint.java:1.487)
[4] java.lang.Thread.run (null)
http-80-Poller-7:
[1] java.lang.Object.wait (native method)
[2] java.lang.Object.wait (Object.java:485)
[3] org.apache.tomcat.util.net.AprEndpoint$Poller.run
(AprEndpoint.java:1.126)
[4] java.lang.Thread.run (null)
http-80-Poller-6:
[1] java.lang.Object.wait (native method)
[2] java.lang.Object.wait (Object.java:485)
[3] org.apache.tomcat.util.net.AprEndpoint$Poller.run
(AprEndpoint.java:1.126)
[4] java.lang.Thread.run (null)
http-80-Poller-5:
[1] java.lang.Object.wait (native method)
[2] java.lang.Object.wait (Object.java:485)
[3] org.apache.tomcat.util.net.AprEndpoint$Poller.run
(AprEndpoint.java:1.126)
[4] java.lang.Thread.run (null)
http-80-Poller-4:
[1] java.lang.Object.wait (native method)
[2] java.lang.Object.wait (Object.java:485)
[3] org.apache.tomcat.util.net.AprEndpoint$Poller.run
(AprEndpoint.java:1.126)
[4] java.lang.Thread.run (null)
http-80-Poller-3:
[1] java.lang.Object.wait (native method)
[2] java.lang.Object.wait (Object.java:485)
[3] org.apache.tomcat.util.net.AprEndpoint$Poller.run
(AprEndpoint.java:1.126)
[4] java.lang.Thread.run (null)
http-80-Poller-2:
[1] java.lang.Object.wait (native method)
[2] java.lang.Object.wait (Object.java:485)
[3] org.apache.tomcat.util.net.AprEndpoint$Poller.run
(AprEndpoint.java:1.126)
[4] java.lang.Thread.run (null)
http-80-Poller-1:
[1] java.lang.Object.wait (native method)
[2] java.lang.Object.wait (Object.java:485)
[3] org.apache.tomcat.util.net.AprEndpoint$Poller.run
(AprEndpoint.java:1.126)
[4] java.lang.Thread.run (null)
http-80-Poller-0:
[1] java.lang.Object.wait (native method)
[2] java.lang.Object.wait (Object.java:485)
[3] org.apache.tomcat.util.net.AprEndpoint$Poller.run
(AprEndpoint.java:1.126)
[4] java.lang.Thread.run (null)
http-80-Acceptor-0:
[1] java.lang.Thread.sleep (native method)
[2] org.apache.tomcat.util.net.AprEndpoint$Acceptor.run
(AprEndpoint.java:994)
[3] java.lang.Thread.run (null)
IndexMerger:
[1] java.lang.Object.wait (native method)
[2] java.lang.Object.wait (Object.java:485)
[3] org.apache.commons.collections.buffer.BlockingBuffer.remove
(BlockingBuffer.java:107)
[4] org.apache.jackrabbit.core.query.lucene.IndexMerger.run
(IndexMerger.java:263)
Timer-1:
[1] java.lang.Object.wait (native method)
[2] java.util.TimerThread.mainLoop (null)
[3] java.util.TimerThread.run (null)
IndexMerger:
[1] java.lang.Object.wait (native method)
[2] java.lang.Object.wait (Object.java:485)
[3] org.apache.commons.collections.buffer.BlockingBuffer.remove
(BlockingBuffer.java:107)
[4] org.apache.jackrabbit.core.query.lucene.IndexMerger.run
(IndexMerger.java:263)
ObservationManager:
[1] java.lang.Object.wait (native method)
[2] java.lang.Object.wait (Object.java:485)
[3] org.apache.commons.collections.buffer.BlockingBuffer.remove
(BlockingBuffer.java:107)
[4] org.apache.jackrabbit.core.observation.ObservationDispatcher.run
(ObservationDispatcher.java:138)
[5] java.lang.Thread.run (null)
Thread-4:
[1] java.lang.Thread.sleep (native method)
[2] org.x7.core.content.dao.DocLogDAO.run (DocLogDAO.java:191)
[3] java.lang.Thread.run (null)
Store org.hibernate.cache.StandardQueryCache Spool Thread:
[1] java.lang.Thread.sleep (native method)
[2] net.sf.ehcache.store.DiskStore.spoolAndExpiryThreadMain
(DiskStore.java:573)
[3] net.sf.ehcache.store.DiskStore.access$800 (DiskStore.java:65)
[4] net.sf.ehcache.store.DiskStore$SpoolAndExpiryThread.run
(DiskStore.java:1.057)
Store org.hibernate.cache.UpdateTimestampsCache Spool Thread:
[1] java.lang.Thread.sleep (native method)
[2] net.sf.ehcache.store.DiskStore.spoolAndExpiryThreadMain
(DiskStore.java:573)
[3] net.sf.ehcache.store.DiskStore.access$800 (DiskStore.java:65)
[4] net.sf.ehcache.store.DiskStore$SpoolAndExpiryThread.run
(DiskStore.java:1.057)
Store org.x7.core.content.base.AbstractGUIDObject Spool Thread:
[1] java.lang.Thread.sleep (native method)
[2] net.sf.ehcache.store.DiskStore.spoolAndExpiryThreadMain
(DiskStore.java:573)
[3] net.sf.ehcache.store.DiskStore.access$800 (DiskStore.java:65)
[4] net.sf.ehcache.store.DiskStore$SpoolAndExpiryThread.run
(DiskStore.java:1.057)
Timer-0:
[1] java.lang.Object.wait (native method)
[2] java.lang.Object.wait (Object.java:485)
[3] java.util.TimerThread.mainLoop (null)
[4] java.util.TimerThread.run (null)
Thread-1:
[1] java.lang.Object.wait (native method)
[2] java.lang.Object.wait (Object.java:485)
[3]
EDU.oswego.cs.dl.util.concurrent.WriterPreferenceReadWriteLock$WriterLock.acquire
(null)
[4] org.apache.jackrabbit.core.RepositoryImpl.shutdown
(RepositoryImpl.java:939)
[5] org.apache.jackrabbit.core.TransientRepository.stopRepository
(TransientRepository.java:275)
[6] org.apache.jackrabbit.core.TransientRepository.loggedOut
(TransientRepository.java:427)
[7] org.apache.jackrabbit.core.SessionImpl.notifyLoggedOut
(SessionImpl.java:573)
[8] org.apache.jackrabbit.core.SessionImpl.logout (SessionImpl.java:1.246)
[9] org.apache.jackrabbit.core.XASessionImpl.logout
(XASessionImpl.java:403)
[10] org.apache.jackrabbit.core.RepositoryImpl.doShutdown
(RepositoryImpl.java:981)
[11] org.apache.jackrabbit.core.RepositoryImpl.shutdown
(RepositoryImpl.java:948)
[12]
org.springmodules.jcr.jackrabbit.TransientRepositoryFactoryBean.destroy
(TransientRepositoryFactoryBean.java:67)
[13]
org.springframework.beans.factory.support.DisposableBeanAdapter.destroy
(DisposableBeanAdapter.java:154)
[14]
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean
(DefaultSingletonBeanRegistry.java:397)
[15]
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton
(DefaultSingletonBeanRegistry.java:375)
[16]
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons
(DefaultSingletonBeanRegistry.java:348)
[17]
org.springframework.context.support.AbstractApplicationContext.destroyBeans
(AbstractApplicationContext.java:856)
[18]
org.springframework.context.support.AbstractApplicationContext.doClose
(AbstractApplicationContext.java:834)
[19]
org.springframework.context.support.AbstractApplicationContext.close
(AbstractApplicationContext.java:801)
[20]
org.springframework.web.context.ContextLoader.closeWebApplicationContext
(ContextLoader.java:357)
[21]
org.springframework.web.context.ContextLoaderListener.contextDestroyed
(ContextLoaderListener.java:70)
[22] org.apache.catalina.core.StandardContext.listenerStop
(StandardContext.java:3.805)
[23] org.apache.catalina.core.StandardContext.stop
(StandardContext.java:4.364)
[24] org.apache.catalina.core.ContainerBase.removeChild
(ContainerBase.java:893)
[25] org.apache.catalina.startup.HostConfig.undeployApps
(HostConfig.java:1.180)
[26] org.apache.catalina.startup.HostConfig.stop (HostConfig.java:1.151)
[27] org.apache.catalina.startup.HostConfig.lifecycleEvent
(HostConfig.java:313)
[28] org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent
(LifecycleSupport.java:120)
[29] org.apache.catalina.core.ContainerBase.stop
(ContainerBase.java:1.055)
[30] org.apache.catalina.core.ContainerBase.stop
(ContainerBase.java:1.067)
[31] org.apache.catalina.core.StandardEngine.stop
(StandardEngine.java:448)
[32] org.apache.catalina.core.StandardService.stop
(StandardService.java:510)
[33] org.apache.catalina.core.StandardServer.stop
(StandardServer.java:734)
[34] org.apache.catalina.startup.Catalina.stop (Catalina.java:602)
[35] org.apache.catalina.startup.Catalina.start (Catalina.java:577)
[36] sun.reflect.NativeMethodAccessorImpl.invoke0 (native method)
[37] sun.reflect.NativeMethodAccessorImpl.invoke (null)
[38] sun.reflect.DelegatingMethodAccessorImpl.invoke (null)
[39] java.lang.reflect.Method.invoke (null)
[40] org.apache.catalina.startup.Bootstrap.start (Bootstrap.java:295)
[41] org.apache.catalina.startup.Bootstrap.main (Bootstrap.java:433)
Attach Listener:
Signal Dispatcher:
Finalizer:
[1] java.lang.Object.wait (native method)
[2] java.lang.ref.ReferenceQueue.remove (null)
[3] java.lang.ref.ReferenceQueue.remove (null)
[4] java.lang.ref.Finalizer$FinalizerThread.run (null)
Reference Handler:
[1] java.lang.Object.wait (native method)
[2] java.lang.Object.wait (Object.java:485)
[3] java.lang.ref.Reference$ReferenceHandler.run (null)
main:
Marcel Reutegger schrieb:
> Hi Simon,
>
> can you please post the complete thread dump, which includes all other
> threads?
>
> thanks
>
> regards
> marcel
>
>
>
> Simon Jentzsch wrote:
>> Hi,
>>
>> I'm using jackrabbit together with spring and the
>> org.springmodules.jcr.support.OpenSessionInViewFilter. It works
>> great and Spring takes care of all the starting and shutdown-cleanup,
>> but whenever I shutdown my Tomcat the Repository hangs on this line:
>>
>> shutdownLock.writeLock().acquire(); (RepositoryImpl:939)
>>
>> It seemes to me, that the WriterPreferenceReadWriteLock is waiting
>> for all LockWriters to finish, but he is waiting forever.
>> I don't know who should hold another Lock on it.
>>
>> I just made an update from 1.3 to 1.4 but the shutdown did not get
>> better.
>>
>> Does anyone have a Idea?
>>
>> Here my spring-config:
>>
>>
>> <!-- JCR -->
>> <bean id="jcrRepository"
>> class="org.springmodules.jcr.jackrabbit.RepositoryFactoryBean">
>> <!-- normal factory beans params -->
>> <property name="configuration"
>> value="classpath:/org/x7/core/model/repository.xml"/>
>> <property name="homeDir" value="file:."/>
>> </bean>
>>
>>
>> <!-- org.springmodules.jcr.JcrSessionFactory -->
>>
>> <bean id="jcrSessionFactory"
>> class="org.springmodules.jcr.jackrabbit.JackrabbitSessionFactory">
>> <property name="repository" ref="jcrRepository"/>
>> <property name="credentials">
>> <bean class="javax.jcr.SimpleCredentials">
>> <constructor-arg index="0" value="bogus"/>
>> <constructor-arg index="1">
>> <bean factory-bean="password" factory-method="toCharArray"/>
>> </constructor-arg>
>> </bean>
>> </property>
>> <property name="eventListeners">
>> <list>
>> <bean class="org.springmodules.jcr.EventListenerDefinition">
>> <property name="listener" ref="jcrDAO"/>
>> </bean>
>> </list>
>> </property>
>> </bean>
>> <!-- create the password to return it as a char[] -->
>> <bean id="password" class="org.x7.core.util.CharArrayCreator">
>> <constructor-arg index="0" value="pass"/>
>> </bean>
>>
>>
>>
>> <bean id="jcrDAO" class="org.x7.core.jcr.JcrDAO" >
>> <property name="sessionFactory" ref="jcrSessionFactory"/>
>> <property name="template">
>> <bean id="jcrTemplate" class="org.springmodules.jcr.JcrTemplate">
>> <property name="sessionFactory" ref="jcrSessionFactory"/>
>> <property name="allowCreate" value="true"/>
>> </bean>
>> </property>
>> <property name="transactionMgr">
>> <bean
>> class="org.springmodules.jcr.jackrabbit.LocalTransactionManager">
>> <property name="sessionFactory" ref="jcrSessionFactory"/>
>> </bean>
>> </property>
>> </bean>
>>
>>
>>
>> Thanx
>>
>> Regards,
>>
>> Simon
>>
>>
>>
>>
>> ___________________________________________________________ Der frühe
>> Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail:
>> http://mail.yahoo.de
>>
>>
>
>
___________________________________________________________
Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de
Re: Shutdown Hangs
Posted by Marcel Reutegger <ma...@gmx.net>.
Hi Simon,
can you please post the complete thread dump, which includes all other threads?
thanks
regards
marcel
Simon Jentzsch wrote:
> Hi,
>
> I'm using jackrabbit together with spring and the
> org.springmodules.jcr.support.OpenSessionInViewFilter. It works great
> and Spring takes care of all the starting and shutdown-cleanup, but
> whenever I shutdown my Tomcat the Repository hangs on this line:
>
> shutdownLock.writeLock().acquire(); (RepositoryImpl:939)
>
> It seemes to me, that the WriterPreferenceReadWriteLock is waiting for
> all LockWriters to finish, but he is waiting forever.
> I don't know who should hold another Lock on it.
>
> I just made an update from 1.3 to 1.4 but the shutdown did not get better.
>
> Does anyone have a Idea?
>
> Here my spring-config:
>
>
> <!-- JCR -->
> <bean id="jcrRepository"
> class="org.springmodules.jcr.jackrabbit.RepositoryFactoryBean">
> <!-- normal factory beans params -->
> <property name="configuration"
> value="classpath:/org/x7/core/model/repository.xml"/>
> <property name="homeDir" value="file:."/>
> </bean>
>
>
> <!-- org.springmodules.jcr.JcrSessionFactory -->
>
> <bean id="jcrSessionFactory"
> class="org.springmodules.jcr.jackrabbit.JackrabbitSessionFactory">
> <property name="repository" ref="jcrRepository"/>
> <property name="credentials">
> <bean class="javax.jcr.SimpleCredentials">
> <constructor-arg index="0" value="bogus"/>
> <constructor-arg index="1">
> <bean factory-bean="password" factory-method="toCharArray"/>
> </constructor-arg>
> </bean>
> </property>
> <property name="eventListeners">
> <list>
> <bean class="org.springmodules.jcr.EventListenerDefinition">
> <property name="listener" ref="jcrDAO"/>
> </bean>
> </list>
> </property>
> </bean>
> <!-- create the password to return it as a char[] -->
> <bean id="password" class="org.x7.core.util.CharArrayCreator">
> <constructor-arg index="0" value="pass"/>
> </bean>
>
>
>
> <bean id="jcrDAO" class="org.x7.core.jcr.JcrDAO" >
> <property name="sessionFactory" ref="jcrSessionFactory"/>
> <property name="template">
> <bean id="jcrTemplate" class="org.springmodules.jcr.JcrTemplate">
> <property name="sessionFactory" ref="jcrSessionFactory"/>
> <property name="allowCreate" value="true"/>
> </bean>
> </property>
> <property name="transactionMgr">
> <bean
> class="org.springmodules.jcr.jackrabbit.LocalTransactionManager">
> <property name="sessionFactory" ref="jcrSessionFactory"/>
> </bean>
> </property>
> </bean>
>
>
>
> Thanx
>
> Regards,
>
> Simon
>
>
>
>
>
> ___________________________________________________________ Der frühe
> Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail:
> http://mail.yahoo.de
>
>
Shutdown Hangs
Posted by Simon Jentzsch <si...@yahoo.de>.
Hi,
I'm using jackrabbit together with spring and the
org.springmodules.jcr.support.OpenSessionInViewFilter. It works great
and Spring takes care of all the starting and shutdown-cleanup, but
whenever I shutdown my Tomcat the Repository hangs on this line:
shutdownLock.writeLock().acquire(); (RepositoryImpl:939)
It seemes to me, that the WriterPreferenceReadWriteLock is waiting for
all LockWriters to finish, but he is waiting forever.
I don't know who should hold another Lock on it.
I just made an update from 1.3 to 1.4 but the shutdown did not get better.
Does anyone have a Idea?
Here my spring-config:
<!-- JCR -->
<bean id="jcrRepository"
class="org.springmodules.jcr.jackrabbit.RepositoryFactoryBean">
<!-- normal factory beans params -->
<property name="configuration"
value="classpath:/org/x7/core/model/repository.xml"/>
<property name="homeDir" value="file:."/>
</bean>
<!-- org.springmodules.jcr.JcrSessionFactory -->
<bean id="jcrSessionFactory"
class="org.springmodules.jcr.jackrabbit.JackrabbitSessionFactory">
<property name="repository" ref="jcrRepository"/>
<property name="credentials">
<bean class="javax.jcr.SimpleCredentials">
<constructor-arg index="0" value="bogus"/>
<constructor-arg index="1">
<bean factory-bean="password" factory-method="toCharArray"/>
</constructor-arg>
</bean>
</property>
<property name="eventListeners">
<list>
<bean class="org.springmodules.jcr.EventListenerDefinition">
<property name="listener" ref="jcrDAO"/>
</bean>
</list>
</property>
</bean>
<!-- create the password to return it as a char[] -->
<bean id="password" class="org.x7.core.util.CharArrayCreator">
<constructor-arg index="0" value="pass"/>
</bean>
<bean id="jcrDAO" class="org.x7.core.jcr.JcrDAO" >
<property name="sessionFactory" ref="jcrSessionFactory"/>
<property name="template">
<bean id="jcrTemplate" class="org.springmodules.jcr.JcrTemplate">
<property name="sessionFactory" ref="jcrSessionFactory"/>
<property name="allowCreate" value="true"/>
</bean>
</property>
<property name="transactionMgr">
<bean
class="org.springmodules.jcr.jackrabbit.LocalTransactionManager">
<property name="sessionFactory" ref="jcrSessionFactory"/>
</bean>
</property>
</bean>
Thanx
Regards,
Simon
___________________________________________________________
Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: http://mail.yahoo.de
Re: DataStore Garbage Collector problem
Posted by Thomas Mueller <th...@gmail.com>.
Hi,
Thanks for your help! I have ran your tests and found a
synchronization problem (see
http://issues.apache.org/jira/browse/JCR-1414). This is now fixed in
the trunk.
> The strange behaviour (or so it seems to me) is that when I stop then
> restart the application all my datastore object are cleaned, an from that
> moment, even if I delete a node, it isn't deleted from the datastore.
The problem is the objects are still in the cache. The garbage
collection is very cautious, and items in the cache (or somewhere else
in memory) are not deleted. This is done using a weak reference hash
map. Once the items are garbage collected in memory, they can be
garbage collected in the data store.
Regards,
Thomas