Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

7.2.2. Installing the JDBC Driver and Deploying the DataSource

To make the JDBC driver classes available to JBoss, copy the file mysql-connector-java-3.0.15-ga-bin.jar from the Connector/J distribution to the lib directory in the default server configuration (assuming that is the configuration you’re running, of course). Then create a file in the deploy directory called mysql-ds.xml with the following datasource configuration. The database user name and password corresponds the MySql user we created in the previous section.
<datasources> 
    <local-tx-datasource> 
        <jndi-name>MySqlDS</jndi-name> 
        <connection-url>jdbc:mysql://localhost:3306/jboss</connection-url> 
        <driver-class>com.mysql.jdbc.Driver</driver-class> 
        <user-name>jboss</user-name> 
        <password>password</password> 
    </local-tx-datasource> 
</datasources>
Because we have added a new JAR file to the lib directory, you will need to make sure that the server is able to find the MySQL driver classes.

 
 
  Published under the terms of the Open Publication License Design by Interspire