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

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