Search Mailing List Archives

Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-discussion] (Protege Server 3.4.3 database-backend) connections to db are not released

sonre rextr06 at
Tue Feb 23 01:29:30 PST 2010

Dear Timothy Redmond, after some examination, we observed that the large
number connections come from the imported ontologies. Although the same
ontologies are imported by different projects, a new connection is open for
each import again and again. Here are the details:

1- We have 33 projects all of which imports the same 5 ontologies.
2- When we start the Protege server, we observe (with mysql administrator)
that 166 new connections are opened. We guess that 33*5 = 165 connections
are open for the imports and 1 connection is shared by all 33 projects (main
owl files). 
3- When we create a new project with no imports, 1 new connection is opened.
When we restart the server this connection is not opened again. So, the
total # of connections are not changed.
4- When we create a new project with 5 imports, 6 new connections are
opened. When we restart the server, we observe the total # of connections
are increased by 5.

Therefore, we think that there is a problem with our import mechanism or
it's a bug.

Here is the code for creating a db project on server. This function is
called for creating a new project with the name "newProjectName":

public Project createDBProject(String newProjectName) {

String db_url = "jdbc:mysql://localhost:3306/protege";
String db_driver = "com.mysql.jdbc.Driver";
String db_user = "root";
String db_pass = "pass";

Collection errors = new ArrayList();
OwlDatabaseCreator creator = new OwlDatabaseCreator(true);

DatabaseRepository repository = new DatabaseRepository(db_driver, db_url,
db_user, db_pass, "import1");

Project p = creator.getProject();
p.setProjectURI(URIUtilities.createURI("ontology" + File.separator +
newProjectName + ".pprj"));
KnowledgeBase kb = p.getKnowledgeBase();
OWLModel owlModel = (OWLModel)kb;
+ newProjectName + ".owl#");
String defaultNameSpace = "" + newProjectName +

ImportHelper importHelper = new ImportHelper(owlModel);
Collection prefixes = new
Collection<URI> uris = repository.getOntologies();
for(URI uri:uris) {

importHelper.addImport(repository.getTableToOntologyMap().get("scm")); //
for some reason import5 is not added by the loop above, so we add it again
manually. Note: import5 is the main schema.
return p;

Note: These 5 imports are also db projects, created with the same
db_url,driver,user and pass. Only difference is that they are created with
Protege User Interface with the command "Convert Project To Format -->
OWL/RDF Database"

Best Regards,

View this message in context:
Sent from the Protege Discussion mailing list archive at

More information about the protege-discussion mailing list