Cfadmin create/update datasource

I can create/update a datasource dynamically using cfadmin - but the one
thing I cannot figure out how to do (or find documentation on) - is how to
set that datasource as “Allow to use this datasource as client/session
storage.”

I can do it from the Lucee Admin - but I need a way to do it from inside my
app when I am/need to create/update the datasource

Example - I create the datasource like this:

I need a way to set the “storage:true” flag on this datasource so that it
can be used for client variable storageOn Friday, April 8, 2016 at 11:30:02 AM UTC-5, Sid Wing wrote:

I can create/update a datasource dynamically using cfadmin - but the one
thing I cannot figure out how to do (or find documentation on) - is how to
set that datasource as “Allow to use this datasource as client/session
storage.”

I can do it from the Lucee Admin - but I need a way to do it from inside
my app when I am/need to create/update the datasource

In your application, you would want to first define a master connection to
the db server, with full rights.

Next you would want to create an environment class called inside the
application that looked up a table for your db sources.

in the lookup table you would store the db source, connection name,
username, password and any other fields you find useful, such as
application_environment or what not.

At least that is how I would do it. I am sure there are some far more
veteran CF folks who would tell you to make a CFC, or explain why you
really shouldn’t do this.On Friday, April 8, 2016 at 12:30:02 PM UTC-4, Sid Wing wrote:

I can create/update a datasource dynamically using cfadmin - but the one
thing I cannot figure out how to do (or find documentation on) - is how to
set that datasource as “Allow to use this datasource as client/session
storage.”

I can do it from the Lucee Admin - but I need a way to do it from inside
my app when I am/need to create/update the datasource

Sid,

Have a look in the source of the Lucee Administrator. There you’ll find the file services.datasource.create.cfm. There it has the following entry:

                    <cfadmin action="updateDatasource" type="#request.adminType#" password="#session["password"&request.adminType]#"

                                

                                classname="#driver.getClass()#"

                                dsn="#driver.getDSN()#"

                                                                    

                                name="#form.name#"

                                newName="#form.newName#"

                                

                                host="#form.host#"

                                database="#form.database#"

                                port="#form.port#"

                                timezone="#form.timezone#"

                                dbusername="#form.username#"

                                dbpassword="#form.password#"

                                

                                connectionLimit="#form.connectionLimit#"

                                connectionTimeout="#form.connectionTimeout#"

                                metaCacheTimeout="#form.metaCacheTimeout#"

                                blob="#getForm('blob',false)#"

                                clob="#getForm('clob',false)#"

                                validate="#getForm('validate',false)#"

                                storage="#getForm('storage',false)#"

                                

                                allowed_select="#getForm('allowed_select',false)#"

                                allowed_insert="#getForm('allowed_insert',false)#"

                                allowed_update="#getForm('allowed_update',false)#"

                                allowed_delete="#getForm('allowed_delete',false)#"

                                allowed_alter="#getForm('allowed_alter',false)#"

                                allowed_drop="#getForm('allowed_drop',false)#"

                                allowed_revoke="#getForm('allowed_revoke',false)#"

                                allowed_create="#getForm('allowed_create',false)#"

                                allowed_grant="#getForm('allowed_grant',false)#"

                                verify="#verify#"

                                custom="#custom#"

                                dbdriver="#dbdriver#"

                                remoteClients="#request.getRemoteClients()#">

                                <cfset form.mark="update">

I presume the bold line above is what you are looking for…

Sincerely
Gert Franz

RASIA GmbH

Spittelgasse 7

5103 Moeriken-Wildegg

Switzerland

Email: mailto:Gert_Franz @Gert_Franz
Skype: gert.franz

Phone Switzerland: +41 76 5680 231Von: lucee@googlegroups.com [mailto:lucee@googlegroups.com] Im Auftrag von Sid Wing
Gesendet: Freitag, 8. April 2016 19:15
An: Lucee
Betreff: [Lucee] Re: cfadmin create/update datasource

Example - I create the datasource like this:

<cfadmin action=“updateDatasource”

                                                                                            type="server"

                                                                                            password="#LuceeADMPWD#"

                                                                                            dbdriver="#dbDriver#"

                                                                                            database="#regModel.theDB#"

                                                                                            classname="#theClassname#"

                                                                                            dsn="#connstring#"

                                                                                            host="#regModel.theHost#"

                                                                                            name="#theDSN#"

                                                                                            newname="#theDSN#"

                                                                                            port="#regModel.thePort#"

                                                                                            blob="true"

                                                                                            clob="true"

                                                                                            dbusername="#regModel.dsnU#"

                                                                                            dbpassword="#regModel.dsnP#">

