Search WebSpherePower's 6,962 WebSphere, Java, and Eclipse article archive 
Home
EasyPrint
News details Click here for the RSS feed's XML code. This is not a browser URL.
Articles-only Click here for the RSS feed's XML code. This is not a browser URL.
Twitter Feed Click here for the Twitter feed.
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.

Product availability and resources
To read Easily connecting to MySQL databases from WebSphere Studio, visit http://www.webspherepower.com/issues/issue200310/00001111001.html.
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.


« Previous  ·  1  ·  2  ·  3
Other articles you might like
Home > Database Integration (3 articles)
   Locate your JDBC DataSource in WebSphere Application Server using JNDI
   Easily connecting to MySQL databases from WebSphere Studio
Get Weekly Email Updates
Subscribe to our regular weekly email newsletter. It's packed with tips, reviews, deep analysis, and the latest news.
 
Recent WebSpherePower Articles
A perfect 10: celebrating 10 years online
You can help bring security and safety back to White House email
Introducing the WebSpherePower RSS feeds
From New Jersey to Palm Bay, Florida
A WebSphere pot o' gold
How Elvis entered the building and CES went out the window
WebSphere Application Server 6: what's it all mean?
WebSpherePower News
Excitement brewing for JavaOne 2010, with or without Google
Large companies ignore data centre advice
Onapsis to Release ERP Vulnerability Testing Suite
Botnet Takedown May Yield Valuable Data
VMware app dev platform gazes beyond SpringSource Java
IBM Claims World's Fastest Chip
'Free Java': InfoWorld's guide to the protest goodies
>> Read all the news
More from the ZATZ journals
Computing Unplugged: Smartphone smarts for a mobile world
David Gewirtz Online: CNN commentary and analysis
DominoPower: It's time for Lotus to double-down on Linux and open source
OutlookPower: The strange case of Outlook losing notes and requiring passwords
-- 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.

ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 2010, ZATZ Publishing. All rights reserved worldwide.
Editor's Login