|
|
|
|
|
|
|
|
|
|
|
|
|
|
Creating a MySQL data source using WebSphere Application Server (continued)
FIGURE I
 
Here's your new data source. Roll over picture for a larger image.
Add MySQL-specific custom properties to your data source entry Click on the name of your new MySQL JDBC data source entry to return to the JDBC data source configuration screen. Scroll to the bottom of the screen as shown in Figure J and click on the Custom Properties link in the Additional Properties section.
FIGURE J
 
Get ready to configure some custom properties. Roll over picture for a larger image.
This should take you to the empty Custom Properties list, shown in Figure K, where you can begin entering the six custom properties necessary to complete your MySQL Data Source entry.
FIGURE K
 
Now you can configure some hidden, but very important options. Roll over picture for a larger image.
The six custom properties, which are another difficult to locate tidbit of critical information, and their respective values are:
| Name |
Type |
Value |
| databaseName |
java.lang.String |
<database-name>?autoReconnect=true |
| factory |
java.lang.String |
com.mysql.jdbc.jdbc2.optional.MysqlDataSourceFactory |
| password |
java.lang.String |
<password> |
| port |
java.lang.String |
3306 (or your MySQL port, if you have changed it) |
| serverName |
java.lang.String |
<server=name> |
| user |
java.lang.String |
<user-name> |
Custom properties are entered one property at a time using the Custom Property Configuration screen. To enter your first property, click on the New button above the empty property list, which should take you to the Custom Property Configuration screen illustrated in Figure L.
FIGURE L
 
Enter the property name, Java type, and property value, then click OK Roll over picture for a larger image.
Enter the property name, Java type, and property value, then click OK. Repeat this process for all six of the properties listed above.
When you have completed entering all of the custom properties, the last step is to save all of the changes that you have made to the master configuration. After successfully entering the data for the last custom property, you should still be on the list of custom properties for your new data source, as shown in Figure M.
FIGURE M
 
Here you can see all your custom properties Roll over picture for a larger image.
At the top of the screen, you should still see the message about saving your changes to Master Configuration. Clicking on the word Save in that message will take you to the Save to the Master Configuration screen shown in Figure N.
FIGURE N
 
Don't forget to save your configuration. Roll over picture for a larger image.
Click on the Save button to save your newly completed MySQL JDBC data source configuration and you are ready to start using your new data source.
Wrap-up By following these three simple steps, you can create your first MySQL JDBC data source. If you need additional MySQL data sources in the same server instance, creating the rest is even easier. Step one, creating the MySQL JDBC Provider only has to be done once per server; additional data sources can be added using the same provider by just completing steps two and three. Just make sure that your .jar file for the MySQL JDBC driver is accessible to the server and your new data source should be ready to go.
Jeff Chilton is a Contributing Editor for DominoPower and WebSpherePower magazines, and in his spare time serves as Vice President of Fulfillment for Echo Technology Group, Inc., an IT consulting firm that specializes in enterprise-focused best practices. Visit http://www.teametg.com for more information or email him at jchilton@teametg.com.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- Advertisement --
How To Save Jobs
This book is about how to create and save jobs. Believe it or not, there's not a single book out there that specifically focuses on job creation and preservation -- until now.
This book, by ZATZ editor-in-chief David Gewirtz, is about helping your business work better. It's about helping you change the things you need to change so your company can perform more effectively.
Plus, through a grant from ZATZ, it's a free download.
Read it and reap. |
|
|
|
|
|
|
|
|
|
|
|