We have a usecase which inovolves some intesive DB processing that we’d like to implement a Java class. The Java class will be invoked from within a cfc template using createObject() and init() like so:
<cfset myJavaObj = createObject( "java", "some.package.MyJavaClass" ).init(); <cfset myVal = myJavaObj.someMethod()>;
I have a DataSource defined in my application.cfc. If needed, I can also define a DataSource in the Lucee Web Adminstrator.
How can I get a reference to this DataSource within my Java class? Ideally, I’d like back an object of type javax.sql.DataSource.
Appreciate any help that anyone can provide, Thanks!