Chapter 4. Connecting to a Real Database
Note
In this chapter:
Modern enterprise applications revolve around relational databases, and our application is no exception. However, up to this point we have barely paid any attention to configuring the all-important database tier. We’ve been using the embedded Hypersonic database and delegating all the schema management to JBoss. This has allowed us to focus on making our application work first, without needing to bother with the added complexity of a database.
Developing an application with this approach makes a lot of sense, but now that our application is up and running, it’s time to turn our attention toward the database, and have our application access a more robust, production-friendly database. We’ll use MySQL for the application.
Setting Up MySQL
MySQL is a free download that is available from http://dev.mysql.com for every major computing platform. You’ll want to download and install the most current MySQL distribution available for your platform. We’ll be working from the MySQL Standard 4.1.8 GA version.
We’ll assume you can follow the instructions for installing MySQL on your platform. Once you have MySQL running, you’ll need to create a database to be used by JBoss. You’ll also need to create a database user that has access to the JBoss database for JBoss to use.
How do I do that? ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access