Hello,

I try to get the content stream of a resource. This happens NOT inside a transaction 
with these statements:

        String uri = ...;
        NodeRevisionDescriptors revisions = content.retrieve(slideToken, uri);
        NodeRevisionDescriptor revision = content.retrieve(slideToken, revisions);
        NodeRevisionContent revisionContent = content.retrieve(slideToken, revisions, 
revision);
        return revisionContent.streamContent();

This delivers the content stream as expected. It can be read successfully. After 
having used the InputStream it is closed by calling its close() method. Then there 
follows a Macro.remove(...) inside a transaction which includes the resource to be 
deleted. I receive the error attached at the end after - as it seems - a timeout.

It seems to me that Slide cannot acquire a lock on a resource to delete. Does getting 
the input stream lock the resource? And how to release the lock? If this is the 
problem...

I use Slide 2.1b1 storing content and metadata in the file system. All features are 
switched on in slide.properties. When I ran the same test against Slide 2.0 it worked. 
Has something changed?

Very pleased about hints
Stefan

13 Aug 2004 13:49:50 - org.apache.commons.transaction.file.FileResourceManager - 
WARNING - Could not commit tx main-1092397550645-26, rolling back instead
13 Aug 2004 13:49:50 - org.apache.commons.transaction.file.FileResourceManager - 
WARNING - org.apache.commons.transaction.file.ResourceManagerException: 
main-1092397550645-26: Could not upgrade to commit lock for resource at 
'/1092397544224.20_1.0' (ERR_NO_LOCK)
org.apache.commons.transaction.file.ResourceManagerException: main-1092397550645-26: 
Could not upgrade to commit lock for resource at '/1092397544224.20_1.0' (ERR_NO_LOCK)
    at 
org.apache.commons.transaction.file.FileResourceManager$TransactionContext.upgradeLockToCommit(FileResourceManager.java:1396)
    at 
org.apache.commons.transaction.file.FileResourceManager$TransactionContext.commit(FileResourceManager.java:1345)
    at 
org.apache.commons.transaction.file.FileResourceManager.commitTransaction(FileResourceManager.java:608)
    at 
org.apache.slide.store.txfile.AbstractTxFileStoreService.commit(AbstractTxFileStoreService.java:253)
    at org.apache.slide.transaction.SlideTransaction.commit(SlideTransaction.java:300)
    at 
org.apache.slide.transaction.SlideTransactionManager.commit(SlideTransactionManager.java:186)
    at 
org.apache.slide.common.NamespaceAccessTokenImpl.commit(NamespaceAccessTokenImpl.java:423)
    ...

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

Reply via email to