I want to create a connection to a database from a Java service rather than an adapter service and i am doing this for my practice purpose (creating a “how to connect to databse using Java service” document). Any pointers or references to a java code is appreciated.
I am connecting to MSSQL server 2005 from IS 7.1.2. The inputs that i will be providing are database URL, Driver class and username/password.
Note:
This is not regarding using an existing connection, it has to create a new connection in the code.
I would strongly encourage not doing this and instead use the facilities provided by the JDBC adapter. If you must access a DB while running a Java service, use the IS Java API to invoke a proper JDBC service.