May 16, 2008

Pages


Search Site


Topics


Useful Links

Blogs I Read


Archives

Entries for month: July 2007

Using The CF Connection Pool In Java App

July 16 2007 by Andrew Powell
I was integrating a Java app into a CF app and ran into a little problem. I needed to pass the Java app's constructor a database connection object. I wanted to use the CF connection pool instead of creating a new connection to use just for the Java app. There was just one catch: I didn't have the password for the datasource, and had no hope of getting it. So goes the life of a consultant. I had to look for another route to get the database connection without the password. It was time to get into a little ColdFusion ingenutiy. If ColdFusion is Java and is using JDBC connections, then there should be a way to access the connection via ColdFusion's java interfaces. There is. I found it by looking through the stack traces and a bit of trial and error. Anyways, here's what I came up with: <cfscript>
var myConnection = createObject('java','coldfusion.server.ServiceFactory');
myConnection.getDataSourceService().getDatasource('myDSNName').getConnection();
var javaObj = createObject('java','path.to.object').init(myConnection)/>
javaObj.myMethod();
</cfscript>

Posted in ColdFusion | General | Adobe | 0 comments

ColdFusion Powered Weight Watchers Points Calculator For Your Phone

July 08 2007 by Andrew Powell
My wife has started on Weight Watchers (again). I decided to be a nice geek husband and create her a little tool she can use when at the grocer to calculate point values of food. It's a nifty little WAP application that is powered by our favourite server (ColdFusion). Being the geek I am, there is also a webservice available if you want to incorporate the functionality into your application. WAP URL: http://www.infoaccelerator.net/wwCalc/ WSDL: http://www.infoaccelerator.net/net/infoaccelerator/pointCalc/PointCalculator.cfc?wsdl

Posted in ColdFusion | General | WAP | 1 comments

CFUnited 2007 Slides

July 03 2007 by Andrew Powell
I thought I had included my slides in the previous CFUnited post, but I guess I didn't. What can I say? It was a long week. I have my own thoughts on CFUnited and how it went this year, but will save those for later until I've had time to fully process them and can articulate them in a plain and clear manner.

Posted in ColdFusion | General | Conferences | Spry | Adobe | JSON | XML | Speaking | AJAX | 0 comments