Setting JNDI datasources in lucee ( programmatically )

Here is the ACF code that I am trying to convert to lucee. Does anyone know
how this could be accomplished? Thanks in advance !!!

dsService = createObject('java','coldfusion.server.ServiceFactory').getDataSourceService(); datasourceFactory = createObject("java", "coldfusion.sql.DataSourceFactory").getInstance(); extraParams = { maxBufferSize="", spyLogFile="", logintimeout=0, _logintimeout=0, args="", sendStringParametersAsUnicode=true, port='', JNDINAME=jndiName, supportLinks=true, pageTimeout="", host="", database="", isj2ee=true, informixServer="", port="", defaultusername="", maxPooledStatements=1000, TimeStampAsString="no", datasource="", defaultpassword="", SID="", systemDatabaseFile="", isnewdb="", UseTrustedConnection="false", databaseFile="", CONNECTIONPROPS=structNew(), selectMethod="direct" }; dsnMap = { name=dsnName, password='', isj2ee=true, driver='jndi', url=jndiName, class="", type="jndi", urlmap=extraParams, timeout=javacast("float",1200), interval=javacast("float",420), type="J2EE", disable=false, disable_blob=true, disable_clob=true, pooling=false, create=true, alter=false, select=true, update=true, insert=true, delete=true, blob_buffer=524288000, buffer=524288000, storedproc=true }; datasourceFactory.setDataSource(dsnName,createObject("java", "coldfusion.sql.DataSourceDef").init(dsnMap));

Yes, but the datasources are supposed to be set after the application has
started based on the subdomain the user is in.On Friday, June 17, 2016 at 9:02:25 AM UTC-4, Jesse Shaffer wrote:

I don’t believe Lucee supports JNDI data sources at this time. Are you
deploying your app as a WAR?

I don’t believe Lucee supports JNDI data sources at this time. Are you deploying your app as a WAR?

You might look into adding logic into your application.cfc that includes
the right environment cfm for the current subdomain. In that cfm, you can
set application-specific data sources to be loaded for that domain.

Of course, if you really want to stick with JNDI, and are handy with Java,
you could write a wrapper JDBC driver that just proxies to a configured
JNDI data source, then add your datasources as custom connections to the
Lucee web admin for that site.On Jun 17, 2016 2:28 PM, “Jesse Shaffer” <@Jesse_Shaffer> wrote:

You might look into adding logic into your application.cfc that includes
the right environment cfm for the current subdomain. In that cfm, you can
set application-specific data sources to be loaded for that domain.