Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7189107
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T19:13:51+00:00 2026-05-28T19:13:51+00:00

How do you configure ColdFusion 9’s ORM to use multiple DSNs if possible? Is

  • 0

How do you configure ColdFusion 9’s ORM to use multiple DSNs if possible?

Is is possible to setup the datasource in the context of a session scope instead of the application scope?

Or how, in CF9, do you configure Hibernate to use multiple DSNs?


Looks like I should be more specific…
I’m looking for a solution that allows for specifying a DSN based on the session.

Here’s the scenario. We have a single custom built application that uses multiple DSNs which are determined from the sub-domain. So someone accessing from http://abc.domain.com would use the abc DSN where as someone visiting the xyz.domain.com would use the xyz DSN. The name of the DSN is determined when the session is created and it is stored as a session variable.

I’d like to do something like this:

//Artists.cfc

component persistent="true" datasource="#session.dsn#"
{ 
property name="artistid" generator="increment"; 
property firstname; 
property lastname; 
property address; 
property city; 
property state; 
}

// Application.cfc

component output="false" { 
THIS.name = "MultipleDsnORMTest"; 
THIS.applicationTimeout = createTimeSpan(0, 0, 0, 0); 
THIS.clientManagement = false; 
THIS.datasource = ""; // Leaving black ==> "No data source specified."
                      // Setting to cfbookclub ==> "ORM is not 
                      //   configured for the current application."
                      // Setting to cfartgallery works but doesn't 
                      //   demonstrate use multiple DSNs
THIS.loginStorage = "cookie"; 
THIS.sessionManagement = true; 
THIS.sessionTimeout = createTimeSpan(0, 0, 0, 0); 

THIS.ormenabled = true; 
THIS.ormsettings = {}; 
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T19:13:52+00:00Added an answer on May 28, 2026 at 7:13 pm

    Although it is possible to configure ColdFusion 9 to use multiple data sources with ORM in the application scope, it is not possible to configure ColdFusion 9’s ORM to work with multiple DSNs within the session scope.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I configure an application, or even an entire machine, to use either
How do I configure ActiveRecord to use partial_updates in a Padrino application? Customer <
Is it possible to configure xampp to serve up a file outside of the
How do you configure tomcat to bind to a single ip address (localhost) instead
Is it possible to configure nHibernate to connect to Paradox database ( *.db files)?
Is it possible to 'configure fb:comments social plugin' to show only comments not allowing
Is it possible to configure vim to follow symlinks via gf ? For example,
Is it possible to configure an Entity Framework model so that, when creating a
How do I configure jetty to use use log4j? I'm already using log4j in
I'm trying to configure Capistrano so that it works for our server setup. We

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.