Wednesday, April 30, 2003

Studying WebSphere 5

WebShpere Architecture overview:

Base configuration means seperately administered.

A node is a group of managed WebSphere servers that share configuration.

Configuration repository is in XML.

PMI stands for Performance Monitoring Interface.

In the base configuration the adminconsole runs on the one app server.

In the network deployment configuration, the adminconsole in run on the Deployment Manager.

Each server has an Admin Service.The Admin Service stores xml config files local to the server.

wsadmin allows the adminstration to be scripted.

JMS is used for intra cell communication. It is also used for in memory session replication.

There can be several nodes in a cell.

In the base config, JMS runs in the same machine as the server.

In the network deployment config, JMS runs in a dedicated JVM.

Session data can be stored in a database or replicated from server to server in the case of a network deployment. The server to server replication is done interanlly with JMS.

JNDI for WebShpere is built on top of CORBA CosNaming.

Security is not covered in this redbook, if I want to read about security I need to read IBM WebSphere V5.0 Security Handbook, SG24-6573.

Web Services in not covered in this redbook. If I want more information on WebShpere web sevices I should read WebSphere Version 5 Web Services Handbook, SG24-6891.

A network deployment consists of multiple Nodes.
A Node consist of a node agent process and several application servers.
The app servers in a node are managed by an adminstrative cell by the Deployment Manager process.

Clusters of load-balanced application servers are configured with the Network Deployment cell.

The Deployment manager sychronizes the binaries (code) and config (deployment descriptors) of every component to local copies of every node. The DM stores the binaries and config for each component in the master config repository. The DM talks to the Node agent to coordinate and synchronize management operations.

A cell is a node group for admin purposes.

The UDDI Registry is not covered in this redbook. For detailed information on the Web services support in WebSphere Application Server V5, see WebSphere Version 5 Web Services Handbook, SG24-6891.

The Web Services Gateway is not covered in this redbook. For detailed information on the Web services support in WebSphere Application Server V5, see WebSphere Version 5 Web Services Handbook, SG24-6891.

The edge components consist of the cacher and the load balancer.

The load balancer manages site selection, workload management, session affinity, and transparent failover.

The caching and filtering component are used for recieving request and serving URLs. The nice thing about the cacher is that it is programmable. Thus you can customize when the cache will be invalidated.

Follow up reading on caching and filtering:

Patterns for the Edge of Network, SG24-6822

WebSphere Edge Server New Features and Functions in Version 2,

The concept of cluster is divorced from cells and the deployment manager. The only req. for a cluster is that they serve the same application. It could be a laptop and a server is the example they give. The configuration does not have to be identical. A cluster is just to provide failover support and workload balancing not duplicate config.

JMS Server, App server, Node agent, and the Deployment manager are all managed services via JMX.

Topology Selection:

I read the entire topology section. I need to reread this. There is a lot of info I want to go over.
I've read the first 103 pages of the admin book. Hmmmm.... only 900 more pages to go.

EasyEJB: Struts CRUD framework, getting started....


I figured out how to use CVS with SourceForge.
I figured out how to upload the main website.
I updated my project to use Eclipse 2.1 and started using the new Resin EE and Cactus plugin.

The Cactus plugin was a wash for me. It uses Jetty, and I am not to interested in that. The Cactify feature was nice and useful, but I resorted to using the file. I am really enjoying the JUnit/Eclipse integration.

I am impressed with the Resin EE plugin from Improve. I need to adjust Resin to reload classes more often. I have been resorting to restarting it often.

I wrote the tests for the new class that was EJBUtils now renamed to LocalFinderUtils. Here is a sample of what you can do with LocalFinderUtils:

//The default context is set to java:comp/env/ejb. You can override the default or set a new default.

//Find a single bean by primary key
Dept dept = (Dept) LocalFinderUtils.findByPrimaryKey(pkey, "DeptBean");

//Find a collection of entities
Collection collection = LocalFinderUtils.findAll("DeptBean");

//Find a collection of entities by dept name that start with eng (one criteria)
Collection collection = LocalFinderUtils.findCollection("findByDeptNameLike", "eng", "DeptBean");

//Find a single entity by dept name (many criteria supported)
Dept bean = LocalFinderUtils.findObject("findByDeptName", new Object [] {testName}, HOME_LOCATION, "DeptBean");

There are many more variations of the above (12 so far).
Making the code generic (something we did not have to worry about at eBlox) for general consumption is time consuming.
I wrote tests for the above. In order to do that I had to include a few EJBs (Dept and Employee).
I spent a lot of time writing JavaDocs. The tests turned out well.

