Using a IS DBAlias in a java service

I am using webMethods 4.6
I have created a DB alias in IS admin console.
And I have a main service that calls a java service. The code to connect to the database is there in the java service. I am passing the DB alias as a string from the main service to the java service.
Can anyone tell me how to use this DBalias in the java service.
Thanks for help in advance.

I assume you mean Integration Server 4.6. “webMethods” is the company that makes several products, one of which is Integration Server.

DB aliases are not intended to be used within Java services. They are for use by the webMethods-supplied DB (WmDB) services.

What are you trying to accomplish? Maybe someone can suggest an approach. If the solution simply needs to read or write DB data, then Java services are most likely not needed.

Thanks Rob for replying.
I am using Integration Server(IS) 4.6.1 version
Let me explain you the problem in detail.
I have a java service that uses a JDBC thin driver to make a call to an Oracle DB stored procedure. The stored procedure takes as an input a variable array so the java service declares the variable of the type oracle.sql.ArrayDescriptor & oracle.sql.ARRAY. The above task cannot be accomplished thr’ the flow service so a java service was written for the same.
Presently I am hardcoding the DB connection details in the java service which is obviously a wrong coding practice. For our rest of the interfaces we are using DBaliases(created through IS admin console) to make DB connections and they are very easy to maintain.
So was thinking of such a solution for the same. I saw in the earlier posts that through Connection manager class we can use the DBaliases to make connection to DB. But since we are using webMethods 4.6 which supports jdk1.3 so feels that Connection manager class is not available.

I tried using the connection object of the pub.db.connect in my java service but it did not worked.

Thanks in advance.

Can anyone help Pls. I am still looking for an appropriate solution to avoid the hard coding of connection parameters in the java service

The JDBC adapter connections are not intended for being used within Java services. The “appropriate” solution is to use the JDBC adapter and associated adapter services that you create according the JDBC Adapter documentation.

Rob, I think “dsaini” is talking about WmDB instead of JDBC Adapter.

Deepali, why don’t you just call WmDB/wm.server.db:dataSourceGet and use the information from there? Of course, the connection won’t be managed by IS, but it does make maintenance of the DB connection settings a bit easier.

As a work-around you could store the DB connection information in a properties file and pass that into your flow service. It’s not the solution you’re looking for, but it’s better than hard-coding the connection info.