i was looking into the previous post regarding how to send a wmDb connection Alias into a Java service to connect to Database
I believe you are using WmDB package for connecting to a DB using “dbAlias” configuration in the ISAdminConsole/WmDB.
So here is the code snippet of the JavaService that you are looking for.
Pass the “dbAlias” as a input to the javaservice from a flowservice.This dbAlias acts as a dbConnection.
IDataCursor inputCursor = pipeline.getCursor();
dbAlias = (String) inputCursor.getValue();
ConnectionManager connMgr = ConnectionManager.getInstance();
//replaceInsert(inputCursor,“Message 1:”, “ConnectionManager object obtained.” + connMgr);
Connection conn = connMgr.getNamedConnection(dbAlias);
I am having the same scenario but i am connecting to DB2 is there any connectionManager class that is there to connect to DB2 using WMDB alias Name.
Tnanks in advance