Use Railo's built in cfadmin tag to manipulate datasources

{ Posted By : Eric Cobb on March 27, 2009 }
3108 Views
Related Categories: Railo

This is so cool! I had no idea that Railo had a tag for interacting with the Railo Administrator. I guess this is Railo's version of the CF Admin API?

There's a mention of it here and here, but very little information is offered on it. I only found out about it when Michael gave an example of using it to work with datasources on the Railo Talk list this morning. (I can't seem to find the thread in the Railo Google Group, or I would post it. )

Here's the example code Michael posted:

<cfadmin
action="verifyDatasource"
type="web"
password="pwd"
dbusername="dbun"
dbpassword="dbpw"
name="myDatasource">


<cfadmin
action="removeDatasource"
type="web"
password="pwd"
name="myDatasource">


<cfadmin
action="getDatasources"
type="web"
password="pwd"
returnVariable="datasources">


<cfadmin
action="getDatasource"
type="web"
password="pwd"
name="myDatasource"
returnVariable="ds">


<cfadmin
action="updateDatasource"
type="web"
password="pwd"
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#">

That's about all I know of Railo's tag right now. If anyone has any other links to documentation or more examples I would love to see them!

Related Blog Entries

Comments
Gert Franz's Gravatar We will post some documentation asap, starting next week...

Gert Franz
Railo
# Posted By Gert Franz | 3/27/09 10:06 AM
Eric Cobb's Gravatar Awesome, Gert! That's good to hear.
# Posted By Eric Cobb | 3/27/09 10:31 AM