Search WebSpherePower's 6,567 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.
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.


« Previous  ·  1  ·  2  ·  3  ·  4  ·  5  ·  Next »
Other articles you might like
Home > Projects > Roller Weblogger (3 articles)
   Even more adventures with Roller Weblogger
   Further Adventures with Roller Weblogger
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
Submit your Abstracts Today for 2010 Exceptional Web Experience
Building Web Reputation Systems
Accusations Fly in Viacom, YouTube Copyright Fight
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
>> 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 --

Coming soon, new book: 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.

-- 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

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