Multiple applications on the same SQL Database


Imagine the following environment:

  1. First server with an SQL Database
  2. Second server with a Lucee web application
  3. Third server with a Adobe Coldfusion web application

Can I create a datasource on Lucee (server 2) and a datasource on Adobe Coldfusion (server 3) pointing both on the same SQL Database on server 1?

Instinctively, of course I say yes, but I would like your opinion. Can there be problems?

Thank you

Basically, as long as the application uses cftransaction as opposed to cflock when needed for db related stuff, there shouldn’t be a problem

1 Like

Oh, I hadn’t thought of the cflock.

Great, thank you!

To be clear, he said “as opposed to cflock” meaning CFLock would not be an acceptable means of synchronizing transactions. But forget about that for now. The general answer to your question is, “yes, of course it will work”. DB servers designed to have hundreds of client connections to them! It really doesn’t matter whether you have a dozen adobe servers, a dozen Lucee servers, or half and half. Every CF server already has more than one pooled connection in the first place. It’s also worth noting, there’s no synchronization “problem” you could have from two CF servers connecting to the same DB server that you wouldn’t already inherently have with just two pages (threads) using the DB at the same time over two separate JDBC connections.

1 Like

Thank you for your feedback guys!