OK, so, I just have to understand your code, now, Mr Denbo ;o)
What I've understood it that you wait for an event before unlocking, isn't
it ?
But could you tell me was is that rNode ? I don't where it comes from...
Thanx
>
> SDRFrame.startAnimation();
> try {
> if(resourceExists_) {
> oldResource_.lockMethod();
> result = oldResource_.putMethod(file_);
> } else {
> result = web_.putMethod(path_, file_);
> }
>
> if(result) {
> PropertyChangeEvent pce = new PropertyChangeEvent(rNode_,
> "childAdded", Boolean.FALSE, Boolean.TRUE);
> changes_.firePropertyChange(pce);
> } else {
> JOptionPane.showMessageDialog(resource_, web_.getStatusMessage(),
> "Put operation failed",
> JOptionPane.ERROR_MESSAGE);
> }
> if(resourceExists_) oldResource_.unlockMethod();
> } catch (IOException ioe) {
> ioe.printStackTrace();
> } catch (HttpException he) {
> he.printStackTrace();
> } finally {
> SDRFrame.stopAnimation();
> }
>
>
> At 04:05 PM 4/2/2002 +0200, you wrote:
> >Hi,
> >
> >I'm implementing the lock/unlock mechanism using the Slide client API.
> >When I lock a resource with a given user and a given timeout, and if I
> >want to unlock it, the api doesn't see that the user is the same : it
says
> >that the resource is locked (code 423), but in the code, it finds a lock
> >value null in this part of the unlockMethod :
> >
> > setClient();
> > // Get the lock for the given path.
> > WebdavState state = (WebdavState) client.getState();
> > // Check the given path is alright.
> > path = HttpURL.getPath(path);
> > String lock = state.getLock(path);
> > if (lock == null)
> > return false; // so it stops there
> >
> >Can someone tell me why ?
> >How can I 'keep' the lock to be sure I can unlock a resource ?
> >
> >Thanx
>
> ==================================================
> Donald W. Denbo [EMAIL PROTECTED]
> Ph: (206) 526-4487 Fax: (206) 526-6744
> Collaborative tools: http://www.epic.noaa.gov/collab/
> Netcdf Browser: http://www.epic.noaa.gov/java/ncBrowse
> Scientific Java Graphics: http://www.epic.noaa.gov/java/sgt
> EPIC Oceangraphic Data Management: http://www.pmel.noaa.gov/epic
> ==================================================
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>