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

Summary: Support for alternate/multiple driver class in Datasource
Product: serverplugins Reporter: Petr Hejl <phejl>
Component: InfrastructureAssignee: Petr Hejl <phejl>
Status: NEW ---    
Severity: normal    
Priority: P2    
Version: 6.x   
Hardware: PC   
OS: Linux   
Issue Type: ENHANCEMENT Exception Reporter:

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[] {};
}