synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sami...@apache.org
Subject svn commit: r370764 - /incubator/synapse/trunk/java/xdocs/extension_processor_writing.html
Date Fri, 20 Jan 2006 09:22:48 GMT
Author: saminda
Date: Fri Jan 20 01:22:42 2006
New Revision: 370764

URL: http://svn.apache.org/viewcvs?rev=370764&view=rev
Log:
Updated xdocs 

Modified:
    incubator/synapse/trunk/java/xdocs/extension_processor_writing.html

Modified: incubator/synapse/trunk/java/xdocs/extension_processor_writing.html
URL: http://svn.apache.org/viewcvs/incubator/synapse/trunk/java/xdocs/extension_processor_writing.html?rev=370764&r1=370763&r2=370764&view=diff
==============================================================================
--- incubator/synapse/trunk/java/xdocs/extension_processor_writing.html (original)
+++ incubator/synapse/trunk/java/xdocs/extension_processor_writing.html Fri Jan 20 01:22:42
2006
@@ -176,7 +176,37 @@
 
 <p>Leaf Processors should extend from AbstractProcessor. So "Let there be
 Processors". But we are not quite there. We need to do one more
-configuration, Plunging the extension to the core. Go to the class -</p>
+configuration, Plunging the extension to the core. </p>
+<p><i>First Method:</i></p>
+
+<p>This is based on Service Provider funtionality that comes with JDK1.3 above. For
more
+information click <a href="http://java.sun.com/j2se/1.4.2/docs/guide/jar/jar.html#Service%20Provider"
target="_blank">here</a>
+</p>
+<ol>
+<li>Create a META-INF folder somewhere in your System</li>
+<li>Create services folder inside {META-INF/services}</li>
+<li>Create a text file with the QName of interface a.b.c.d.ProcessorConfigurator </li>
+<li>So you will have a text file in the this structure as META-INF/services/a.b.c.d.ProcessorConfigurator</li>
+<li>Inside the text file write the entry of the QName of implementation class of the
interface a.b.c.d.BarProcessorConfigurator </li>
+<li>Now create a Jar file using the structure. Make sure the class a.b.c.d.BarProcessorConfigurator
inside the Jar or in the classpaht and make sure that Jar is in your classpath when running
the Synapse server
+<p>JAR structure is as follows
+<pre>
+    META-INF
+           +-services
+                    +-a.b.c.d.ProcessorConfigurator {this is a text file, which has a QName
entry a.b.c.d.BarProcessorConfigurator }
+    a
+     +-b
+       +-c
+         +-d
+           +-BarProcessorConfigurator
+</pre>
+
+</p>
+</li>
+</ol>
+<p></p>
+<p><i>Second Method</i></p>
+<p>Go to the class</p>
 <pre>org.apache.synapse.xml.ProcessorConfiguratorFinder  </pre>
 
 <p> there one will find the following static variable. </p>
@@ -185,6 +215,7 @@
 <p>You have to fill it with your extensions as follows,</p>
 <pre>private static Class[] processorConfigurators = {..., FooProcessorConfigurator.class,BarProcessorConfigurator.class}
</pre>
 
+<p></p>
 <p>Now you have successfully plugged your processor into Synapse. Finally
 "Let there be Processors". </p>
 



---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-dev-help@ws.apache.org


Mime
View raw message