The problem lies with ECM not respecting shutdown order based on dependency information. What happens is that some components, such as the default store, use the persistent store during the dispose() stage. But at that time the persistent store itself has already been disposed (nullifying its state - hence the NPE). I just discovered that the latest SourceResolverImpl also suffers from this limitation in ECM. When you release a Source in a dispose method the SourceResolver and its SourceFactories may have been already disposed itself, leading to NPE's and the like.


I don't see how this can be fixed short of implementing shutdown ordering based on dependency information in ECM. Off course we'd have to extend the component contract for that as well so that components should state their dependencies thus enabling the container to use that info for said purpose. Fortress does have this ablitity, maybe we could borrow some of its code and implement it in our own container solution (whatever that may turn out to be).

Thoughts?

--
Unico


Andrzej Jan Taramina wrote:


Hi all:

I've noticed a strange problem with Cocoon 2.1.4. When I shut down Tomcat,
it throws the following exception:


ERROR   (2004-03-21) 09:50.29:718   [core.store.persistent] (Unknown-URI)
Unknown-thread/AbstractJispFilesystemStore: store(..): Exception
java.io.IOException: Cannot create a file when that file already exists
        at java.io.RandomAccessFile.length(Native Method)
        at
com.coyotegulch.jisp.ObjectDatabaseFile.writeObject(ObjectDatabaseFile.java:22
7)
        at
com.coyotegulch.jisp.IndexedObjectDatabase.write(IndexedObjectDatabase.java:19
9)
        at
org.apache.excalibur.store.impl.AbstractJispFilesystemStore.doStore(AbstractJi
spFilesystemStore.java:183)
        at
org.apache.excalibur.store.impl.AbstractReadWriteStore.store(AbstractReadWrite
Store.java:143)
        at
org.apache.excalibur.store.impl.MRUMemoryStore.dispose(MRUMemoryStore.java:199
)

My cocoon.xconf entries for the store look like this:

<store logger="core.store">
<parameter name="maxobjects" value="8000"/> </store>
<persistent-store logger="core.store.persistent">
<parameter name="use-cache-directory" value="true"/>
<parameter name="order" value="2701"/>
</persistent-store>


I've managed to resolve the problem by adding:

<parameter name="use-persistent-cache" value="false"/>

To the <store> configuration, but would like to figure out what is causing
this problem?

Thanks!


Andrzej Jan Taramina Chaeron Corporation: Enterprise System Solutions http://www.chaeron.com


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to