Connecting to UCCX Datasource from custom Java class

Version 1
    This document was generated from CDN thread

    Created by: Josh Whaley on 18-09-2012 04:12:47 PM
    I have a java class that saves some information to a database after it's run. I can connect to the database using the java.sql.DriverManager.getConnection() method. But I can't seem to use a datasource created in UCCX administration. Is there a way to do this?
     
    I am able to do this in UCCE, but when I attempt to retrieve the context using initialContext.lookup("java:comp/env") I get a namingexception.
     
    Can anyone point me in the right direction?

    Subject: RE: Connecting to UCCX Datasource from custom Java class
    Replied by: Steven Pawlak on 15-02-2013 10:27:10 AM
    The DB sources in UCCX Administration are not going to be exposed to users or documented. 
     
    I would suggest that you look at decompiling one of the DB steps or view source on the DB connection page to see what code they are calling. Personally I would just use a parameter in the script to pass the string or go to Premium and use the steps.