Strabon

changeset 314:ccb074b1d2a1

endpoint: close strabon only when not null (case when you shutdown tomcat and a connection has failed to be established)
author Babis Nikolaou <charnik@di.uoa.gr>
date Thu Jun 21 14:16:37 2012 +0300 (2012-06-21)
parents 998fb3bcc29e
children d8aa169eb72b
files endpoint/src/main/java/eu/earthobservatory/org/StrabonEndpoint/StrabonBeanWrapper.java
line diff
     1.1 --- a/endpoint/src/main/java/eu/earthobservatory/org/StrabonEndpoint/StrabonBeanWrapper.java	Thu Jun 21 13:23:28 2012 +0300
     1.2 +++ b/endpoint/src/main/java/eu/earthobservatory/org/StrabonEndpoint/StrabonBeanWrapper.java	Thu Jun 21 14:16:37 2012 +0300
     1.3 @@ -175,7 +175,9 @@
     1.4  	}
     1.5  
     1.6  	public void destroy() throws Exception {
     1.7 -		strabon.close();
     1.8 +		if (strabon != null) {
     1.9 +			strabon.close();
    1.10 +		}
    1.11  	}
    1.12  
    1.13  	public Object query(String queryString, String answerFormatStrabon)