added finalize method to close connections
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portal/social-networking-library@130203 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
e5fa6e59a7
commit
7f8cfda84d
|
@ -332,6 +332,11 @@ public class CassandraClusterConnection {
|
|||
columnFamilyDefinition.addColumnDefinition(typeCDef);
|
||||
return columnFamilyDefinition;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected void finalize() throws Throwable {
|
||||
super.finalize();
|
||||
_log.info("On Finalize called...");
|
||||
this.closeConnection();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2409,12 +2409,4 @@ public final class DBCassandraAstyanaxImpl implements DatabookStore {
|
|||
return ids;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void finalize() throws Throwable {
|
||||
super.finalize();
|
||||
_log.info("On Finalize called...");
|
||||
this.closeConnection();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue