Email:   
Home
In This Issue
EasyPrint
Click here for the RSS feed's XML code. This is not a browser URL.
Adventures with Roller Weblogger (continued)

In the dbscripts folder of the WEB-INF portion of the Web application, there are a number of scripts for creating the tables necessary for the Roller database. Using the MySQL Control Center, I created the database and ran the appropriate script to build the tables. This does not populate the tables, however, so I had the choice of simply leaving them empty or loading them with the demo data.

Since I wasn't sure how well the software would operate with empty tables, I located the script that built the HSQLDB tables at /roller-demo/blogdata/rollerdb.script, stripped out the statements that built the tables and ran the data insert portion of the script in the MySQL Control Center as well.

This, as it turns out, was the root cause of untold hours of gnashing of teeth, banging of head against wall, and generally flailing about in pointless territory, but let's try not to get too far ahead of the story just yet.

Once the database was created, I had to create the MySQL DataSource in the embedded WebSphere Test Environment (the app server). I followed basically the same steps that I outlined in an earlier article on that subject, see http://www.Webspherepower.com/issues/issue200403/00001236001.html, so I won't repeat that information here.

There is one minor correction to that article, though. Currently, I am using the 3.0.14 version of the MySQL JDBC driver, which doesn't seem to support and/or require the factory parameter specified in the list of six required additional parameters, so that item needs to be removed from the list of custom properties.

The last thing on the list of database-related items is to set up the DataSource alias in the Web project's deployment descriptor. Again, there is already an article that describes the steps involved in that process, see (JDBC DataSource in WebSphere article), but again, there is one minor correction to that piece.

It appears that you can use the exact same name for your DataSource alias as your JNDI (Java Naming and Directory Interface) name. In other words, for this particular application, the JNDI name is jdbc/rollerdb, so the DataSource alias can also be named jdbc/rollerdb. This means that all of the references to java:comp/env/jdbc/rollerdb embedded in the application code and properties files can be retained intact.

If you were unable to reuse the same name (which was my incorrect assumption earlier), you would have to go into the project and update all of the JNDI references to point to the chosen alias name. Using the JNDI name as the alias name eliminates the need for what would otherwise be an onerous task.

Roller Security
The Roller demo package is set up to use Tomcat's security provisions with user data found in the Roller database. Although the WebSphere Application Server provides the capabilities to create a Custom User Registry that can be configured to use the same user data, I had visions of deploying the software to containers that were already secured using an external LDAP (Lightweight Directory Access Protocol) directory.




[ Prev | Next ]

ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
-- Advertisement --

Sun Virtualization offerings for IBM WebSphere infrastructures
Increase the value of your enterprise IT environment through server consolidation

  • Reduced costs lead to improved TCO
  • Optimized application performance
  • Added flexibility
  • Enhanced service levels


Watch the webcast to learn more
-- Advertisement --

Influencer. Recommender. Decision Maker.
They all read WebSpherePower Magazine. They all rely on WebSpherePower Magazine.

If you want to reach the inner-circle of IBM IT professionals, you won't find a better resource than WebSpherePower Magazine.

Click for our Media Kit

Copyright © 2008, ZATZ Publishing. All rights reserved worldwide.