I need a way to set the “storage:true” flag on this datasource so that it can be used for client variable storage

On Friday, April 8, 2016 at 11:30:02 AM UTC-5, Sid Wing wrote:

I can create/update a datasource dynamically using cfadmin - but the one thing I cannot figure out how to do (or find documentation on) - is how to set that datasource as “Allow to use this datasource as client/session storage.”

I can do it from the Lucee Admin - but I need a way to do it from inside my app when I am/need to create/update the datasource


Love Lucee? Become a supporter and be part of the Lucee project today! - http://lucee.org/supporters/become-a-supporter.html

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/29f488e2-f933-4be0-ad05-bd02c63fb682%40googlegroups.com https://groups.google.com/d/msgid/lucee/29f488e2-f933-4be0-ad05-bd02c63fb682%40googlegroups.com?utm_medium=email&utm_source=footer .
For more options, visit https://groups.google.com/d/optout.

I’m already doing all of that, actually. What I am looking for is the way
to mark the datasource as “Allow to use this datasource as client/session
storage”. I can set the “blob” and “clob” settings - with attributes -
just wanting to know how to set THAT flag (Allow to use…) as wellOn Fri, Apr 8, 2016 at 11:40 AM, Terry Whitney <@Terry_Whitney> wrote:

In your application, you would want to first define a master connection to
the db server, with full rights.

Next you would want to create an environment class called inside the
application that looked up a table for your db sources.

in the lookup table you would store the db source, connection name,
username, password and any other fields you find useful, such as
application_environment or what not.

At least that is how I would do it. I am sure there are some far more
veteran CF folks who would tell you to make a CFC, or explain why you
really shouldn’t do this.

On Friday, April 8, 2016 at 12:30:02 PM UTC-4, Sid Wing wrote:

I can create/update a datasource dynamically using cfadmin - but the one
thing I cannot figure out how to do (or find documentation on) - is how to
set that datasource as “Allow to use this datasource as client/session
storage.”

I can do it from the Lucee Admin - but I need a way to do it from inside
my app when I am/need to create/update the datasource


Love Lucee? Become a supporter and be part of the Lucee project today! -
http://lucee.org/supporters/become-a-supporter.html

You received this message because you are subscribed to a topic in the
Google Groups “Lucee” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/lucee/1il7osoO58A/unsubscribe.
To unsubscribe from this group and all its topics, 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/7922d9ac-7f7b-44be-acd4-bdbc1110c29e%40googlegroups.com
https://groups.google.com/d/msgid/lucee/7922d9ac-7f7b-44be-acd4-bdbc1110c29e%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.


Sid Wing
“We are dreamers, shapers, singers, and makers. We study the mysteries of
laser and circuit, crystal and scanner, holographic demons and invocations
of equations. These are the tools we employ, and we know many things.” -
Elric

Hi Gert!

I actually tried: storage=“true” (because that seemed logical) - but when
it created the datasource - it did not have the storage flag…

We are running version - Lucee 4.5.2.018 finalOn Fri, Apr 8, 2016 at 12:35 PM, Gert Franz <@Gert_Franz> wrote:

Sid,

Have a look in the source of the Lucee Administrator. There you’ll find
the file services.datasource.create.cfm. There it has the following entry:

                    <cfadmin action="updateDatasource"

type="#request.adminType#"
password="#session[“password”&request.adminType]#"

                                classname="#driver.getClass()#"

                                dsn="#driver.getDSN()#"



                                name="#form.name#"

                                newName="#form.newName#"



                                host="#form.host#"

                                database="#form.database#"

                                port="#form.port#"

                                timezone="#form.timezone#"

                                dbusername="#form.username#"

                                dbpassword="#form.password#"

connectionLimit="#form.connectionLimit#"

connectionTimeout="#form.connectionTimeout#"

metaCacheTimeout="#form.metaCacheTimeout#"

                                blob="#getForm('blob',false)#"

                                clob="#getForm('clob',false)#"

                                validate="#getForm('validate',false)#"
  •                                storage="#getForm('storage',false)#"*
    

allowed_select="#getForm(‘allowed_select’,false)#"

allowed_insert="#getForm(‘allowed_insert’,false)#"

allowed_update="#getForm(‘allowed_update’,false)#"

