Brian Fitzpatrick [
http://community.jboss.org/people/bfitzpat] replied to the discussion
"Driver Definition/JDBC driver"
To view the discussion, visit:
http://community.jboss.org/message/552406#552406
--------------------------------------------------------------
That's certainly part of the equation - making sure that the driver jar is available
on the Eclipse classpath.
But there's another step... Once you have your jar wrapped in a plug-in, you have to
tell the driver template where to find it. You can do that with a driver template
override...
For example, if I've exposed my derby.jar for a Derby database JDBC driver in plug-in
org.eclipse.datatools.derby.wrapper... I can override the jar list of that driver so that
it automatically picks it up.
<plugin>
<extension
point="org.eclipse.datatools.connectivity.driverExtension">
<driverTemplateOverride
jarList="[org.eclipse.datatools.derby.wrapper]/lib/derby.jar"
priority="1"
targetId="org.eclipse.datatools.connectivity.db.derby102.genericDriverTemplate">
</driverTemplateOverride>
</extension>
</plugin>
If you want it to automatically add the driver instance the first time the DriverManager
is fired up (i.e. whenever you fire up the Data Source Explorer it'll check to see if
the default driver instance has been created), you just add createDefault = true like
this:
<extension
point="org.eclipse.datatools.connectivity.driverExtension">
<driverTemplateOverride
createDefault="true"
jarList="[org.eclipse.datatools.derby.wrapper]/lib/derby.jar"
priority="1"
targetId="org.eclipse.datatools.connectivity.db.derby102.genericDriverTemplate">
</driverTemplateOverride>
</extension>
Hope that helps!
--Fitz
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/552406#552406]
Start a new discussion in JBoss Tools at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]