Peter Pilgrim's Weblog

All | General | Java | Music | DVD | Linux | Active | Expresso | Architecture

20060206 Monday February 06, 2006

Architecture Note 3: Define Application Interfaces to Decouple Modules

Dear Reader

Architecture Bit #3
The best practice is to program a default or basic implementation against the interface API for the module.

Define Application Interfaces to Decouple Modules

Welcome to a brand newin a series of Technical Architecture notes.

Inside Enterprise applications you will usually find the architecture is divided into several module. Some module might be greenfield ( a new developments), some may be legacy ( that come from supporting an older application), and some are adaptations (those that are hybrids). Whatever the type module, one of the best rules of thumbs software engineering practise is to seperate concerns .

This fundamental principle follows the general advantages of that system demonstrate in longer project lifetimes, and deeper maintanence times, when a system is built with greater cohesiveness and less decoupling between modules.

Translating in Java we as software developer, savvy enough in architecture design, typically divide applications in to tiers. These tiers are divided further more into module. Each module has its own API.

It is a good idea to define a Java interface for all critical modules in the application. The best practice is to program a default or basic implementation against the interface API for the module. Using interfaces allows you later to better test the application client by substituting a mock implementation for unit testing.

Here is a small extract for a categorisation processor module. This module is designed to categorise an incoming trade from a third party. Typically the financial institution only knows it is unrecognised trade until it formally matched with data inside in the internal systems. Categorisation is the first barrier that an "unknown" trade will encounter, and the software blueprint is to allow a task to identify the most likely possible type of trade from a certain of business rules.

public interface CategorisationTask {
    public void categoriseTrade( Trade trade );
    // . . .
public class DefaultCategoristationTask implements CategorisationTask {
    public void categoriseTrade( Trade trade ) { . . . }
    // . . .
public class ImprovedCategoristationTask implements CategorisationTask {
    public void categoriseTrade( Trade trade ) { . . . }
    // . . .
// For client unit testing only
public class MockCategoristationTask implements CategorisationTask {
    public void categoriseTrade( Trade trade ) { . . . }
    // . . .

"Programming to interfaces" is the phrase taught to many a beginning Java programmer. It is crucially important when developing modules in an application. By programming to interfaces we can take advantage of unit test capabilities and even lightweight dependency injection containers such as Bridgetown , PicoContainer , HiveMind , or Spring .

The Eclipse SDK makes much easier to create interfaces from any non-final, abstract or concrete class by clicking with the right mouse button inside a Java source editor pane to raise the Context Option Menu. Choose, then, Refactor -> Extract Interface. Inside the Extract Interface dialog, define the name of the new interface class, and select the methods that you want to be added to the interface. Finally press confirm to create the new interface class.

This is your editor, Peter Pilgim, just winging this Friday. Out.

( Feb 06 2006, 06:31:15 PM GMT ) Permalink

20060201 Wednesday February 01, 2006

Weblogic Deployment Stream Corrupted Exception
The cause, obviously, is that BEA have changed the uploading protocol between WebLogic service packs and/or whole versions in some way.

Dear Reader

Your editor has written a bittersweet short note on WebLogic Deployment. I wish there were better human readable error reports.


I found that I needed to customise the version of WebLogic including inside a project Ant build file, because of a awful StreamCorruptedException that occurred during deployment. I wasted six hours yester at my client trying to investigate the problem. At first I thought it was the EAR, then the EJB-JAR, then the deployment descriptors. All look endlessly through the code and the descriptors attempting to catch the usual typographical errors. This happened whilst deploying to a WLS 8.1sp1 server using more recent a WLS library WLS 8.1sp3. Then this morning, it dawned on me when I looked at the actuall exception type.
     [echo] calling target deploy with the following attributes :
     [echo] source     : '../build/test-ear/test-foo.ear'
     [echo] targets    : 'admin'
     [echo] application: 'test-foo-DEV'
     [echo] server     : 't3://localhost:7001/'
     [echo] username   : 'river'
     [echo] password   : 'pheonix'
     [echo] targets    : 'admin'
     [java] ==WARNING== upload option is deprecated. Use sourcerootforupload instead
     [java] Unexpected Exception
     [java] Java Result: 1


The cause, obviously, is that BEA have changed the uploading protocol between WebLogic service packs and/or whole versions in some way. The red herring is the suggestion on the error report to use instead -sourcerootforupload argument, because this argument is only available in WebLogic Server 9 (Diablo).


The solution to the problem is to use weblogic.Deployer from the weblogic.jar actually stored on the remote server. I downloaded the remote JAR and push it somewhere on my box.

I created or edited an file add the follow definition

deployment.weblogic.jar = /opt/remoteserver/weblogic/server/lib/weblogic.jar

Modified the ANT build target according like so

