synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Charith Wickramarachchi <charith.dhanus...@gmail.com>
Subject Make enable Synapse to configure in others ways
Date Fri, 20 Feb 2009 03:48:10 GMT
Hi devs,

In order to be able to configure synapse in other ways than the XML
configuration language, I have abstracted out the initialization into a
one level higher layer where you can specify the mechanism by which you
 want to load the configuration. This will not affect the usual synapse
initialization flow, but is just an abstraction layer.

 With this users will be able to plug their own Synapse Configuration and
ConfigurationContext with out touching the synapse code base.

 Following is a brief  description of this improvement and if this is OK
 to be committed into synapse I will attach the patch for further reviews.

* org.apache.synapse.ConfigurationBuilder
 *
 This is the abstraction layer added to Synapse for it to be able to
 extend or rather use new Configuration mechanism (DSL) than using the
 default Synapse Configuration Language. With this improvement users can
 use other Configurations by enabling the ConfigurationBuilder.

 Eg: ConfigurationBuilder cbuilder=ConfigurationBuilder.getInstence();
 cbuilder.setEnable(true);
 (this is done in users code not in synapse codebase)

 Then users must set the Builder Class in the ConfigurationBuilder.(This
 must be the fully qualified name of the Builder Class that users use to
 build the Configuration) And then users can set parameters needed to the
 build the configuration. The only restriction that Builder Class (the
 third party class that used to build the configuration) have is its
 configuration builder method must have the name
 "createSynapseConfiguration".

 The Configuration Builder class will find the appropriate method form
 the Builder class using the class name and the parameter list and then
 it will build the Synapse configuration.The advantage of using this
 abstraction layer is Synapse ServerManager does not depend on the third
 party Synapse configuration builders.

 *org.apache.synapse.ConfigurationContextBuilder*

This is the abstraction layer added to the Synapse project to Start
Axis2 and Synapse using a Different application context this works as
same as the ConfigurationBuilder described above. Users who wants to
extent synapse to Start using a different application context can use this.
Here the restriction that is given to the Builder class is it must have
the method "createConfigurationContext" to Create configuration
context.The ConfigurationContextBuilder will locate the correct method
and build the Configuration Context to start the Axis2 and Synapse in
that context.

thank you,
Charith Dhanushka Wickramarachchi
http://charithwiki.blogspot.com/

Mime
View raw message