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
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

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




7.2.3. Testing the MySQL DataSource

We’ll use the CMP roster application to test the new database connection. In order to use MySql in our application, we'll need to set the datasource name a nd type-mapping in the jbosscmp-jdbc.xml file in the dd/team directory of the CMP roster application. Edit the file and add the following datasource and datasource-mapping elements to the defaults element.

After restarting JBoss, you should be able to deploy the application and see the tables being created. . The tables should be visible from the MySQL client.
mysql> show tables; 
| Tables_in_jboss                   |
| LeagueBean                        |
| PlayerBean                        |
| PlayerBean_teams_TeamBean_players |
| TeamBean                          |
4 rows in set (0.00 sec)
You can see the JMS persistence tables in there too since we’re using MySQL as the default datasource.

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