ORM DB connections

Hi,

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.

Is there any configuration option for this ?

Using Lucee 4.5.1

Thanks–
David Sedeño

Hi David

I can confirm this behaviour from a test with one additional ORM
datasource, although on each page reload an extra connection only
seems to be opened for the second datasource, not both.

Not good though. I would raise a ticket.

Meantime if your various datasources are all on the same database
server and permissions allow, then you could try using the “catalog”
attribute in your cfcomponent tag/script to reference the name of the
relevant database, e.g.

[application.cfc]
this.datasource=“datasource1”;

[model2.cfc]
component persistent=“true” catalog=“database2”{}

Julian.On 4 June 2015 at 16:48, David Sedeño <@David_Sedeno> wrote:

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.

Is there any configuration option for this ?

Using Lucee 4.5.1

Hi Julian,

Sadly we have our historic data in another database server so I can’t use
the catalog attribute.

In jira I see some ORM related bugs that also affects us. Is there any plan
to take an eye to this bugs ?

https://luceeserver.atlassian.net/browse/LDEV-78
https://luceeserver.atlassian.net/browse/LDEV-96

I think my company could put some money in order to try to solve this bugs
more quickly. I need to contact Rasia for this ?

Thanks—
David Sedeño

El jueves, 4 de junio de 2015, 21:48:13 (UTC+2), Julian Halliwell escribió:

Hi David

I can confirm this behaviour from a test with one additional ORM
datasource, although on each page reload an extra connection only
seems to be opened for the second datasource, not both.

Not good though. I would raise a ticket.

Meantime if your various datasources are all on the same database
server and permissions allow, then you could try using the “catalog”
attribute in your cfcomponent tag/script to reference the name of the
relevant database, e.g.

[application.cfc]
this.datasource=“datasource1”;

[model2.cfc]
component persistent=“true” catalog=“database2”{}

Julian.

On 4 June 2015 at 16:48, David Sedeño <tco...@gmail.com <javascript:>> wrote:

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.

Is there any configuration option for this ?

Using Lucee 4.5.1

Great to see the “in development” status, Micha. Looking forward to
the various ORM connection-related problems introduced around the time
of the fork being fixed at last.On 25 June 2015 at 09:58, Michael Offner <@Michael_Offner> wrote:

ticket created for issue:
[LDEV-405] - Lucee

ticket created for issue:
[LDEV-405] - Lucee Fri, Jun 5, 2015 at 10:43 AM, David Sedeño <@David_Sedeno> wrote:

Hi Julian,

Sadly we have our historic data in another database server so I can’t use
the catalog attribute.

In jira I see some ORM related bugs that also affects us. Is there any
plan to take an eye to this bugs ?

[LDEV-78] - Lucee
[LDEV-96] - Lucee

I think my company could put some money in order to try to solve this bugs
more quickly. I need to contact Rasia for this ?

Thanks

David Sedeño

El jueves, 4 de junio de 2015, 21:48:13 (UTC+2), Julian Halliwell escribió:

Hi David

I can confirm this behaviour from a test with one additional ORM
datasource, although on each page reload an extra connection only
seems to be opened for the second datasource, not both.

Not good though. I would raise a ticket.

Meantime if your various datasources are all on the same database
server and permissions allow, then you could try using the “catalog”
attribute in your cfcomponent tag/script to reference the name of the
relevant database, e.g.

[application.cfc]
this.datasource=“datasource1”;

[model2.cfc]
component persistent=“true” catalog=“database2”{}

Julian.

On 4 June 2015 at 16:48, David Sedeño tco...@gmail.com wrote:

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.

Is there any configuration option for this ?

Using Lucee 4.5.1

–
You received this message because you are subscribed to the Google Groups
“Lucee” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to lucee+unsubscribe@googlegroups.com.
To post to this group, send email to lucee@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/lucee/a11ff001-5188-4c19-aa67-90fd7cd89394%40googlegroups.com
https://groups.google.com/d/msgid/lucee/a11ff001-5188-4c19-aa67-90fd7cd89394%40googlegroups.com?utm_medium=email&utm_source=footer
.

For more options, visit https://groups.google.com/d/optout.