allowed_delete="#getForm(‘allowed_delete’,false)#"

allowed_alter="#getForm(‘allowed_alter’,false)#"

allowed_drop="#getForm(‘allowed_drop’,false)#"

allowed_revoke="#getForm(‘allowed_revoke’,false)#"

allowed_create="#getForm(‘allowed_create’,false)#"

allowed_grant="#getForm(‘allowed_grant’,false)#"

                                verify="#verify#"

                                custom="#custom#"

                                dbdriver="#dbdriver#"

remoteClients="#request.getRemoteClients()#">

                                <cfset form.mark="update">

I presume the bold line above is what you are looking for…

Sincerely
Gert Franz

RASIA GmbH

Spittelgasse 7

5103 Moeriken-Wildegg

Switzerland

Email: @Gert_Franz
Skype: gert.franz

Phone Switzerland: +41 76 5680 231

Von: lucee@googlegroups.com [mailto:lucee@googlegroups.com] *Im Auftrag
von *Sid Wing
Gesendet: Freitag, 8. April 2016 19:15
An: Lucee
Betreff: [Lucee] Re: cfadmin create/update datasource

Example - I create the datasource like this:

<cfadmin action=“updateDatasource”

type=“server”

password="#LuceeADMPWD#"

dbdriver="#dbDriver#"

database="#regModel.theDB#"

classname="#theClassname#"

dsn="#connstring#"

host="#regModel.theHost#"

name="#theDSN#"

newname="#theDSN#"

port="#regModel.thePort#"

blob=“true”

clob=“true”

dbusername="#regModel.dsnU#"

dbpassword="#regModel.dsnP#">

I need a way to set the “storage:true” flag on this datasource so that it
can be used for client variable storage

On Friday, April 8, 2016 at 11:30:02 AM UTC-5, Sid Wing wrote:

I can create/update a datasource dynamically using cfadmin - but the one
thing I cannot figure out how to do (or find documentation on) - is how to
set that datasource as "Allow to use this datasource as client/session
storage."

I can do it from the Lucee Admin - but I need a way to do it from inside
my app when I am/need to create/update the datasource


Love Lucee? Become a supporter and be part of the Lucee project today! -
http://lucee.org/supporters/become-a-supporter.html

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/29f488e2-f933-4be0-ad05-bd02c63fb682%40googlegroups.com
https://groups.google.com/d/msgid/lucee/29f488e2-f933-4be0-ad05-bd02c63fb682%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.


Love Lucee? Become a supporter and be part of the Lucee project today! -
http://lucee.org/supporters/become-a-supporter.html

You received this message because you are subscribed to a topic in the
Google Groups “Lucee” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/lucee/1il7osoO58A/unsubscribe.
To unsubscribe from this group and all its topics, 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/04d401d191bd%240f445d00%242dcd1700%24%40rasia.ch
https://groups.google.com/d/msgid/lucee/04d401d191bd%240f445d00%242dcd1700%24%40rasia.ch?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.


Sid Wing
“We are dreamers, shapers, singers, and makers. We study the mysteries of
laser and circuit, crystal and scanner, holographic demons and invocations
of equations. These are the tools we employ, and we know many things.” -
Elric

Hi Sid,

Just tried this:

<cfadmin action=“updateDatasource” type=“web” password="********"

 classname="com.microsoft.sqlserver.jdbc.SQLServerDriver"

 dsn="jdbc:sqlserver://{host}:{port}"

 name="susi"

 newName="susi"

 host="localhost"

 database="GIAppl"

 port="1433"

 dbusername="youruser"

 dbpassword="********"

 storage="true"

And it perfectly works as expected…

Sincerely
Gert Franz

RASIA GmbH

Spittelgasse 7

5103 Moeriken-Wildegg

Switzerland

Email: mailto:Gert_Franz @Gert_Franz
Skype: gert.franz

Phone Switzerland: +41 76 5680 231Von: lucee@googlegroups.com [mailto:lucee@googlegroups.com] Im Auftrag von Sid Wing
Gesendet: Freitag, 8. April 2016 20:07
An: Lucee
Betreff: Re: [Lucee] Re: cfadmin create/update datasource

Gert - Thanks much, sir!

I’ll keep poking away at it

On Fri, Apr 8, 2016 at 1:00 PM, Gert Franz <@Gert_Franz> wrote:

Hmm…