    <target name="deploy.test" depends="init, BuildTime" 
    	description="Deploys the Unit Test EAR onto WLS">
        <property name="local.tdeployment.source" value="${}/${}"/>
        <echo message="calling target deploy with the following attributes : " />
        <echo message="source     : '${local.tdeployment.source}'" />
        <echo message="targets    : '${foo.serverDeploy.targets}'" />
        <echo message="application: '${foo.serverDeploy.test-application}'" />
        <echo message="server     : '${foo.serverDeploy.server}'" />
        <echo message="username   : '${foo.serverDeploy.username}'"/>
	<echo message="password   : '${foo.serverDeploy.password}'"/> 
        <echo message="targets    : '${foo.serverDeploy.targets}'"/>
        <echo message="deployment.weblogic.jar = '${deployment.weblogic.jar}'" />
        <java classname="weblogic.Deployer" fork="true">
            <arg value="-adminurl"/>
            <arg value="${foo.serverDeploy.server}"/>
            <arg value="-user"/>
            <arg value="${foo.serverDeploy.username}"/>
            <arg value="-password"/>
            <arg value="${foo.serverDeploy.password}"/>
            <arg value="-name"/>
            <arg value="${foo.serverDeploy.test-application}"/>
            <arg value="-source"/>
            <arg value="${local.tdeployment.source}"/>
            <arg value="-targets"/>
            <arg value="${foo.serverDeploy.targets}"/>
            <arg value="-upload"/>
            <arg value="-activate"/>
                <pathelement location="${deployment.weblogic.jar}" />
                <pathelement location="${foo.lib.dir}/xerces.jar"/>
Birds-of-Feather XV
Friday, 3rd February 2006

Oracle City of London office

See BEA's own Dev2Dev forums for more information, especially the thread Problem deploying ear file with weblogic.Deployer

Hope this helps. This is Peter Pilgrim, Out

( Feb 01 2006, 03:01:35 PM GMT ) Permalink

20060130 Monday January 30, 2006

Herbalife Five Product Program, Almost 30 Days Are Up

Herbalife Five Product Program, Almost 30 Days Are Up

Dear Reader,

I have been following the Herbalife Five Product program for almost a month. The results have been spectacular. In the first two weeks I lost 10 lbs (ten pounds) and about an inch off my upper stomach measurements. It is fantastic.

Women are particularly targets in an annual billion dollar industry advertisement crusade, but men don't appear to have any of the same level of support whatsoever. Don't believe me? The next time you see a Weightwatcher's Ad on TV, please count how many men are actually appearing in it.

This is the first true diet I have ever been on in my life. Like most of you out there I never really took my weight and physique seriously. As a child I was skinny, as a teenager I was slim, in my twenties, at University, I recall, at one point I was only a 28" (inch) waist and small / medium size in T-shirts and trousers. In my late twenties, I guess, something went drastically wrong. My old raving clothes did not fit me quite anymore. I grew. I mean, I literally expanded up to large shirt sizes, followed by bigger trousers and jacket sizes. I discovered that my pot belly suddenly appeared, I never tried to make really go away, despite the fact it was seriously unimpressive. Still I carried on with this because I accepted everyone got big bodies when they got older.

My own personal theory is, that I gave up on sport and active fitness in my middle twenties. I just simply could not be bothered any more. So there was nothing actively going on in my life to compensate my lack of enery and drive.

It wasn't until I was 30 that I began to think about playing football again, running or doing something more fitness relatedly. I tried various schemes to reduce the pot belly, but it never went away. This is despite the fact, I rediscovered my love of football, hated the breathlessness, general lack of personal fitness that I had in my young youth. Many a Sunday afternoon game I wish I had that extra half-a-yard of pace to beat the defender. I just never took it that seriously. After all, weightloss and slimming are women's problem.

If you are interested in Herbalife, I can strongly recommend the following Herbalife Consultant as an officially licensed distributor and nutritional educator.

For more information on Herbalife .

It is easy to see the reason why from the media today. Virtually all shapeful, bueaty products, fat free and imagery about body image and paranoid are aimed at the fairer sex. Women are particularly targets in an annual billion dollar industry advertisement crusade, but men do not appear to have any of the same level of support whatsoever. Don't believe me, the next time you see a Weightwatcher's Ad on TV, count how many men are actually appearing in it.

The fact of the matter, it is really hard to change your eating habits, here are the reasons, in particular order of initial thoughts:

I believe finding substitute foods is the hardest part. You can believe the crap that the big supermarket chains tell you, if you want to believe that, that their so-called healthy containing less than 3% fat foods are really that good. The majority of those supermarket-owned products are not good for you at all, because they replace one evil ingredient with at least another. So in the long term is becomes unhealthy for you, and the supermarkets have won your hard-earned cash at your expense. For example, a so-called "low fat mature cheese" (of course, there is no such thing) will be tasteless and be supplemented with toxic preservatives. As Mama used to say to me as a child, "Just because it saids that it is, doesn't mean that it is." And if you are going eat a cheese, then buy a decent cheese like "Welsh Collier Mature", and treat that product as reward for a following week of disciplined eating.

If you want to avoid fats then the best thing is to go vegaterian foods, look for low-fat, but no oils, no extra salts, no added sugars, and definitely no evil preservatives in any shape of disguise. Look out for Quorn and Linda McCartney products because they are really super good. Reduce the in take of white bread (rubbish), try a german Vollkornbrot, rye bread, or malted or wholemeal bread. Best of all reduce all snacks. Avoid and caffeine related products. A good idea, is to invest in a vegaterian meal book and steal some receipe ideas.

Cook your meals with vegetable stock cubes. The less of fattening oils you use in the frying pan or oven the better your body will be. Eat sensible portions, dont be greedy, you want your stomach linings to actually get used to shrinking.

Drink pure water at least 1.5 to 2.0 litres daily. Avoid in all circumstances fizzy drinks, like Cola. Dont even go there with Diet-Cola, just because they advertise no sugar remember the ingredients removed could be substituted with several other toxics. Besides, I was alway told by my dentist that cola ruins your teeth, it actually burns microscopic wholes into the enamel. Sheez!

Here are my dated statistics:

Date Weight (lbs) Body Font (%)
Thu 6 Jan 2006 185.2
Sun 8 Jan 2006 183.3
Tue 10 Jan 2006 185.7
Wed 11 Jan 2006 7:30AM 184.2
Wed 11 Jan 2006 9:30PM 180.6 28.3
Thu 12 Jan 2006 8:28AM 181.2 28.8
Sat 14 Jan 2006 12:45PM 178.8
Tue 17 Jan 2006 (*) 174.4 27.7
Wed 18 Jan 2006 7:30AM 174.8 27.7
Thu 19 Jan 2006 8:00AM 174.8 26.2
Fri 20 Jan 2006 7:30AM 174.8 26.4
Sat 21 Jan 2006 177.2 27.7
Sun 22 Jan 2006 178.2 28.2
Mon 23 Jan 2006 7:30AM 174.4 27.6
Tue 24 Jan 2006 7:30AM 173.8 27.2
Wed 25 Jan 2006 6:30AM 173.2 27.4
Thu 26 Jan 2006 7:30AM 173.4 27.4
Fri 27 Jan 2006 8:00AM 172.8 27.7
Mon 30 Jan 2006 6:30 174.4 26.9

(*) In the first ten days, I think my bathroom scales were miscaliberated. So I changed them and the location of the weighing-in and it worked out great for me.

As you can see from the table, I am having a weekend break from the program. On Saturday I will still take my Herbalife ShapeWork vanilla shakes, but not on Sunday. Still I remain on guard to eat healthy meals even on weekends.

I have enjoyed the program so much and how it has made me a better football player. I scored some fantastic goals with the other players whooping with delight, and I am enjoying a resurgence in my form recently that I will continue it for one more month. I hope this helps somebody.

Your comments are sincerely welcomed. This is Peter Pilgrim. Out.

( Jan 30 2006, 12:28:35 PM GMT ) Permalink

20060127 Friday January 27, 2006

Architecture Note 2: Technical Architecture Logging for Debugging

Dear Reader

Architecture Bit #2
You just need enough information present in the logging message so that if you are investigating a fatal crash it will be very helpful to you as a developer.

Technical Architecture Logging for Debugging

Welcome to a brand new series of Technical Architecture notes.

There are two types of logging frameworks in the Java world, the venerable Log4J and the standard JDK 1.4 Logging API. Most applications including use Log4J.

Use the Log4j Logger Class Directly

On previous projects I have seen ?framework architects? put a wrapper on the ../../page/org.apache.log4j.Logger.css class from Log4J class. I have asked myself why?

import ../../page/org.apache.log4j.Logger.css;
public class MyHelloWorld {
Logger logger = FooLoggerWrapper.get( MyHelloWorld.class )
public void hello() { saying welcome?);

The standard logger class is perfectly usable or already, it really does not need any more augmentation. The only time you need to change Log4j is to ensure that it loads the configuration file or property file. This should always be done in a start up Java Servlet, inside a WebLogic Application Lifecycle Listener start up class (even if it is non-standard in terms of J2EE) or other externalisation service. Moreover, it should only be done just once; the first time the application starts up.

import ../../page/org.apache.log4j.Logger.css;
public class MyHelloWorld {
    Logger logger = Logger.get( MyHelloWorld.class );
    public void hello() { saying welcome?);

Logging for Debugging Output

In order to speed Log4J calls use the check debugging method. Instead of writing:

logger.debug(?This is a test!?);

Do this as an alternative

if (logger.isDebugEnabled() )  {
   logger.debug(?This is a test!?);
This will speed up the logging in the enterprise application by up to 50%.

Log Useful Information

When you are writing logging either debugging or for reporting errors, add genuine information to help the systems infrastructure team and obviously yourself track down application failures. It is very hard find a bug in a J2EE application if the message is just generic and not detailed enough to the running thread of control.

A good idea is to include the parameters of the call in the message and good human readable English description of the method purpose. What is that method really trying to achieve? Write the answer as a concise and conclusive reporting message. There you have it.

Here is a near enough real-life example in financial IT:

public void processTradeSettlement( TradeRecord t, TradeData d ) {
if (logger.isDebugEnabled() )  {
    logger.debug(?processing settlement trade id:?+t.getId()+? ?+
                 ?nomininal:?+d.getNominal() );
	// perform work

Please note that one does not have to verbose with too many parameters, like gazillions of parameters, or all instance members of a input object. You just need enough information present in the logging message so that if you are investigating a fatal crash it will be very helpful to you as a developer. The buck always fall back on you

This is your editor, Peter Pilgim, just winging this Friday. I hope you enjoyed this second architecture tech note. Leave a comment. Out.

( Jan 27 2006, 06:29:32 PM GMT ) Permalink

Architecture Note 1: Throwing Exceptions

Dear Reader

Architecture Bit #1
Never let low-level defined exceptions such as a javax.naming.NamingException etc propagate to the application level.

Throwing Exceptions

Welcome to a brand new series of Technical Architecture notes. This is the first note. In the section you will find some best practices for developing J2EE applications.

The Java language defines two types of exceptions.

If you are throwing an exception in called method

Exception Type Best Practice
Checked Exception Client code is forced to deal with them. In other word it must use a try / catch block or re-throw the exception. Use a check exception only if the exceptional condition or event is truly recoverable.
Unchecked Exception Even though a RuntimeException is a subclass of Exception. A runtime exception gets special treatment in Java, because the calling client is not forced to deal with them. If the client cannot do any recovery at all, then the best practice is to throw a RuntimeException.

Never let low-level defined exceptions such as a java.sql.SQLException, javax.naming.NamingException or javax.jms.JMSException propagate to the application level. The best practice is to convert the low-level exception into an application or business level exception. Starting from JDK 1.4 all java.lang.Exception can accept a root cause to effectively nest an exception inside another exception. The advantage of conversion is two fold.

  1. The client code is not polluted with handling logic to deal with these low-level exceptions. The client code does not have to worry about SQLException etc.
  2. Converting especially to a runtime exception means such low-level exceptions essentially escalate up the call stack trace until the application server catches them. Most application servers can be configured to write unknown exceptions to a special log file. We save the application from having to do this redundant work and isolate it just the once.

Here is a Java example that converts a SQL exception into application business level exception. Please note raised exception is a runtime exception so it will propagate up the stack frames until the application server catches and stores in a log file.

try {
catch ( SQLException se ) {
     throw new BoohooRuntimeException( 
                 "Database failure insertion occured", se ); 
This is your editor, Peter Pilgim, just winging this Friday. Out.

( Jan 27 2006, 06:29:13 PM GMT ) Permalink

20060105 Thursday January 05, 2006

New Active Year 2006, The First Couple of Days New Active Life 2006

New Year, New Resolutions: The First Couple of Days

Dear Reader,

Your editor has resolved to get a much more active life. He has, as they say, fallen off the pace with the football training and needs to get back into the first team again.

Get Involved !
Get Into It
Get A New Active Life!

He volunteered himself to the Herbalife Cell Activator program. These are the [embarrassing] measurements from Day 2 of the 30 day trial.

Name Value
Upper Torso 41 ¼"
Upper Stomach 38 ¾"
Lower Stomach 36 ¾"
Weight 184 lbs
Height 5ft 7 ½ in

With these bulging statistics, your editor was forced to act after the Xmas vacation.

The Herbalife brand is a global American company, but it trades in the UK using multi-level marketing, with representatives, which can be both individuals and groups. It has licensed resellers all over the world. It just so happens a I know of a consultant who distributes the products. After explaining my health and eating problems, she recommended a program for me, with five products.

  The Formula One: ShapeWorks   
  The Formula Two: Multi-vitamins  
  Herbal Complex
  Thermojetic Beverage
  Cell Activator

The ShapeWorks effectively replaces one meal a day with a multitude of natural ingredients none of them are remotely artificial. This was just that thing I needed, because it removes the complex choice of looking endlessly at additives and low-fat claims on the supermarket shelfs. I think it is way better than the SlimFast stuff you can also buy, because you are not skipping meals, which is very dangerous, because you can get hungry at awkward moments and eventually may end up binge-eating on the wrong foods and snacks. With the Five Product Program so far all I need to make a shake in blender with natural yoghurt, very low fat as can be, with a small banana, with a ½ litre of water. All I need is the discipline to take the shake, which replaces one meal, at set times of the day, say 8am, and just on or after lunchtime, and I am set for the day until evening. I only make sure that I drink pure 1½ to 2 litres of still fresh water, none of that fizzy carbonated rubbish (e.g Coke, Soda, or soft drank).

The Thermojetic Beverage (also known as "ThermoBev" in the popular vernacular) is very cool. It tastes like a iced-tea, but it gives up a energy surge in the morning without the caffeine. It is similar to the Pro-plus tablets or drink that you can get at the local chemist, but, I promise you, it is much more healthier for your body. I take it at least a half teaspoon with a glass of water at least three times a day. Or just add a teaspoon with a herbal tea jasmine, but it does not have caffeine.

So on day 3 I feel better and fine, I have slept better. So far the program is working great. So I will try the program for 30 days and see how it goes.

Because I have notice I have become pretty sluggish playing football and getting a bit out of breathe after a hard game, I want to get fit. I also know better, "Your body is your temple". So anything that help me get better and more toned is welcomed. I am using to Herbalife program, more to tighten up the inches around my belly rather than serious weight loss.

If you are interested in Herbalife, I can strongly recommend the following Herbalife Consultant as an officially licensed distributor and nutritional educator.

For more information on Herbalife .

Thanks for listening to this long blog. Your comments are sincerely welcomed. In mean time I promise to upload a spreadsheet with the statistics at regular intervals in the program.

This is Peter Pilgrim. Out.

( Jan 05 2006, 05:25:01 PM GMT ) Permalink Comments [0]

20051223 Friday December 23, 2005

JavaPolis 2005 JavaPolis 2005

JavaPolis 2005

Dear Reader,

Your editor has attended the JavaPolis 2005 in Antwerp, Belgium .

Let's face it folks, it is cheaper to travel from London to Antwerp, Belgium and pay 370 Euros than travel the way all the way to the California, and still pay the JavaONE full going rate.


Your trusty editor will say this twice. JavaPolis 2005 is the nearest event that touching the quantity and quality of JavaOne. JavaPolis 2005 is the nearest event that touching the quantity and quality of JavaOne. In terms of the ratio of good technical speakers and experts to marketing this conference marks as one of the best. It is compares with the Association C / C++ Users conference for good technical information, Oxford. JavaOne is bigger, sure, but at that event there is much more marketing and pure political bantering between vendors, and gesturing towards customers, and potential customers. So much so that the audience have at JavaOne become disillusioned and affronted.

The audience came from over fourty countries to JavaPolis. This is great for a European class event. We had four and half days of fun, with a free movie, unlimited freshments thrown it. Compared to the JavaONE event we could have done with the Borland Party at NV, and the massive outstanding celebration that Sun threw up for the Tenth Birthday. the Metroplex cinema complex being not so out of the way from town, a bit better transportation to and from hotels.

The latter issue was interesting because this is where your editor thinks the transport fails JavaPolis. The birds of feather event are minimal and leave much to be desired. It is too far to travel a hotel and then head back to Metroplex just to attend a BOF that may be poorly attended or the speaker has no respect for his audience.

Aside from that the JavaPolis is a good deal. Let's face it folks, it is cheaper to travel from London to Antwerp, Belgium and pay 370 Euros than travel the way all the way to the California, and still pay the JavaONE full going rate. The biggest problem this editor can see with it, is the language is always English so it is hard for people who dont have a good grasp of English.

Your editor took the Eurostar train from London to Brussel. For my non-european readers this is train that travels under the man-made tunnel under the sea that connect southern England to northern France. You can find several hotels there including the Hilton Hotel and the remarkable Astrid Park Plaza if you are looking four star quality. ( Dont book a cheap hotel like going less than 40-50 Euros a night, you may asking for a trouble. )

My Presentation: What's New in Struts 1.2.8 and 1.3 dev?

Your editor volunteered to give a JavaPolis presentation called a Quickie, because it is only supposed to last for fifthteen minutes. It was called What's New in Struts 1.2.8 and 1.3 Dev? . It took place on Monday 12th, December 2005 at 1pm in room 3. Bejug got the original times wrong on the JavaPolis website. The PDF document and the Open Office 2.0 slides are available. Listen to the MP3 audio rehearsal of the presentation that was made in the hotel the night before the event. It was pretty scary stuff standing in front of potential 400 delegates with a wireless microphone. Your editor's Dell Inspiron 8600 laptop failed to hook up with the projection equipment, which is a widescreen 1920x1200 resolution. Anyone out who knows how to correctly set up a Dell Inspiron 8600c laptop with standard projection equipment in Windows XP please drop me a line or leave a comment? Thank you. A personal thanks to Stephan Colbourne for his help in providing his working laptop at extremely short notice.

Highlights of JavaPolis

Here are your editor's highlight of the conference.

Meeting Jug Leaders

As a founder and leader of the JAVAWUG , you editor was obligated to attend the Meeting the JUG Leaders BOF. This was a very good interesting meetup, because we met Stefan Jannssen, the founder of the BEJUG for the first time. There was a lot talk about getting to known the other European JUGs. We dont know much about each other, so we should build more alliance and provide resources for each other.


On Thursday keynote session, there was an announcement that Bejug in conjunction Interface 21 would be host a summer event. This is to be called Spring One. It is amazing how a support software company, community and an interest has been founded around an open source project.

Peter Pilgrim was at JavaPolis 2005

( Dec 23 2005, 12:17:18 PM GMT ) Permalink Comments [2]

20051101 Tuesday November 01, 2005

Discovering Podcosts, Maven 2, and Organising JAVAWUG

Dear Reader

Meet up XIII

Dear Reader,

JAVAWUG Inaugural Announcement

As you may know, your editor founded and organised a meet up originally called the Struts London Networking Group. Recently we renamed the group and applied for successfully for official Java User Group status. The new name is JAVAWUG, which stands for the Java Web User Group. At the moment we are preparing an online, and creating our the brand image for our group.

One of the reason, we are forced to create a web application online for ourselves is because we relied on the company. Until recently this was a free site for groups to organise networking events, birds-of-feather. It is now a paid for, so your editor abandoned our web presence at the site. In fact, this is a trend, for a number of websites that offered something for free, got the userbase into the thousands, and then suddenly turned the tables on the customers, by demanding payment. Well it definitely proves that T(R)INSTAAFL (There (really) is no such thing as a free-lunch).

Your editor bemoaning the fact that the group lost its free web presence, in fact he stipulates that as professional web developer using Java, we should be able create a web site application of our own. (If we can't, then we ought to be shot with good cork porous buck, of course).

The other notable news: your editor has designed a draft version of the new JAVAWUG logo. It is has been privately distributed to members, but not made publicly available yet.

Birds-of-Feather XIII

The thirteenth JAVAWUG Networking BOF event took place on Friday, 28th October 2005 at the

JAVAWUG is a Java User Group and it has already has listing at If you live in London, England, and work professionally, and dont mind giving up a social evening every five to eight weeks in a year, and you want to discuss Java web technology and like minded users, and would rather switch off your television and do something less boring instead then why not come along to one of our events. Send me an email to peter dot pilgrim at csfb dot com and I promise to get back to you. There are even international people joining the JAVAWUG. Thank you, Brazil.

Belgo Central
50 Earlham Street,
Covent Garden,

Nearest Tube: Covent Garden
Cuisine: Belgian
Telephone: 020 7813 2233

For an ajax Google Map click here Maps / 248

Here are the salient discussion points.

The attendees were Peter Pilgrim, Adam Hardy and Marco Mistroni.

In the last couple of weeks, in fact in the last month, your editor finally discovered the true meaning of the podcast phenomena. Three guys, Tor Norbye, Carl Quinn, and Dick Wall, called themselves the Java Posse, producely a reasonable semi-professional podcast on a weekly basis starting from Monday 3rd October 2005 until the present day. The discussion points are very interesting and if you find yourself commuting each day with work, then instead of learning to latest crap pop music, you could be catching up with the latest news in the Java scence. Your editor found these guys to really be in tune with what is going out there, and he is not the only one, as they have had some key "Java" celebrity providing interviews, such as Chuck Hill of Apple WebObjects and Cameron Purdy of Tangasol Coherence, and very soon, naturally at the time of writing, none other than Jonathan Schwartz, Vice President of Sun. So go do it, strongly recommended.

Web Dev Radio

During my search of iTunes Music Store for worthy Java related cast, I came across Web Dev Radio. Whilst strictly not all about Java, it covers more general topic for web site owners, administrators, business management as well as technical stuff. It is run by a one-man band called Michael Kimsal. The quality of this podcast falls a little behind the JavaPosse, especially in terms of celebrity interviews. Also Michael is working and producing this broadcast off on his own. However, you may find the internet marketing interview with Caryl Felicetta from Single Throw to be well worth a listen to, especially because she eloquently what and how not to market a website.

Maven 2.0

Maven 2.0 has just been released, and your editor has been attempting to convert a single open-source project to Maven for some time. It was shocking hard work, but once the repositories and dependency issue were solved, it became easy if not easier to understand why developers have been raving about Maven, pun intended. Having switched from Maven 1.0.2 to 2.0 also did not help with the project conversion. Your editor was just about to delve in the multi-project side with the help Vincent Massol's A Developer's Notebook" . Of course at this current writing time, many of the Maven 2.0 Plug-ins ( called by the "in" developer community as Mojos, and they must have been watching far too many Austin Power movies, drunk, propitiated, and very late at night), have only reached beta status. Many of the Plug-ins will not be ported easily, and will require rewriting in Java. On the otherhand Maven 2 can compile, package, and install artifacts, and is multi-module ready, it is just a pitty that the reports, such as the Junit, cross reference, and especially javadoc plug-ins do not work out of the box at this present time. The Maven 2 must also get a handle of the documentation, otherwise this will turn into poor release. In your editor's opinions, the documentation should have revamped before the official announcement and the development should check the essential reporting plugin were fully operation beforehand. By the way the originally Maven 1.x release is still available

EJB3 Workshop Presentation

Reasonably your trusty editor was contacted by Alexandar Hartner of the EJB 3 Workshop regarding giving a presentation to JAVAWUG members. Alexandar is a South African trainer and consultant who recently set up a start-up company in Oxfordshire, England. (Oxford is about fifty miles away from London city centre, along the M40 motorway). Anyway on the same day of the BOF XIII meet-up he, in conjunction with the JSIG gave a presentation on EJB 3.

Now you might think it is a bit too early to be giving training on EJB 3 since the full specification is not ready or even been released, but JBoss and Oracle have had pre-release implementation of the specification out for a while. Anyway Alexandar has invest his time in the EJB3 a la JBoss and have obtained considerable experience with the EJB3 specification. Bare in mind, that EJB3 uses annotations, and therefore presupposes that you will be running your applications on a Java 5 platform, then it might worth looking at training if you will definitely need to write an Java EE application next year. Training is expected cost £250 to £350 for a five day workshop, and if you bring your own laptop it will be discounted. Contact EJB 3 Workshop for more information, and there is further discount for JAVAWUG members.

The presentation at Sun's London Bridge office went well enough, and was attended by around twenty five people on the day. Alexandar presentation slides will need to be worked on as the brightness of background graphics hid some of the text. The text ledgible to your editor sitting in the back row. The animation of the highlights in almost all of the technical slides was offset, so that it obscured the important annotations. Obviously in powerpoint presentation, things go wrong, but the speaker was knowledgeable enough in his subject, and answered questions patiently. Giving a presentation in outside client environment, where you are not used too, will always be rougher than in your home environment, but there should be in improvement in future speaking opportunities.

This is Peter Pilgrim. Out

( Nov 01 2005, 12:27:32 PM GMT ) Permalink Comments [2]

20051013 Thursday October 13, 2005

BEAWorld 2005 London "TheTechnical Day"

Dear Reader

Your humble editor, at almost zero expense, attended the BEAWorld 2005 Technical Conference Day. Taking place on Wednesday 12th November 2005. Your editor was greatly looking forward to see what exectly BEA and its partners were offering Java Enterprise Edition customers and delegates.

"Service-Oriented Architecture (SOA) is changing the way IT infrastructure enables companies to do business -- by driving efficiencies and allowing organisations to become more agile .. and by developing new competitive advantages"

During the best of times, London, can be traumatic place to travel by public transport and so it proved on this special day, when your editor forgo his consultancy fee. Leaving aside the train track failure on London Underground between Warren Street and Euston stations, the essential key note was missed.

Apparently when your editor arrive, BEA had technical problems with the key notes and the demonstration. It was good see one other notable delegate attended, Niall Pemberton, Apache Struts and regular attendee of the STRUTS-JSF / JAVAWUG meet ups.

First topic of the day was a discussion panel with four leading delegates. Rod Johnson from Interface 21, et al. The most surprising announcment was that two of the panel Rod Johnson, Beehive's Edward O'Neill were looking into collaborating with Don Brown on his Clarity project research proposal. Anyway they gave favorouble noises on this proposal, whether anyone can make sense of the multi-works and provide a clear accepted web stack API in the near future is anyone's guess.

Your editor attended the New WebLogic Server 9 session

New BEA WebLogic Server 9.0 : Phil Prosser BEA Systems

New Weblogic Server 9 is an kernel architecture with integration services build around it. This is a contemporary design that follows the trend already popularised by JBoss, Keel framework and Mach UNIX kernel.

The new administration console has been re-architectured. It is modular architecture based on Struts (with Weblogic Portal inside).

WLS 9 sports brand new configuration assistants, which feature easy multistep configuration. First introduced in 8.1 Console but rarely utilised and little known fact that the console can be rebranded with skins. The new console LAF (look-and-feel) is really cool looking and revamped. The idea is to reduce risk and guarantee safety. The architecture is built with transaction concepts. You can make multiple changes to the server and then commit them in one go. A big improvement for system administrators and application deployers.

BEA now supply a Weblogic Scripting Tool which works on and offline, and it now supports XML Schema (XSD) for the standard configuration XML file (config.xml) There is great enhancement with the JMS Server You can now view and edit JMS messages (fantastic) and manage across domains from a single console. You can also interact with messages in the so-called Store And Forward model. (Your editor does not know if the WLS 9 can actually delete JMS messages, or even reorder them arbitary.)

BEA now provides a WLDF Weblogic Diagnostic Framework which can allow interaction from 3rd party applications for monitoring situations. BEA admitted that this diagnostic framework should have been in the original WLS a very long ago. For instance its allows people like Wily to better integrate with the server, rather than have foreign developer duplicate and develop tedious code integration.

Diablo also features a new and improved node manager - the administrator server is no longer required. Server migration; Windows service; WLDF integration

The basic idea behind the BEA WebLogic Diagnostic Framework is to "Fix it before it breaks". Crucially WLDF is now supposedly unitfied Framework with an improved interface and JMX controls. It can be switched on or off dynamically without interrupt or disrupting running applications.

Deployment Plans / Library Modules

Deployments plans are part of BEA ongoing support for the JCP standardisation, namely the J2EE Deployment API 1.0 & JSR 88 Deployment Plans.

This specificaiton allows trly portable applications, because the artifacts always accompany the applications. It therefore allows true binding and tuning overriding at deployment time. It is also the basis design for round trip integration with most IDE (JSR 88). The big idea is to the allow Weblogic server to perform hot deployment and debugging with a standard deployment API. Now there should be a standard API instead of tool provides, including BEA itself, making proprietary calls.

In summary

Store and Forward Messaging

WLS 9.0 now supports Asynchronous S&F; between servers & domains in order to increases reliability of communication and preserves message ordering. The idea is store messages locals when a cluster link is broken, when the cluster link is reastablished, then those stored local messages are forwarded to the cluster.

BEA is also pushing SOA Integration with the release of WLS 9.0 and they want to establish the server as the application server of choice for SOA Stack.

BEA trumpeted a couple of benchmark triumphs, judge them as you think they are worth.

And more publicity triumphs

SOA Toolkit created by PushToTest
Comparitive Results

Mix and Match Open Source and Commercial Products: Blended Application Deployment and Deployment : Adam FitzGerald, Ken Tam

Defining "Blended" Applications. Over 70% of BEA customers already use open source solutions in their application development or deployment.

Pure open source solutuions may not meet enterprise requirements for: performance, reliability, security, and/or manageability. In this niche commercial vendors hope to provide value-add product or service to professional users. BEA use of the term blended was in fact, correctly identified, as business fuziness around the computer literati known terminology for open and close-software.

BEA however continued to expound blended application development and deployment, claiming that it allows the developers to pick the right tool for the job in order to provides flexibility.

Java Application Frameworks Are Needed

Java Enterprise Edition API

Provide good basic standards, but they offer too many complex options or architectures Can be slow to evolve with current software practices

Open source Java Application Frameworks

OSS primarily simplifies the application development for professional engineer. OSS responds to the community feedback more quickly, open source solutions benefit from more agile process. Open software frameworks address specific technical problems. Open source solutions tend to aim on a particular problem with better focus. They dont tend to be general solutions or fix-and-be-it-alls. These solutions leverage Java Enterprise standards that are in themselves, the evolutionary response of the Java Enterprise development community

Open Source addresses "technical complexity". Over recent times, contemporary frameworks are typically lightwiehgt container. Their design is all about simplification. Typically addressing technical complexity with POJO support and Dependency Injection in order to resolve dependencies, making it simpler to write code, and thus easies fast, iterative unit testing. It is not an unusually feature of all open source frameworks. Frameworks tend to use meta data and now advanced toolkits support aspect oriented programming to allow cross-cutting concerns and architectures built around the notion of compositional filters.

Java Application Frameworks

Behind the scenes BEA political interest to the community is that WLS 9.0 and beyond are the preferred execution environment for any of the above tools and any application.

Framework Support for the Beehive Framework here are some of the salient details from the speaker's agenda

Spring Framework

Java Development Tools

BEA is one of several corporation who have realised that the Eclipse SDK emerging as dominant tool provider BEA Workshop migration to Eclipse runtime Active plug-in community

BEA has targetted Eclipse Tiered Offerings to be release next year 2006. There will be a basic Eclipse download with Eclipse level WebLogic Server specific tooling support. Of course because BEA acquired M7 they are retooling, as we speak, Workshop for Eclipse as a plug-in. BEA demonstrated a plug-in for Eclipse working with Beehive page flows. There is a strong vocal commitment to support customers who use Eclipse and thus BEA will provide tools to support Weblogic developer. The full title of the product is something like Weblogic Workshop 9.0 Weblogic Workshop for Enterprise depvelopment

Java Enterpise Edition Runtime environments

Open source frameworks typically only require the basic J2EE runtime environments, particular concerning distributed transactions. WebLogic has great security and transactions, and also I think, enhanced application server management. The Spring framework has proven this it is plausible to write POJO that are completely divorced from there container environment. Moving an application from a Tomcat server to WLS 9.0 to get the benefit of distributed transaction should be easy and portable. BEA call this friction-free migration to Production deployment environments. There strategy is to make it easier to move an application from tomcat to geronimo to WLS.

The BEA Console will be able to interact with Apache Tomcat and Geronimo servers. Tomcat Management via BEA Weblogic Console is now possible. BEA has taken the stock Tomcat administration console and rebranded it with an appropriate look and feel console for WebLogic 9 Diablo, and believe your editor, it was looking pretty cool to see. So put your shades on.

Demonstration of NitroX / M7 with JSP using an old version of Eclipse (2.x !!! ) Showed off the App X-Ray functionality to look at dependencies giving the developer navigation control. Of course this is direct competitor to MyEclipse 4.0.

The latest Medical Record application uses Spring to provide a reference implementation of Spring enabled application for WebLogic Server. Downloadable from Dev2Dev website. Services are POJO with getters and setters as described in the application context XML file.

Demonstation of the Springs bean being managed in the WLS 9.0 console under the panel "Summary of deployments". It was truly Fantastic insight to their next generation technology. The demo concluded with Medrec application running in Tomcat management domain and also in WLS. This Weblogic Console for Tomcat Server 5.5.9 was very impressive, because you could see the speaker drill down to look at clustering, deployments, diagnostics, interoperability, and of course, services. Stay tuned for more announcements on the application interoperability for Tomcat.

Your editor asked the speaker for few comments on the topic.

What is BEA strategy for implementating EJB 3.0?

The answer supplied was tip lipped, because BEA did not want to reveal its hand.

What exactly is the WebLogic Console for Tomcat?

This answer came more fluently. BEA will supply three JAR files on the Dev2Dev in a few weeks that should place in the [BEA_HOME]/weblogic900/server/lib folder. Restarting WLS will allow Diablo to connect and manage external Tomcat Servers. Follow the instructions and reference that will be uploaded soon.

BEA Weblogic Portal Roadmap 9.0 : Alex Toussaint , BEA

The key enhancements. The goal of federation is to allow use of existing assets. Enables re-use in other applications, without having to redeploy. The ability to federate a new service as portlet. JSF Support

Eclipse WebTool Projects: Naci Dai of Eteration

Open Standards & Open Source

Deliver vendor neutral tools and APIs for web applications on the Eclipse platform. The idea is also provide a tool platform so that vendors like BEA can build a Workshop.

Eteration's Eclipse involvement began with the Lomboz Project with public committemtn since 2003. The original Lomboz had over 1 millions downloads. Lomboz evolves to the web tools project, because of the large and growing ecosystem that involved Actuate, Oracle, Windoriver, Sybase, Ibm, Borland, HP, BEA and also Eclipse Foundation.

The adoption of WTP is not just based on software quality but because the software is open and planned acceptance of contribution.

Depth and Breadth of Eclipse. 95 Corporate members , over 800 thid party plugins, and over 30 million downloads in 2004 alone. The stats are frighteningly good. Eclipse is not only just one project, but at least six, all of this is open source.

WTP builds on top of the Java Development Tooling, part of the Eclipse SDK. ISV tool build on top of WTP. WTP hopes to consolidate a loose area of tooling development.

The major WTP themes (0.7 release) are to extend Eclipse into J2EE Web Application development Define application servers, runtimes, and J2EE modules and web containers. WTP provides platform API and suitable models for tool developers. It is very hard process because of backward compatibility, on the one hand to keep the old tools from breaking is good, but new APIs are often required that deprecate the original. Provide core tools for application developers, which are high quality tools in their own rights. The secret is that WTP provides a core runtime environment.

Structured Source Editor Framework

Light weight framework for content handling that allows support of different editor types in the same window.

Typically with the application server deployment WTP allows you to perform the following:

Server Framework (Provisional) API

The server framework provides a handy WSDL Editor. More importantly there is powerful Web Services Explorer with UDDI publish and query capabilities. Additionally it is now possible to step-debug through JSP with WTP

Demo began with the Web Services Explorer to search a remote UDDI registry (XMethods), looking for the QuoteService. The service was add to WSDL page. You can examine to the SOAP request nad response envolopes. The wsdl was imported into the WTP project. The graphical view is really impressive to see what kind of input and output parameters. It is neat graphical editor.

WTP features Code snippets that are time savers, and of course context sensitive help is available in JSP. The WTP looks very much a great addition to the Eclipse SDK. The simply clicking on "Run on Server" almost make the process foolproof. Worth checking out.

Struts, Pageflows and Controls : Eddie O'Neil

Workshop started as a IDE but is evolving application web assembler. Surf to for more information. Beehive is really metadata-driven, provides an ease-of-use enterprise application framework. It based on the older WebLogic Workshop 8 runtime technology that has been enhanced significantly in open source. Recently Beehive in September 2005 went to 1.0 release.

In a nutshell ease of use framework with three components:

Everything driven by metadata driven JSR 175 (a.k.a Java 5 annotations), ease-of-use, and tool friendly. (Therefore you need to invest or port your existing applications to Java 5, which no investment bank with mission critical enterprise Java codebase is going to do too soon.)

The Beehive Runtime packagings is a set independent JARs. The NetUI side depends on Servlet 2.4; optionally on JSP 2.x and JSF. In other words you cannot run Beehive applications on any thing earlier than Diablo (WLS 9.0). Controls core has no dependencies on EJB any more. In the past Controls performed a lot of backing bean equivalent processing with EJB 2.x entity and session beans, this is no longer the case. System Controls depends on JEE resource APIs.

You need to build with ANT build infrastructure, becauses Ant 1.6 support . Runtime will run on WebLogic, Tomcat, Geronimo and Axis. Beehive is independent of tools, Eclipse, IDEA, Emacs. Runtime enhanced with additonally inside WLS. The speaker did not mention any support for Maven development, your editor assumes that it did not exist at the time of writing(!).

Apache Beehive heavily depends on annotation processing. APT is a superset of javac and provides hooks for custom code to process Java 5 annotation and produce outputs. In fact remove javac and replace it with apt. That is a cool idea.

Annotations denote the type of a file - @Jpf.Controller(). The Beehive runtime hosts page flow annotation processor and turns in Struts action. The processor creates a .class file and .xml file. So to develop with Beehive you call Ant to execute page flow annotation processor.

Controls are POJOs running in a lightweight component framework. Fundamentals is that the framework manages context lifecycle, resource management, event support, inversion-of-control / declarative instantiation, composition, pluggable configuration, and assembly.

Controls run inside of a Control Container obviously. They also provides contextual services runtime support. Implemented for page flow, web services, servlet filter in order to support JSPs, and also being invoke inside a JUnit test.

CustomerDB db = java.beans.Beans.instantiate( classLoader, "" );
Available since JDK 1.1 Glasgow project. Wow!

Beehive provides SystemControls which operate on JEE Resources, JDBC, EJB, JMS and web services. For example JDBC access from the ResultSet has been ramp so that you can access the ResultSet returned in the web-tier.

Beehive provides web services through meta data that sits on top of Apache Axis.

NetUI is the Beehive MVC framework based on Apache Struts, supports Struts 1.1 and Struts 1.2. Adds significant features atop Struts for higher level webapp development

MVC traditional programming has been split into page flow controllers, you write Beehive with conversations, in other word dialogues.

NetUI are single threaded, stateful flow controllers. Two actions in the same page flow will not run concurrently.

Nesting is a type sub-flow that can encapsulate a reusable dialog.

Declarative validation

Page Flow inheritance

Shared Flow replacecs a collection of actions shared across flows. Shared actions among many flow which make it more WebLogic Portal friendly. Shared Flow also supports Tiles.


Page flow are translated into equivalent Struts Action output / page input, and any JavaBean can be an action form bean.

Integration with other technologies

Struts Ti: The idea of an page flow is already part of the Strut Ti. The Jakarta Velocity will be supported by Beehive as a compatible view technology Beehive will also support JSF support as view technology via MyFaces, and of courses there will be more support for Spring Bean development.

Edward O'Neil was the speaker for this session.

This is Peter Pilgrim, live at the BEAWorld 2005 conference. Out

( Oct 13 2005, 01:09:49 AM BST ) Permalink Comments [0]

20051003 Monday October 03, 2005

A Blueprint Is Nothing Without Soul

Dear Reader

The skill writing a design and a schmematic is a fantastic talent to have at one's disposal.

This is a start of a new adventure, or a RESTART of an old adventure, your editor is forcing himself to wrote a critical essay every Friday. It is propitiation of a loved television program shown on the BBC in the United Kingdom, the infamous "That week that was".

Your editor will pontificate about an amusing problem, or troublesome tirade, or teething ill on some miscreant form of malware. Best of all he will wing it from the skin of his teeth, cutting deep welts into steel with his bare literature pen, just like the amateur hope-to-be writer he tries to purport to be. (Self gratification following by admonishment, self-abasement simultaneously at regularly intervals during one's lifetime is really a good thing for self improvement.)

So this edition is about structure. The structure of life and our world-wide surroundings is perhaps the way to look at writing complex software. Indeed design patterns were inspired and influenced by deep thoughts roaming over ways of building brick-and-mortar architecture. In analogy the architecture of software over the past fifty years has a black fossilised seams of coal running back over to that first important computer, Collossus (circa World War II) or Enigma (infamous encryption messaging machine).

In reality we have always designed a "blueprint". The skill writing a design and a schmematic is a fantastic talent to have at one's disposal. Indeed, I hazard to exclaim, it is sought after. If it is not, then it should be.

Those of you who have visited the silver screen or hired the DVD media, would have seen "The Aviator" and its depiction of Howard Hughes played by Leonardo di Caprio. Hughes if you believe the plotline of the screenplay is a fantastic aviator, for sure, but was expertly savvy to know a thing or two about avionic blueprints. Indeed Hughes was pioneer to both cinematic motion picture art and aviation. His mastery of two fields eventually helped to launch the space race and was a part of foundation of the NASA organisation today. The wonderful mood of the film that most intrigued your editor was his appreciation of design issue, especially in his quest to develop the fastest sleekest monoplane in the 1930 he push the engineer to file away the rivet heads on the airframe. He appreciated the physics of Bernoulli et al on air flows and turbence (not that your editor is expert or knowledgeable on the latter).

Hughes' appreciation of the technical aspects of his twin careers provides a modern day warning for software engineers ; in fact any type of design engineer. Unfortunately he suffered from the compulsive disorder; the illness affected his ability to understad that cleaniless is truly ideal condition. No design is or can be ever perfect.

This is the crux of your editor's edition is that people may well design blueprint but a blueprint is nothing without a reason. It is naked as a hapless new-born baby with a reason to live. A blueprint is just a document. It is projection of the soul so that we humans can communicate the ideas with each other. A blueprint has got soul. Full stop. Your application that you write has your efforts and your collective souls.

This is your editor, Peter Pilgim, just winging this Friday. Out.

( Oct 03 2005, 10:19:40 AM BST ) Permalink Comments [0]