[jboss-user] [Datasource Configuration] - driver-class makes no difference

jepper do-not-reply at jboss.com
Thu Dec 15 08:43:01 EST 2011


jepper [http://community.jboss.org/people/jepper] created the discussion

"driver-class makes no difference"

To view the discussion, visit: http://community.jboss.org/message/641770#641770

--------------------------------------------------------------
Hi 

I want to set up p6spy, but jboss is not using the pass thru driver it appears.

My question is:      Is <driver-class> effectively ignored but it's presence required?

Setup:

jboss 6.1.0 final
mysql 5.5
Both running on the same windows XP machine.

CLASSPATH: D:\opt\jboss\jboss-6.1.0.Final\server\all\conf;D:\opt\jboss\jboss-6.1.0.Final\bin\run.jar
D:\opt\jboss\jboss-6.1.0.Final\server\all\conf\spy.properties
D:\opt\jboss\jboss-6.1.0.Final\server\all\lib\p6spy.jar
D:\opt\jboss\jboss-6.1.0.Final\server\all\deploy\mysql-ds.xml

It seems I can enter any random string in the <driver-class> tag. It makes no difference. I start jboss with a database with no tables. New jboss tables are created as expected, despite driver-class not being meaningful. If I delete the tag however, jboss complains and cannot speak to the database.

mysql-ds.xml
<datasources>
  <local-tx-datasource>
    <jndi-name>DefaultDS</jndi-name>
    <connection-url>jdbc:mysql://localhost:3306/jbossdb</connection-url>
    <driver-class>randomblah</driver-class>
    <user-name>myuser</user-name>
    <password>#</password>
    <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name> 
    <valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionChecker</valid-connection-checker-class-name> 
    <metadata>
       <type-mapping>mySQL</type-mapping>
    </metadata>
  </local-tx-datasource>
</datasources>

mysql> show tables;
+-------------------+
| Tables_in_jbossdb |
+-------------------+
| hilosequences     |
| timers            |
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/641770#641770]

Start a new discussion in Datasource Configuration at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2077]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20111215/a67a742e/attachment.html 


More information about the jboss-user mailing list