Since I added the Startup model we now have 4 different uses of the
J2SE ServiceProvider code.

Basically we've replicated the same code in 4 places.

MediatorFactoryFinder
MediatorSerializerFinder
ConfigurationFactoryAndSerializerFinder
StartupFinder.

I've made one optimization. With mediators we have the duplicated code
to find both the Factory and the Serializer, whereas with the
Configuration and Startup code I do basically have the Factory point
to the Serializer:

Class Factory.getSerializerClass() {
   return QuartzStartupSerializer.class;
}

Since there is always a pair this means you can just look one up using
the J2SE mechanism and get the other one from the factory. It seems
simpler, and if no-one has any objections, I'll refactor the
MediatorSerializers that way too.

However, I'm also wondering if there is a way we can simplify all
these examples into one. Obviously if we had Java1.5 we could use
Generics for this, but we dont!

Any ideas?

Paul

-- 
Paul Fremantle
Co-Founder and VP of Technical Sales, WSO2
OASIS WS-RX TC Co-chair

blog: http://pzf.fremantle.org
[EMAIL PROTECTED]

"Oxygenating the Web Service Platform", www.wso2.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to