• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Factory, Datasource, ServerName

Explorer ,
Nov 15, 2006 Nov 15, 2006

Copy link to clipboard

Copied

I am using

<CFOBJECT ACTION="CREATE" TYPE="JAVA" CLASS="coldfusion.server.ServiceFactory" NAME="factory">
<!--- Get datasource service --->
<CFSET dsService=factory.getDataSourceService()>
<!--- Get datasources --->
<CFSET dsFull=dsService.getDatasources()>
<!--- Extract names into an array
<CFSET dsNames=StructKeyArray(dsFull)>

Many thanks

<cfset dsNames = dsService.getNames()>
TOPICS
Advanced techniques

Views

224

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Nov 15, 2006 Nov 15, 2006

Copy link to clipboard

Copied

LATEST
There may be a better way, but you could start by dumping the full datasource info

<cfdump var="#dsFull#">

There is a structure for each datasource. Most seem to contain a key named urlmap.host. That might be what you're looking for.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation