borg48
asked on
JNI and JDBC Connections
I've been trying to figure out if a JDBC Connection can be passed via jni? My C program will call the JNI interface to connect and it will return JDBC Connection back to my C program. Can this be done?
Thanks
Thanks
Can't see why not, but have to ask why?
Why? Well, a similar thing is done in the JBoss app server for example. You specify parameters for your database connections in a JBoss config file and JBoss will then make a datasource available to clients via JNI.
This is a good thing because you can then change all your aspects of your database connections (connection pooling, timeouts,...) in a single file without having to make code changes.
This is a good thing because you can then change all your aspects of your database connections (connection pooling, timeouts,...) in a single file without having to make code changes.
ASKER
The reason is b/c I was thinking of playing with python and they dont have any free sql server drivers like free jtds. So if i can connect to it via jni it would be great.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.