I changed EJBUtils (after the rename) to use MethodUtils from the BeanUtils commons project as Apache. I was caching my own method calls. At some point in the future, I want to benchmark EJBUtils (used cached method calls) against the new version vs. accessing the home method directly. Hmmm.....

I am going to document TransactionUtils, write the tests for it, and push it out. Nick L. wrote transaction utils (as far as I know).
Here is an example usage of TransactionUtils. I don't have a published test.

new Runnable(){
public void run(){
try {
Dept dept = (Dept) home.create(testName);
pkey = dept.getId();
}catch (CreateException ce){
throw new EJBWrapperException(ce, "unable to create Dept");

Task list before Alpha release

  1. Incorporate EJBUtils and TransactionUtils (almost done) (document, test)

  2. Incorporate EJB plugin I wrote for Struts (document and test)

  3. Include and refactor EJB CRUD framework. Change to use LookupDispatchAction action. Get it working in a more genric manner wrt to keys. Old verions only works with int and Integer keys. This can be improved! Write tests, and javadocs(document and test)

  4. Create base classes for EJB types and classes (PK key, Entity and Session for this release) (document and test)

  5. Create EJB Home Cacher for locals and remotes (document and test)

  6. Modify plugin to use new utilities EJB Home Cachers and Transaction Utils (document and test)

  7. Make plugin Struts modules aware (document and test)

  8. Move 5 custom tags for dealing with EJB (document and test)

Tuesday, April 29, 2003

Strtus CRUD framework

I came up with an Idea for a Struts based, EJB CRUD framework when I worked at eBlox. We wrote it. Andy, Ron, Nick, and Paul contributed to it.
I got permission from Andy to make it open source. I need to clean it up a bit. I have been working on it every night for a few hours (for the past two nights).

I doubt I will be able to give it the attention that it needs. I want to get what is there working. I want to clean it up a bit. I will keep working on it until it at least equals what we had.

Anyway, I started a Sourceforge project and committed my first three files.

Your project registration for has been approved.

Project Descriptive Name: EJB Utils (Struts based CRUD framework)
Project Unix Name: easyejb
CVS Server:
Shell/Web Server:

I started setting up my env. for development. I upgraded to Eclipse 2.1. I had to reinstall XMen, and the Resin plugin. I decided to use the new Cactus plugin. I've been playing around with it and other plugins. I just got Eclipse working with CVS. In the past, I always used WinCVS. I could not get WinCVS to talk to the source forge CVS server so I fooled around with the Eclipse CVS support. Very Nice!

Anyway, this is what I plan to be doing in my spare time.

I just put the new proposal in for Java Tools for Extreme Programming the 2nd edition.

Tuesday, April 22, 2003

Best Practices

Here are the slides to the well recieved Principles and Practices of Effective Developers


I just got accepted to speak at JavaOne on EJB CMP CMR and XDoclet. Apparently I was on the runner-up list, and someone canceled. I am really psyched!

Thursday, April 17, 2003

Struts Course Updates

We are going to update our Struts course and offer it in a 5 day format with some addition sections on CRUD.

Best Struts Course
Best Struts Training

Tuesday, April 15, 2003

Java Freedom Conference: Great Fun! Strong Opinions

We had a lively roundtble discussion with James Duncan Davidson, Erik Hatcher, Bruce Tate, Macijec Zawadski, Stuart Halloway, I and more. James compared selecting a software methodology to sex that has to be the funniest moment of the whole show. The great thing about the roundtable discussion is we started debating a bit. Someone would say something, and someone else would chime in and say the exact opposite. There would be a pause and gasp and then on to the next rebuttal. This was the liveliest round table that I have seen. Bruce Tate is a real salt of the earth type guy, and I enjoy his views on software development. It is a real pleasure talking to him. Macijec Zawadski is quite the software rebel; he likes to challenge the norm. Stuart is a really good speaker; very polished. James Duncan Davidson is awesome. I really enjoyed Erik's talk on Extreme XDoclet. Erik rocks! We all went to dinner and saw "Anger Management". If you are going to go to one conference this year go to a Complete Programmer Network conference. It is 100% stuff you can use when you get back to work. This conference series is simply the best software development conferences on the market.

Monday, April 14, 2003

WebSphere certification and getting up to speed with WebSphere 5.0

I've decided to get IBM WebSphere certified, and get up to speed with the new features of WebSphere (v5.0). It is something that I have been thinking about for a while. I was hoping writing it down might help. BTW I am a big WSAD fan not to mention Eclispe.

Here is my reading list to get started:

  1. WebSphere Application Server V5 for iSeries: Installation, Configuration and Administration

  2. WebSphere V5.0 Applications: Ensuring High Performance and Scalability

  3. WebSphere Version 5 Web Services Handbook

  4. IBM WebSphere Application Server V5.0 System Management and Configuration: WebSphere Handbook Series

  5. Testing Container Managed Persistence EJBs with the Table and Data Source Creator in WebSphere Studio Application Developer 5.0

I came up with the above list by searching for "redbook websphere v5" at WebSphere Developer Domain Library. Please let me know if you can think of other ideas.... pass them forward.

I thought I would rate and write a review for each item. Then I will spend some more time figuring out which certification I should take first, i.e., possible WebSphere certifications. I might stick to the developer certifications or not.

Java Freedom Conference

The Java Freedom Conference in Philly was fun. I tried out three new presentations, and one tried and true presentation. Two of the new presentations (Principles and Practices of Effective Developers and Bending Struts to fit your needs) were rated very high. The presentations that did well represent the highest ratings I recieved since I've been presenting for complete programmer network (I am getting better at it), and the third new presentation (Struts Primer) got horrible ratings (my standards are high... it did okay, but not really well).

Score card....
Java Tools for Extreme Programming did well
Principles and Practices of Effective Developers very good
Struts Primer session average
Bending Struts very good

The problem with the Struts Primer session was that I tried to fit too much material in too little time, and I did not gear it to a starter audience as promised in the abstract. It could be broken out into several presentations (Intro to Struts, Validation Framework and Tiles), but I tried to fit it all into one. Most people felt the material was too advanced. It seems people with Struts experience thought it was great, but those without Struts background thought it was too much (some suggested making it a longer session or splitting it).

The Principles and Practices of Effective Developers session was based on some of the ideas right from this blog. It is nice to verbalize these ideas and actually get good reviews from the thoughts. This is the first purely non-technical, all process/methodology/idealogy presentation that I have ever done, and people actually liked it.

I asked several times how many people were implementing custom tags. I was surprised how many people were not using custom tags at all. I find custom tags are useful and easy to learn. Hmmmm.... It seemed like a lot of folks use EJB despite the bad press. Maybe a session on doing custom tags would make sense for a future Complete Programmer Network. I like asking people what they do.

I think I am going to split the Struts Primer into three presentations (at some point in the future) as follows: Struts Primer, Mastering Struts Tiles, and Mastering Validation Framework. I also want to create a session on Mastering Custom Tags.

I want to retire Java Tools for Extreme Programming session, because I have given it about 12 times last year. Frankly, I am tired of giving the session.

Saturday, April 12, 2003

Java Freedom Conference

Java Freedom Conference

I've written this example for Extending the Struts Framework for the Java Freedom Conference in Philly. I've been asked to post the source for the case study. If you want the source to the sample code, email me.

Case Study Source Code and Slides

Here is the title and abstract for the talk.

Title: Extending Struts: Bending Struts to fit your needs Abstract: Okay you think you have mastered Struts, but you wish it could just do this one special thing? This session shows you how to go beyond the Struts basics to extend the framework to fit you needs. Struts was designed to be extensible. Learn how to extend it. Advance Struts topics about extending the framework using Struts plugins, and extending the Action Servlet, Custom Actions, the RequestProcessor, and more. This is an advanced topic that assumes previous knowledge of Struts.

Wednesday, April 09, 2003

EJB CMP CMR Performance and WebLogic

I get asked about the performance of CMP and how to avoid frequent loads from the database (per transaction). There are a few tricks. One is you need to setup an extent of an Entity bean as Read-Only if you want really good browsing performance. Second if you need both good browsing performance and occasional access to write to to the beans then you probably want to setup cache-between-transactions in the vendor specific ejb deployment descriptor. Third, never access an entity bean directly if you don't have either of the two setup, instead try to group as many operatoins as you can by using a session facade that groups many operations on a few entity beans if possible (given you design). This is all for now. Of course, I could flush this all out a lot more.... Perhaps I will at a future date.

Broken links for EJB QL Tutorial

All the links are broke for my EJB QL tutorial. It looks like IBM changed the links.

Here are the correct links for anyone who is looking.

Part 1

Part 2

Part 3 (CMR and intro EJB QL)

Part 4 (Advanced EJB QL.... every keyword)

Part 5 XDoclet and EJB

Presentations for Software Freedom Conference

I finished my presentation on extending the Struts framework using Plug-ins, CustomConfig Objects, and a Custom Request Processor. I built a great case study based on some of the work I did with EJB and Struts in a previous life. I a really proud of the results of the case study. It was a fun project to work on. I eventually want to build a cache of struts extentions that make dealing with EJB in a web application easier.

I am presenting this weekend in Philly on the following topics:

Title: Principles and Practices of Effective Developers

Abstract: Regardless of methodology or technology there are certain universal practices and principles of effective developers. Covers how to use these principles and practices to make effective decisions on methodology, technology selection and dealing with management, other developers and customers.

This is my first presentation on a non-Technical topic. I've done private workshops on this, but never in this public a forum. I hope it goes well. The workshops were really well recieved.

3) Title: Extending Struts: Bending Struts to fit your needs

Abstract: Okay you think you have mastered Struts, but you wish it could just do this one special thing? This session shows you how to go beyond the Struts basics to extend the framework to fit you needs. Struts was designed to be extensible. Learn how to extend it. Advance Struts topics about extending the framework using Struts plugins, and extending the Action Servlet, Custom Actions, the RequestProcessor, and more. This is an advanced topic that assumes previous knowledge of Struts.

Title: Struts 1.1 Feature primer
Abstract: Okay so you have been using Struts for a while, and you want to try some of the new features like Tiles, ValidatorFramework, or you are new to Struts and you want to learn the basics plus some new Struts 1.1 features. This is an entry level introduction to Struts and some of the new features. This assumes some knowlege of Web applications, JSPs and custom tags.

Wednesday, April 02, 2003

Blogger Pro

Blogger Pro

I've just upgraded to Blogger Pro. I now have RSS capability.

Powered by Blogger Pro™

My RSS feed is here:

Tuesday, April 01, 2003

CTO Forum: Whisky tasting and Jazz

CTO Forum: Whisky tasting and Jazz

I just learned a lot about Whisky tasting. A Whisky expert in full Scottish garb, gave a little seminar on the different types of whisky. I now have a favorite whisky. Before I just stuck to gin and beer.

Pair programming

After the whisky tasting, I had a great conversation with William Shelton and Marcus Leef on pair programming and XP. Both Marcus and William were at the Whisky tasting and Jazz session. They both are students at MIT in the Sloan School of Management. Quite an interesting perspective they both had.

CTO Forum Product Reviews

CTO Forum

Lunch conversations

I am at CTO Forum. When I went to lunch today, I accidentally sat next to John Udell and Jean Paoli. I say accidentally because I had no idea what they looked like. I did recognize both of their names. I was looking for a good place to eat and ended up hearing about France's Microtel, Blogs and XML (bonus). I also had a good conversation with Jason Bloomberg and Ronald Schmelzler from zapThink about BPEL and the next steps in Web Services. I swear some of the best "sessions" at conferences are informal conversations.

Product reviews for InfoWorld

I pitched my idea for a software development column to Mark Jones, the executive news editor. I want to write about development process, skills management, software frameworks etc. I think they are going to pass for now. :(

Mark mentioned that they are looking for articles for their test center. The articles are product reviews.

I told Mark that I would love to write product reviews. I would really like to write product reviews for WebLogic 8.1 (and BEA new development env.; soon to be released), and/or IBM WebSphere 5.0 and WSAD. I have a lot of experience with WebLogic (up through 7.0), and have recently wrote a tutorial for IBM on the IBM WebSphere SDK for Web Services (WSDK). The IBM WSDK for WS is built on top of WebSphere 5.0 so I already have a head start. I have also done a fair bit of writing about JSP, JMS, Struts, XML, Custom Tags, etc (not to mentioned my tutorial on EJB 2.0 CMP CMR which shows up number one on google and is ported to several EJB containers).

Mark said that I had to put the types of products I wanted to review in my blog, and the CTO of InfoWorld (a.k.a. Chad Dickerson) would read it. Hmmm.... sounds like I need to start syndicating my blog. It is time to upgrade to blogspot pro (good I could really use the spell checker). In addition to the above two already mentioned, I would like to do product reviews for Struts 1.1, XDoclet 1.2, JUnit, Eclipse, NetBeans, Maven etc. I wonder if they will review opensource development tools and frameworks as well. Hmmm.... I guess I could ask.

Link to list of my publications
Link to my website
Link to my Achievements