-
1. Re: configure and use Jboss with MySQL Database instead of t
peterj Apr 10, 2006 12:34 PM (in response to hemophiliac)Will you be using the Java messaging service in your application? If not, you don't have to change any of the Hypersonic database configuration since it mostly relates to storing messages.
Very simply, to use a database in your application you have to:
1. Copy the connector jar file to the server/default/lib directory
2. Create a data source configuration file named XXX-ds.xml and place it into server/default/deploy (where XXX is any name you want). See docs/examples/jca for example configuration files.
3. Write Java code to access the database using the data source you configured. For this you can use JDBC, iBatis, Hibernate, the list is endless.
For good references on database access in JBoss, check out the books JBoss at Work: A Practical Guide by Marrs and Davis, or JBoss: A Developer's Notebook by Richards and Griffith. Both discuss accessing data in a database. However the JBoss at Work book uses the Hypersonic database (not sure about the Developer's Notebook - it's at home and I'm at work so I can't double-check it.)
For tutorials on configuring and using MySQL with JBoss, just google "jboss mysql tutorial" and you will get lots of hits that look promising.