Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [dtp-dev] How to get the jarList for a connection profile?


You have to get the Driver Definition from the Profile, then get the jar list from there...

Do something like this...

        private DriverInstance getDriverDefinition(IConnectionProfile profile) throws Exception {
                DriverDefinition mDriver = null;
                        String driverID = profile
                                        .getBaseProperties()
                                        .getProperty(
                                                        ConnectionProfileConstants.PROP_DRIVER_DEFINITION_ID);
                        if (driverID == null) {
                                throw new Exception(ConnectivityPlugin.getDefault().getResourceString("DriverConnectionBase.error.driverDefinitionNotSpecified")); //$NON-NLS-1$
                        }

                        mDriver = DriverManager.getInstance().getDriverInstanceByID(
                                        driverID);
                        if (mDriver == null) {
                                throw new Exception(ConnectivityPlugin.getDefault().getResourceString("DriverConnectionBase.error.driverDefinitionNotFound")); //$NON-NLS-1$
                        }
                return mDriver;
        }

        private String getJarList( IConnectionProfile profile ) {
                return getDriverDefinition(profile).getJarList();
        }

Brian Fitzpatrick
Senior Software Engineer/DTP Committer
Sybase, Inc.



Lawrence E Dunnell <ledunnel@xxxxxxxxxx>
Sent by: dtp-dev-bounces@xxxxxxxxxxx

09/20/2007 03:05 PM

Please respond to
DTP development mailing list <dtp-dev@xxxxxxxxxxx>

To
dtp-dev@xxxxxxxxxxx
cc
Subject
[dtp-dev] How to get the jarList for a connection profile?






If I have an instance of IConnectionProfile, how can I get the jarList that was configured by the user?


Larry Dunnell
DB2 Tooling, RAD Data Tools and Eclipse Data Tools Project (DTP)
IBM DB2 Information Management Software
_______________________________________________
dtp-dev mailing list
dtp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dtp-dev


Back to the top