That functionality is identical since Railo 3.3. It has to work. I’m on the road atm so i can’t check myself, but perhaps you could fiddle with the settings a bit.

If not, I’ll have a look asap…

Gert

Sent from somewhere on the road

Am 08.04.2016 um 19:43 schrieb Sid Wing <@Sid_Wing>:

Hi Gert!

I actually tried: storage=“true” (because that seemed logical) - but when it created the datasource - it did not have the storage flag…

We are running version - Lucee 4.5.2.018 final

On Fri, Apr 8, 2016 at 12:35 PM, Gert Franz <@Gert_Franz> wrote:

Sid,

Have a look in the source of the Lucee Administrator. There you’ll find the file services.datasource.create.cfm. There it has the following entry:

                    <cfadmin action="updateDatasource" type="#request.adminType#" password="#session["password"&request.adminType]#"

                                

                                classname="#driver.getClass()#"

                                dsn="#driver.getDSN()#"

                                                                    

                                name="#form.name# <http://form.name> "

                                newName="#form.newName#"

                                

                                host="#form.host#"

                                database="#form.database#"

                                port="#form.port#"

                                timezone="#form.timezone#"

                                dbusername="#form.username#"

                                dbpassword="#form.password#"

                                

                                connectionLimit="#form.connectionLimit#"

                                connectionTimeout="#form.connectionTimeout#"

                                metaCacheTimeout="#form.metaCacheTimeout#"

                                blob="#getForm('blob',false)#"

                                clob="#getForm('clob',false)#"

                                validate="#getForm('validate',false)#"

                                storage="#getForm('storage',false)#"

                                

                                allowed_select="#getForm('allowed_select',false)#"

                                allowed_insert="#getForm('allowed_insert',false)#"

                                allowed_update="#getForm('allowed_update',false)#"

                                allowed_delete="#getForm('allowed_delete',false)#"

                                allowed_alter="#getForm('allowed_alter',false)#"

                                allowed_drop="#getForm('allowed_drop',false)#"

                                allowed_revoke="#getForm('allowed_revoke',false)#"

                                allowed_create="#getForm('allowed_create',false)#"

                                allowed_grant="#getForm('allowed_grant',false)#"

                                verify="#verify#"

                                custom="#custom#"

                                dbdriver="#dbdriver#"

                                remoteClients="#request.getRemoteClients()#">

                                <cfset form.mark="update">

I presume the bold line above is what you are looking for…

Sincerely
Gert Franz

<image001.png>

RASIA GmbH

Spittelgasse 7

5103 Moeriken-Wildegg

Switzerland

Email: mailto:Gert_Franz @Gert_Franz
Skype: gert.franz

Phone Switzerland: +41 76 5680 231

Von: lucee@googlegroups.com [mailto:lucee@googlegroups.com] Im Auftrag von Sid Wing
Gesendet: Freitag, 8. April 2016 19:15
An: Lucee
Betreff: [Lucee] Re: cfadmin create/update datasource

Example - I create the datasource like this:

<cfadmin action=“updateDatasource”

                                                                                            type="server"

                                                                                            password="#LuceeADMPWD#"

                                                                                            dbdriver="#dbDriver#"

                                                                                            database="#regModel.theDB#"

                                                                                            classname="#theClassname#"

                                                                                            dsn="#connstring#"

                                                                                            host="#regModel.theHost#"

                                                                                            name="#theDSN#"

                                                                                            newname="#theDSN#"

                                                                                            port="#regModel.thePort#"

                                                                                            blob="true"

                                                                                            clob="true"

                                                                                            dbusername="#regModel.dsnU#"

                                                                                            dbpassword="#regModel.dsnP#">

I need a way to set the “storage:true” flag on this datasource so that it can be used for client variable storage

On Friday, April 8, 2016 at 11:30:02 AM UTC-5, Sid Wing wrote:

I can create/update a datasource dynamically using cfadmin - but the one thing I cannot figure out how to do (or find documentation on) - is how to set that datasource as “Allow to use this datasource as client/session storage.”

I can do it from the Lucee Admin - but I need a way to do it from inside my app when I am/need to create/update the datasource


Love Lucee? Become a supporter and be part of the Lucee project today! - http://lucee.org/supporters/become-a-supporter.html

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/29f488e2-f933-4be0-ad05-bd02c63fb682%40googlegroups.com https://groups.google.com/d/msgid/lucee/29f488e2-f933-4be0-ad05-bd02c63fb682%40googlegroups.com?utm_medium=email&utm_source=footer .
For more options, visit https://groups.google.com/d/optout.


