This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 184535 - Support for alternate/multiple driver class in Datasource
Summary: Support for alternate/multiple driver class in Datasource
Status: NEW
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Infrastructure (show other bugs)
Version: 6.x
Hardware: PC Linux
: P2 normal (vote)
Assignee: Petr Hejl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-04-20 12:21 UTC by Petr Hejl
Modified: 2010-04-20 12:21 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Hejl 2010-04-20 12:21:55 UTC
The Datasource API has just getDriver() method returning the driver configured in datasource. Trouble with this is that certain servers (Weblogic) do not really have real driver configured. What they use is kind of Datasource - class that does not directly implement java.sql.Driver.

In the IDE you can't use such "driver" to browse database.

One of possible solutions would be to add a method to Datasource such as getIDEDriver() or getAlternateDrivers(). These drivers could be used to access DB from the IDE.

Example for certain DS in WL this could be:

public String getDriver() {
   return driver;
}

public String[] getAlternateDrivers() {
   if ("oracle.jdbc.xa.client.OracleXADataSource".equals(getDriver())) {
       return new String[] {"oracle.jdbc.OracleDriver"};
   }
   return new String[] {};
}