on 12-19-2006 9:28 AM
i am using Connector framework api to connect to portal database.
in <b>visual administrator -> JDBC connector</b>. I click on <b>runtime</b> tab
Under <b>Resources</b> i find <b>Data Sources</b> and <b>Drivers</b>.
Under Data sources I see SAPSR3DB. In Main tab on right hand pane I find many other aliases called SAP/BC_UME and SAP/BC_WDDR etc. Which one do I use in creating a connection.
IConnectorGatewayService cgService = (IConnectorGatewayService) PortalRuntime.getRuntimeResources().getService("com.sap.portal.ivs.connectorservice.connector");
ConnectionProperties cp = new ConnectionProperties(request.getLocale(),request.getUser());
IConnection connection = cgService.getConnection("SAPSR3DB",cp);
No system found for alias SAPSR3DB.
Hi,
If you want to use the PortalService IConnectorGatewayService you will have to create a JDBC System in the System Landscape of the Portal and create a System Alias with usermapping.
You can then create a c connection to this JDBC System with the IConnectorGatewayServcie using the specified System alias.
But if you want to directly connect to the System Database you can also use OpenSQL in your Portalapplication and lookup the Connection using JNDI:
InitialContext ctx= new InitialContext();
ds= (DataSource) ctx.lookup("jdbc/SAPSR3DB");
java.sql.Connection conn= ds.getConnection();
// ...
// user your connection here and close all jdbc objects finally!
Best regards,
Stefan Brauneis
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
24 | |
11 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.