Community
Participate
Working Groups
Build Identifier: M20100909-0800 All of the enablement implementations of IConnectionFactory.createConnection(IConnectionProfile profile, String uid, String pwd) disregard the uid and pwd parameters and invoke the createConnection(IConnectionProfile profile) method. If your connection profile has no credentials, then these parameters are required for a connection. If your profile does have them, then presumably the point of this method is to override them, and that does not happen. Take a look at the Oracle implementation as an example: http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.datatools.enablement/plugins/org.eclipse.datatools.enablement.oracle/src/org/eclipse/datatools/enablement/internal/oracle/JDBCOracleConnectionFactory.java?view=markup&root=Datatools_Project Reproducible: Always Steps to Reproduce: 1. Define a connection profile with any of the enablement profiles. 2. Edit the profile to remove the username and password. 3. Get a connection from the profile using the IConnectionFactory.createConnection(IConnectionProfile profile, String uid, String pwd) call.
Created attachment 181746 [details] How to reproduce The easiest way I could think to give you a reproducible case is to use one of the plug-in wizards and hack the action. Do the following and you should be able to see how the Oracle impl just drops the username and password. Import the attached project to your eclipse env with the DTP + DTP Enablement SDKs installed. Change the values in the ctor for SampleAction. Run the plugin in debug and run the SampleAction in the new Sample Menu that's added to the Main menu bar. If you then change the username and password in the createDriverProps() call, you'll see it work.
This is more than just a tweak, but we should be able to still keep API backward compatibility when the fix goes in. The change affects everything down to the JDBCConnection/JDBCConnectionFactory level, so it will require changes to each of the enablement projects to correctly support the uid/pwd signature. I'm honestly not sure why this has never been seen until now - I'm guessing that the Teiid guys are just stressing the APIs in a different direction than we've seen in the past.
Created attachment 181747 [details] Patch for Connectivity & Oracle This patch solves the problem for Oracle in my local tests, but will need to be tested further.