I'm using the following java code (in ColdFusion) to get a database connection:
//Creating an object of servicefactory class
local.theServiceFactory = createObject('java','coldfusion.server.ServiceFactory');
//Creating the connection object simply by passing the DSN name
local.connect = theServiceFactory.getDataSourceService().getDataSource('dsnnane').getConnection();
Works great. The only problem is I'm told I can't use ServiceFactory
because of security reasons. Is there another way to get the connection object?