2.12.0-SNAP: static operation class, bypassed mongo close

This commit is contained in:
Roberto Cirillo 2021-04-01 10:15:03 +02:00
parent add9810644
commit eb74e06cdf
9 changed files with 24 additions and 49 deletions

View File

@ -6,23 +6,14 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/target/

View File

@ -1,12 +1,13 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.7
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.8

View File

@ -1,5 +1,11 @@
# Changelog for storage-manager-core
## [v2.12.0-SNAPSHOT]
* One pool for every operation: static Operation class; no mongo close operation
## [v2.10.0-SNAPSHOT]
* upgrade mongo-java-driver to 3.12.0
## [v2.10.0-SNAPSHOT]
* added input parameter to getSize method in order to be compatible with the needed of s3 client

View File

@ -8,7 +8,7 @@
</parent>
<groupId>org.gcube.contentmanagement</groupId>
<artifactId>storage-manager-core</artifactId>
<version>2.11.0-SNAPSHOT</version>
<version>2.12.0-SNAPSHOT</version>
<!-- <properties> -->
<!-- <distroDirectory>${project.basedir}/distro</distroDirectory> -->
<!-- </properties> -->

View File

@ -1062,12 +1062,13 @@ public class MongoIOManager {
*/
public void close() {
if(mongo!=null)
mongo.close();
// if(mongo!=null)
// mongo.close();
logger.info(" no close()");
logger.info("Mongo has been closed");
mongo=null;
gfs=null;
db=null;
// mongo=null;
// gfs=null;
// db=null;
}
public void removeGFSFile(GridFSDBFile f, ObjectId idF){

View File

@ -31,8 +31,8 @@ public class MongoInputStream extends ProxyInputStream{
} catch (IOException e) {
e.printStackTrace();
}
if (mongo!=null)
mongo.close();
// if (mongo!=null)
// mongo.close();
setClosed(true);
}
}

View File

@ -66,7 +66,7 @@ public class MongoOutputStream extends ProxyOutputStream {
// TODO Auto-generated catch block
e.printStackTrace();
}
mongo.close();
// mongo.close();
setClosed(true);
}
}

View File

@ -1,25 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<Resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ID />
<Type>Service</Type>
<Profile>
<Description>${description}</Description>
<Class>ContentManagement</Class>
<Name>storage-manager-core</Name>
<Version>1.0.0</Version>
<Packages>
<Software>
<Name>storage-manager-core</Name>
<Version>2.9.0-SNAPSHOT</Version>
<MavenCoordinates>
<groupId>org.gcube.contentmanagement</groupId>
<artifactId>storage-manager-core</artifactId>
<version>2.9.0-SNAPSHOT</version>
</MavenCoordinates>
<Files>
<File>storage-manager-core-2.9.0-SNAPSHOT.jar</File>
</Files>
</Software>
</Packages>
</Profile>
</Resource>