ORM DB connections

Description

We are in process to add more ORM models with other databases with the datasource="another_db" option in the models.

The problem we have seen is that when you simple do a EntityLoad of any model, lucee open N connections to the DB, with N=number of distinct datasource you have in your models.

So, if you have:

model1.cfc -> datasource1 (main datasource, without datasource option in the model)
model2.cfc -> datasource2
model3.cfc -> datasource3
model4.cfc -> datasource4

And you do:

EntityLoadByPk('model1', 1);

Lucee (in my case Tomcat), always open 4 database connections and not reuse existing ones. So if you reload the page, you have 8 DB connections and so on.

We are trying to add our historical dbs (13 models) and this issue blocks us of doing it.

Environment

None

Activity

Show:
Michael Offner
June 25, 2015, 12:41 PM

problem is the connections are hold in the HibernateSession, but lucee creates a new session with every request and does not release the old sessions!

Julian Halliwell
June 25, 2015, 12:50 PM

Micha, could this be related to https://luceeserver.atlassian.net/browse/LDEV-119 where connections are also not being closed after calling OrmReload()?

Michael Offner
June 25, 2015, 1:59 PM
Michael Offner
June 25, 2015, 2:02 PM
Edited

@Julian (i will check, see upcoming comment in that ticket)

Fixed

Assignee

Michael Offner

Reporter

Michael Offner

Priority

Major

Labels

Fix versions

Affects versions

Configure