|
For all of the examples in this chapter, you communicate with a MySQL database that has a number of tables. To access the database, you use a Java Naming and Directory Interface (JNDI) entry defined as:
<database> <jndi-name>jdbc/mysql</jndi-name> <driver type="org.gjt.mm.mysql.Driver"> <url>jdbc:mysql://localhost:3306/test</url> <user></user> <password></password> </driver> <max-connections>20</max-connections> <max-idle-time>30s</max-idle-time> <xa>true</xa> </database>
We used the <xa> element to indicate the driver supports the concept of transactions, which are part of our examples.
|