public void closeSession() { lock(true); try { if (myConnection != null) { try { myConnection.close(); } catch (SVNException e) { // } finally { myConnection = null; } } } finally { unlock(); } }
public void closeSession() { lock(true); try { if (myConnection != null) { try { myConnection.close(); } catch (SVNException e) { // } finally { myConnection = null; } } } finally { unlock(); } }
public void closeSession() { lock(true); try { if (myConnection != null) { try { myConnection.close(); } catch (SVNException e) { // } finally { myConnection = null; } } } finally { unlock(); } }
private void openConnection() throws SVNException { if (myConnection != null) { // attempt to reparent, close connection if reparent failed. if (reparent(getLocation())) { return; } } lock(); ISVNConnector connector = SVNRepositoryFactoryImpl.getConnectorFactory().createConnector(this); myConnection = new SVNConnection(connector, this); try { myConnection.open(this); authenticate(); } finally { myRealm = myConnection.getRealm(); } }
private boolean reparent(SVNURL url) throws SVNException { if (myConnection != null) { if (getLocation().equals(url)) { return true; } lock(); try { Object[] buffer = new Object[] {"reparent", url.toString()}; write("(w(s))", buffer); authenticate(); read("[()]", null, true); return true; } catch (SVNException e) { closeSession(); if (e instanceof SVNCancelException || e instanceof SVNAuthenticationException) { throw e; } } finally { unlock(); } } return false; }
protected void openConnection() throws SVNException { lock(); fireConnectionOpened(); // check if connection is stale. if (myConnection != null && myConnection.isConnectionStale()) { closeSession(); } if (myConnection != null) { if (reparent(getLocation())) { return; } closeSession(); } ISVNConnector connector = SVNRepositoryFactoryImpl.getConnectorFactory().createConnector(this); myConnection = new SVNConnection(connector, this); try { myConnection.open(this); authenticate(); } finally { if (myConnection != null) { myRealm = myConnection.getRealm(); } } }
protected void openConnection() throws SVNException { fireConnectionOpened(); lock(); // check if connection is stale. if (myConnection != null && myConnection.isConnectionStale()) { closeSession(); } if (myConnection != null) { if (reparent(getLocation())) { return; } closeSession(); } ISVNConnector connector = SVNRepositoryFactoryImpl.getConnectorFactory().createConnector(this); myConnection = new SVNConnection(connector, this); try { myConnection.open(this); authenticate(); } finally { if (myConnection != null) { myRealm = myConnection.getRealm(); } } }
protected void openConnection() throws SVNException { lock(); fireConnectionOpened(); // check if connection is stale. if (myConnection != null && myConnection.isConnectionStale()) { closeSession(); } if (myConnection != null) { if (reparent(getLocation())) { return; } closeSession(); } ISVNConnector connector = SVNRepositoryFactoryImpl.getConnectorFactory().createConnector(this); myConnection = new SVNConnection(connector, this); try { myConnection.open(this); authenticate(); } finally { if (myConnection != null) { myRealm = myConnection.getRealm(); } } }