You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by "Kalka, Edyta" <Ed...@pl.compuware.com> on 2006/12/20 10:58:19 UTC

UNLOCK with 'abort' transaction status don't abort the transaction

Hi,

I have the following sequence of webdav command calls:

############# LOCK request ##################
LOCK
http://localhost:8080/org.eclipse.corona.jackrabbit.web/server/Jackrabbi
tDemoWorkspace/corona%3aroot/DemoDirectory2
Depth: infinity
Timeout: Second-60
Content-Type: text/xml; charset="UTF8"

<?xml version="1.0" encoding="UTF-8"?>
<D:lockinfo xmlns:D="DAV:">
	<D:lockscope>
      	<dcr:local xmlns:dcr="http://www.day.com/jcr/webdav/1.0"/>
       </D:lockscope>
       <D:locktype>
       	<dcr:transaction xmlns:dcr="http://www.day.com/jcr/webdav/1.0"/>
      </D:locktype>
 </D:lockinfo>
##############################################
############# LOCK response ##################
200 OK
content-type: text/xml;charset=UTF-8
date: Tue, 19 Dec 2006 17:39:27 GMT
lock-token: <opaquelocktoken:b7a1dc68-3160-4380-9266-6169e00a2f5a>
server: Apache-Coyote/1.1
content-length: 649

<?xml version="1.0" encoding="UTF-8"?>
<D:prop xmlns:D="DAV:">
    <D:lockdiscovery>
        <D:activelock>
            <D:lockscope>
                <dcr:local
xmlns:dcr="http://www.day.com/jcr/webdav/1.0"/>
            </D:lockscope>
            <D:locktype>
                <dcr:transaction
xmlns:dcr="http://www.day.com/jcr/webdav/1.0"/>
            </D:locktype>
            <D:depth>infinity</D:depth>
            <D:timeout>Second-60</D:timeout>
            <D:locktoken>
 
<D:href>opaquelocktoken:b7a1dc68-3160-4380-9266-6169e00a2f5a</D:href>
            </D:locktoken>
        </D:activelock>
    </D:lockdiscovery>
</D:prop>
##############################################
############# MKCOL request ##################
MKCOL
http://localhost:8080/org.eclipse.corona.jackrabbit.web/server/Jackrabbi
tDemoWorkspace/corona%3aroot/DemoDirectory2/WA/
Lock-Token: <opaquelocktoken:b7a1dc68-3160-4380-9266-6169e00a2f5a>
Content-Type: text/xml; charset="UTF8"

<?xml version="1.0" encoding="UTF-8"?>
<sv:node xmlns:sv="http://www.jcp.org/jcr/sv/1.0"
xmlns:jcr="http://www.jcp.org/jcr/1.0"
xmlns:nt="http://www.jcp.org/jcr/nt/1.0" sv:name="WA">
       <sv:property sv:name="jcr:primaryType" sv:type="Name">
       <sv:value>nt:folder</sv:value>
</sv:property>
<sv:property sv:name="jcr:mixinTypes" sv:type="Name">
       <sv:value>mix:referenceable</sv:value>
       <sv:value>mix:lockable</sv:value>
       </sv:property>
</sv:node>
##############################################
############# MKCOL response ##################
201 Created
date: Tue, 19 Dec 2006 17:39:27 GMT
server: Apache-Coyote/1.1
content-length: 0

##############################################
############# UNLOCK request ##################
UNLOCK
http://localhost:8080/org.eclipse.corona.jackrabbit.web/server/Jackrabbi
tDemoWorkspace/corona%3aroot/DemoDirectory2
Depth: infinity
Lock-Token: <opaquelocktoken:b7a1dc68-3160-4380-9266-6169e00a2f5a>
Content-Type: text/xml; charset="UTF8"

<?xml version="1.0" encoding="UTF-8"?>
<dcr:transactioninfo xmlns:dcr="http://www.day.com/jcr/webdav/1.0">
       <dcr:transactionstatus><dcr:abort/></dcr:transactionstatus>
</dcr:transactioninfo>
##############################################
############# UNLOCK response ##################
204 No Content
date: Tue, 19 Dec 2006 17:39:30 GMT
server: Apache-Coyote/1.1
__________________________________________________________________


This sequence resulted in creation of 'WA' node though UNLOCK command
contained "abort" transaction status.
Why the transaction was not aborted?
What should I do to be able to rollback transaction?

The same situation happens if UNLOCK command is not called (no commit
takes place).

Best regards
Edyta Kalka
The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential. Unless you are the named addressee or an authorized designee, you may not copy or use it, or disclose it to anyone else. If you received it in error please notify us immediately and then destroy it. 

Re: UNLOCK with 'abort' transaction status don't abort the transaction

Posted by Julian Reschke <ju...@gmx.de>.
Kalka, Edyta schrieb:
> Hi,
> 
> I have the following sequence of webdav command calls:
> ...

I can't contribute to the question, but it reminds me that we really 
need to review how the Jackrabbit WebDAV stack is marshalling 
transactions. I know that it's borrowed from Exchange and Slide, but 
that doesn't mean it's the right thing to do...

Best regards, Julian

Re: UNLOCK with 'abort' transaction status don't abort the transaction

Posted by Angela Schreiber <an...@day.com>.
hi

please note, that the 'local' scope only informs the
server, that any subsequent modification flaged with the
locktoken return by this special LOCK request must
be treated as transient modification. Session.save() or
Item.save() will be called upon the UNLOCK only.

see the corresponding docu draft at

http://www.day.com/jsr170/server/JCR_Webdav_Protocol.zip

real transaction is not supported anyway at the moment,
since it has been decided once, that dependency to
jackrabbit-core should be present in the jcr-server. the
corresponding code therefore was commented.

regards
angela