Search WebSpherePower's 6,564 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
Cybercrime's bulletproof hosting exposed
O'Reilly Velocity Conference Opens Registration and Reveals Program
SAN SnapShot Backup for VMWare
What users want from Oracle's Java Community Process
Hackers offered $100,000 for browser and phone exploits
New Eclipse CDO Data Store for Open Source Community and Java Developers
An innovative way to enable SSL for WebSphere Message Broker on z/OS
>> Read all the news
More from the ZATZ journals
Computing Unplugged: The iPad defenders have spoken
David Gewirtz Online: CNN commentary and analysis
DominoPower: Application development, William Shatner, and the origin of the universe
OutlookPower: More about disappearing text
-- Advertisement --

EASY DEDICATED AND VIRTUAL DEDICATED SERVERS FOR AS LOW AS $67.99 PER MONTH
Customize and configure your own dedicated server. Simply choose one of our popular plans or select your own Linux or Windows server and plan options.

NO LONG WAITS. Server provisioned within hours.

Tap here now and be up and running with your own server tonight.

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