Love Lucee? Become a supporter and be part of the Lucee project today! - http://lucee.org/supporters/become-a-supporter.html

You received this message because you are subscribed to a topic in the Google Groups “Lucee” group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lucee/1il7osoO58A/unsubscribe.
To unsubscribe from this group and all its topics, 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/04d401d191bd%240f445d00%242dcd1700%24%40rasia.ch https://groups.google.com/d/msgid/lucee/04d401d191bd%240f445d00%242dcd1700%24%40rasia.ch?utm_medium=email&utm_source=footer .
For more options, visit https://groups.google.com/d/optout.

Sid Wing
“We are dreamers, shapers, singers, and makers. We study the mysteries of laser and circuit, crystal and scanner, holographic demons and invocations of equations. These are the tools we employ, and we know many things.” - Elric

http://boincstats.com/signature/-1/user/489263/sig.png


Love Lucee? Become a supporter and be part of the Lucee project today! - http://lucee.org/supporters/become-a-supporter.html

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/CAJ-%2Bs7vMvUSTVUY54wAwL%2BzVwH4sVcuGPDvN4ybxn4g-etHtFA%40mail.gmail.com https://groups.google.com/d/msgid/lucee/CAJ-%2Bs7vMvUSTVUY54wAwL%2BzVwH4sVcuGPDvN4ybxn4g-etHtFA%40mail.gmail.com?utm_medium=email&utm_source=footer .
For more options, visit https://groups.google.com/d/optout.


Love Lucee? Become a supporter and be part of the Lucee project today! - http://lucee.org/supporters/become-a-supporter.html

You received this message because you are subscribed to a topic in the Google Groups “Lucee” group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lucee/1il7osoO58A/unsubscribe.
To unsubscribe from this group and all its topics, 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/2ABD2BCF-224D-4A03-B1D4-1F4C195A4CAB%40rasia.ch https://groups.google.com/d/msgid/lucee/2ABD2BCF-224D-4A03-B1D4-1F4C195A4CAB%40rasia.ch?utm_medium=email&utm_source=footer .
For more options, visit https://groups.google.com/d/optout.

Sid Wing
“We are dreamers, shapers, singers, and makers. We study the mysteries of laser and circuit, crystal and scanner, holographic demons and invocations of equations. These are the tools we employ, and we know many things.” - Elric

http://boincstats.com/signature/-1/user/489263/sig.png


Love Lucee? Become a supporter and be part of the Lucee project today! - http://lucee.org/supporters/become-a-supporter.html

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/CAJ-%2Bs7tQ4n_HzzfrNCMUZx0G36%3DmdVeedmYQ1hE7fDgPzLWzWQ%40mail.gmail.com https://groups.google.com/d/msgid/lucee/CAJ-%2Bs7tQ4n_HzzfrNCMUZx0G36%3DmdVeedmYQ1hE7fDgPzLWzWQ%40mail.gmail.com?utm_medium=email&utm_source=footer .
For more options, visit https://groups.google.com/d/optout.

From Documentation online https://docs.lucee.org/guides/Various/cfadmin.html

Maybe the storage is in the “custom” field…

<cfadmin
    action="updateDatasource"
    type="web|server"
    password="password"
    classname="#driver.getClass()#"
    dsn="#driver.getDSN()#"
    name="#form.name#"
    host="#form.host#"
    database="#form.database#"
    port="#form.port#"
    dbusername="#form.username#"
    dbpassword="#form.password#"
    connectionLimit="#form.connectionLimit#"
    connectionTimeout="#form.connectionTimeout#"
    blob="#getForm('blob',false)#"
    clob="#getForm('clob',false)#"
    allowed_select="#getForm('allowed_select',false)#"
    allowed_insert="#getForm('allowed_insert',false)#"
    allowed_update="#getForm('allowed_update',false)#"
    allowed_delete="#getForm('allowed_delete',false)#"
    allowed_alter="#getForm('allowed_alter',false)#"
    allowed_drop="#getForm('allowed_drop',false)#"
    allowed_revoke="#getForm('allowed_revoke',false)#"
    allowed_create="#getForm('allowed_create',false)#"
    allowed_grant="#getForm('allowed_grant',false)#"
    custom="#custom#"
    remoteClients="arrayOfClients">

BTW I will need these too since my app will run in fargate. When a new instance spins up during autoscaling, It will need to self configure.