Author: asankha Date: Thu Jun 5 04:40:47 2008 New Revision: 18010 URL: http://wso2.org/svn/browse/wso2?view=rev&revision=18010
Log: update doc and set line sending Modified: branches/esb/java/1.7/esb/java/modules/distribution/src/main/conf/sample-server-wrapper.conf (props changed) branches/esb/java/1.7/esb/java/modules/distribution/src/main/conf/wrapper.conf (contents, props changed) branches/esb/java/1.7/esb/java/src/site/xdoc/ESB_Samples.xml Modified: branches/esb/java/1.7/esb/java/modules/distribution/src/main/conf/wrapper.conf URL: http://wso2.org/svn/browse/wso2/branches/esb/java/1.7/esb/java/modules/distribution/src/main/conf/wrapper.conf?rev=18010&r1=18009&r2=18010&view=diff ============================================================================== --- branches/esb/java/1.7/esb/java/modules/distribution/src/main/conf/wrapper.conf (original) +++ branches/esb/java/1.7/esb/java/modules/distribution/src/main/conf/wrapper.conf Thu Jun 5 04:40:47 2008 @@ -1,115 +1,115 @@ -#******************************************************************** -# Wrapper Properties -#******************************************************************** -# Java Application -wrapper.java.command=java - -# set the working directory to the ESB_HOME -wrapper.working.dir=../.. - -# Java Main class. This class must implement the WrapperListener interface -# or guarantee that the WrapperManager class is initialized. Helper -# classes are provided to do this for you. See the Integration section -# of the documentation for details. -wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp - -# Java Classpath (include wrapper.jar) Add class path elements as -# needed starting from 1 -wrapper.java.classpath.1=%CLASSPATH% -wrapper.java.classpath.2=webapp/WEB-INF/lib/wrapper-3.2.3.jar -wrapper.java.classpath.3=tomcat/conf -wrapper.java.classpath.4=tomcat/lib -wrapper.java.classpath.5=tomcat/lib/*.jar -wrapper.java.classpath.6=webapp/WEB-INF/lib/patches -wrapper.java.classpath.7=webapp/WEB-INF/lib/patches/*.jar -wrapper.java.classpath.8=webapp/WEB-INF/lib/extensions -wrapper.java.classpath.9=webapp/WEB-INF/lib/extensions/*.jar -wrapper.java.classpath.10=webapp/WEB-INF/classes/conf -wrapper.java.classpath.11=webapp/WEB-INF/lib -wrapper.java.classpath.12=webapp/WEB-INF/lib/*.jar - -# Java Library Path (location of Wrapper.DLL or libwrapper.so) -wrapper.java.library.path.1=tomcat/lib - -# Java Additional Parameters -wrapper.java.additional.1=-Djava.endorsed.dirs=webapp/WEB-INF/lib/endorsed -wrapper.java.additional.2=-Dorg.apache.xerces.xni.parser.XMLParserConfiguration=org.apache.xerces.parsers.XMLGrammarCachingConfiguration -wrapper.java.additional.3=-Djava.io.tmpdir=work/temp/esb -wrapper.java.additional.4=-Dcom.sun.management.jmxremote -wrapper.java.additional.5= # leave blank - used to run samples in Windows -wrapper.java.additional.6= # e.g. -DserverName=localhost -# ----- Uncoment this to enable SSL debug options ----------- -#wrapper.java,additional.7=-Djavax.net.debug=all - -# Initial Java Heap Size (in MB) - compute according to system -wrapper.java.initmemory=128 - -# Maximum Java Heap Size (in MB) - compute according to system -wrapper.java.maxmemory=128 - -# Application parameters. Add parameters as needed starting from 1 -wrapper.app.parameter.1=org.wso2.esb.ServiceBus - -#******************************************************************** -# Wrapper Logging Properties -#******************************************************************** -# Format of output for the console. (See docs for formats) -wrapper.console.format=M - -# Log Level for console output. (See docs for log levels) -wrapper.console.loglevel=INFO - -# Log file to use for wrapper output logging. -wrapper.logfile=logs/wso2-esb-process.log - -# Format of output for the log file. (See docs for formats) -wrapper.logfile.format=M - -# Log Level for log file output. (See docs for log levels) -wrapper.logfile.loglevel=INFO - -# Maximum size that the log file will be allowed to grow to before -# the log is rolled. Size is specified in bytes. The default value -# of 0, disables log rolling. May abbreviate with the 'k' (kb) or -# 'm' (mb) suffix. For example: 10m = 10 megabytes. -wrapper.logfile.maxsize=5m - -# Maximum number of rolled log files which will be allowed before old -# files are deleted. The default value of 0 implies no limit. -wrapper.logfile.maxfiles=5 - -# Log Level for sys/event log output. (See docs for log levels) -wrapper.syslog.loglevel=NONE - -#******************************************************************** -# Wrapper Windows Properties -#******************************************************************** -# Title to use when running as a console -wrapper.console.title=WSO2 Enterprise Service Bus (ESB) - -#******************************************************************** -# Wrapper Windows NT/2000/XP Service Properties -#******************************************************************** -# WARNING - Do not modify any of these properties when an application -# using this configuration file has been installed as a service. -# Please uninstall the service before modifying this section. The -# service can then be reinstalled. - -# Name of the service -wrapper.ntservice.name=WSO2ESB - -# Display name of the service -wrapper.ntservice.displayname=WSO2 Enterprise Service Bus (ESB) - -# Description of the service -wrapper.ntservice.description=WSO2 Enterprise Service Bus (ESB) - -# Service dependencies. Add dependencies as needed starting from 1 -wrapper.ntservice.dependency.1= - -# Mode in which the service is installed. AUTO_START or DEMAND_START -wrapper.ntservice.starttype=AUTO_START - -# Allow the service to interact with the desktop. -wrapper.ntservice.interactive=false - +#******************************************************************** +# Wrapper Properties +#******************************************************************** +# Java Application +wrapper.java.command=java + +# set the working directory to the ESB_HOME +wrapper.working.dir=../.. + +# Java Main class. This class must implement the WrapperListener interface +# or guarantee that the WrapperManager class is initialized. Helper +# classes are provided to do this for you. See the Integration section +# of the documentation for details. +wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp + +# Java Classpath (include wrapper.jar) Add class path elements as +# needed starting from 1 +wrapper.java.classpath.1=%CLASSPATH% +wrapper.java.classpath.2=webapp/WEB-INF/lib/wrapper-3.2.3.jar +wrapper.java.classpath.3=tomcat/conf +wrapper.java.classpath.4=tomcat/lib +wrapper.java.classpath.5=tomcat/lib/*.jar +wrapper.java.classpath.6=webapp/WEB-INF/lib/patches +wrapper.java.classpath.7=webapp/WEB-INF/lib/patches/*.jar +wrapper.java.classpath.8=webapp/WEB-INF/lib/extensions +wrapper.java.classpath.9=webapp/WEB-INF/lib/extensions/*.jar +wrapper.java.classpath.10=webapp/WEB-INF/classes/conf +wrapper.java.classpath.11=webapp/WEB-INF/lib +wrapper.java.classpath.12=webapp/WEB-INF/lib/*.jar + +# Java Library Path (location of Wrapper.DLL or libwrapper.so) +wrapper.java.library.path.1=tomcat/lib + +# Java Additional Parameters +wrapper.java.additional.1=-Djava.endorsed.dirs=webapp/WEB-INF/lib/endorsed +wrapper.java.additional.2=-Dorg.apache.xerces.xni.parser.XMLParserConfiguration=org.apache.xerces.parsers.XMLGrammarCachingConfiguration +wrapper.java.additional.3=-Djava.io.tmpdir=work/temp/esb +wrapper.java.additional.4=-Dcom.sun.management.jmxremote +wrapper.java.additional.5= # leave blank - used to run samples in Windows +wrapper.java.additional.6= # e.g. -DserverName=localhost +# ----- Uncoment this to enable SSL debug options ----------- +#wrapper.java,additional.7=-Djavax.net.debug=all + +# Initial Java Heap Size (in MB) - compute according to system +wrapper.java.initmemory=128 + +# Maximum Java Heap Size (in MB) - compute according to system +wrapper.java.maxmemory=128 + +# Application parameters. Add parameters as needed starting from 1 +wrapper.app.parameter.1=org.wso2.esb.ServiceBus + +#******************************************************************** +# Wrapper Logging Properties +#******************************************************************** +# Format of output for the console. (See docs for formats) +wrapper.console.format=M + +# Log Level for console output. (See docs for log levels) +wrapper.console.loglevel=INFO + +# Log file to use for wrapper output logging. +wrapper.logfile=logs/wso2-esb-process.log + +# Format of output for the log file. (See docs for formats) +wrapper.logfile.format=M + +# Log Level for log file output. (See docs for log levels) +wrapper.logfile.loglevel=INFO + +# Maximum size that the log file will be allowed to grow to before +# the log is rolled. Size is specified in bytes. The default value +# of 0, disables log rolling. May abbreviate with the 'k' (kb) or +# 'm' (mb) suffix. For example: 10m = 10 megabytes. +wrapper.logfile.maxsize=5m + +# Maximum number of rolled log files which will be allowed before old +# files are deleted. The default value of 0 implies no limit. +wrapper.logfile.maxfiles=5 + +# Log Level for sys/event log output. (See docs for log levels) +wrapper.syslog.loglevel=NONE + +#******************************************************************** +# Wrapper Windows Properties +#******************************************************************** +# Title to use when running as a console +wrapper.console.title=WSO2 Enterprise Service Bus (ESB) + +#******************************************************************** +# Wrapper Windows NT/2000/XP Service Properties +#******************************************************************** +# WARNING - Do not modify any of these properties when an application +# using this configuration file has been installed as a service. +# Please uninstall the service before modifying this section. The +# service can then be reinstalled. + +# Name of the service +wrapper.ntservice.name=WSO2ESB + +# Display name of the service +wrapper.ntservice.displayname=WSO2 Enterprise Service Bus (ESB) + +# Description of the service +wrapper.ntservice.description=WSO2 Enterprise Service Bus (ESB) + +# Service dependencies. Add dependencies as needed starting from 1 +wrapper.ntservice.dependency.1= + +# Mode in which the service is installed. AUTO_START or DEMAND_START +wrapper.ntservice.starttype=AUTO_START + +# Allow the service to interact with the desktop. +wrapper.ntservice.interactive=false + Modified: branches/esb/java/1.7/esb/java/src/site/xdoc/ESB_Samples.xml URL: http://wso2.org/svn/browse/wso2/branches/esb/java/1.7/esb/java/src/site/xdoc/ESB_Samples.xml?rev=18010&r1=18009&r2=18010&view=diff ============================================================================== --- branches/esb/java/1.7/esb/java/src/site/xdoc/ESB_Samples.xml (original) +++ branches/esb/java/1.7/esb/java/src/site/xdoc/ESB_Samples.xml Thu Jun 5 04:40:47 2008 @@ -74,6 +74,7 @@ and sharing a configuration between multiple instances</a> </li> <li><a href="#Sample12">Sample 12: One way messaging / fireAndForget through ESB</a> </li> + <li><a href="#Sample13">Sample 13: Dual channel invocation through synapse</a></li> </ul> </li> <li><a href="#Endpoints">Advanced mediations with endpoints</a> @@ -113,6 +114,8 @@ proxy service without processing the security headers</a> </li> <li><a href="#Sample154">Sample 154: Load Balancing with Proxy Service</a> </li> + <li><a href="#Sample155">Sample 155: Dual channel invocation + on both client side and server side of synapse with Proxy Services</a></li> </ul> </li> <li><a href="#ProxyServiceQoS">QoS addition and deduction for service @@ -140,6 +143,8 @@ listener to mail transport sender</a> </li> <li><a href="#Sample256">Sample 256: Proxy services with the mail transport</a> </li> + <li><a href="#Sample257">Sample 257: Proxy services with the FIX transport</a></li> + <li><a href="#Sample258">Sample 258: Switching from HTTP to FIX</a></li> </ul> </li> <li><a href="#Task">Introduction to ESB tasks</a> @@ -439,7 +444,7 @@ Execute the 'ant stockquote ..' request again, and following through the mediation logs you will now notice that the sequence named "main" is executed. Then for the incoming message flow the <in> mediator -executes, and it calls into the sequence named "stockquote". </p> +executes, and it calls the sequence named "stockquote". </p> <pre xml:space="preserve">ant stockquote -Daddurl=http://localhost:9000/soap/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/</pre> <pre xml:space="preserve">DEBUG SequenceMediator - Sequence mediator <main> :: mediate()<br />DEBUG InMediator - In mediator mediate()<br />DEBUG SequenceMediator - Sequence mediator <stockquote> :: mediate()</pre> @@ -711,7 +716,7 @@ fault back with the message 'Invalid custom quote request' as the schema validation failed. This is because the schema used in the example expects a slightly different message than what is created by the stock quote client. -(i.e. expects a 'stocksymbol' element instead of 'symbol' to specify thestock +(i.e. expects a 'stocksymbol' element instead of 'symbol' to specify the stock symbol) </p> <pre xml:space="preserve">ant stockquote -Daddurl=http://localhost:9000/soap/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/</pre> @@ -751,11 +756,11 @@ done </p> <p>This example uses the XSLT mediator to perform transformations, and the -xslt tranformations are specified as registry resources. The first resource +xslt transformations are specified as registry resources. The first resource 'xslt-key-req' is specified as a 'local' registry entry. Local entries do not place the resource on the registry, but simply make it available to the local configuration. If a local entry is defined with a key that already exists in -the remote registry, the local entry will have higher preference and override +the remote registry, the local entry will get higher preference and override the remote resource. </p> <p>In this example you will notice the new 'registry' definition. ESB comes @@ -985,6 +990,47 @@ SimpleStockQuoteService replies to ESB with a HTTP 202 reply, and that ESB in-turn replies to the client with a HTTP 202 acknowledgement </p> + <h2> + <a name="Sample13" id="Sample13">Sample 13: Dual channel invocation through synapse</a> + </h2> + <p> + <strong>Objective: Demonstrate dual channel messaging + through synapse</strong> + </p> + <p> + <strong>Prerequisites:</strong><br/> Start the Axis2 server + and deploy the SimpleStockQuoteService (Refer steps above)<br/> Start + the Synapse configuration numbered 0: i.e. synapse -sample 0 + </p> + <p> + This example invokes the same 'getQuote' operation on the + SimpleStockQuoteService using the custom client which uses the Axis2 + ServiceClient API with useSeparateListener set to true so that the response is + coming through a different channel than the one which is used to send the request + to a callback defined in the client. + To test this, use 'ant + -Dmode=dualquote...' and you will notice the dual channel invocation + through Synapse into the sample Axis2 server instance, which reports the response + back to the client over a different channel: + </p> +<pre xml:space="preserve">ant stockquote -Daddurl=http://localhost:9000/soap/SimpleStockQuoteService -Dtrpurl=http://localhost:8280/ -Dmode=dualquote</pre> +<pre xml:space="preserve">Response received to the callback +Standard dual channel :: Stock price = $57.16686934968289</pre> + <p> + If you send your client request through TCPmon, you will notice that + Synapse replies to the client with a HTTP 202 acknowledgment when you send the request and + the communication between synapse and the server happens on a single channel and then you + get the response back from synapse to the clients callback in a different channel (which + cannot be observed through TCPmon) + </p> + <p> + Also you could see the wsa:Reply-To header being something like + http://localhost:8200/axis2/soap/anonService2 which implies that the reply + is being on a different channel listening on the port 8200. Please note that it is + required to engage addressing when using the dual channel invocation because it + requires the wsa:Reply-To header. + </p> + <h1><a id="Endpoints">Advanced mediations with endpoints</a> </h1> <h2><a id="Sample50">Sample 50: POX to SOAP conversion</a> </h2> @@ -1210,7 +1256,7 @@ </definitions></pre> -<p><strong>Objective: Demonstrate the simple load balancing among set of +<p><strong>Objective: Demonstrate the simple load balancing among a set of endpoints</strong> </p> <p><strong>Prerequisites:</strong> </p> @@ -1264,7 +1310,7 @@ [java] Request: 67 ==> Response from server: MyServer3 ...</pre> -<p>Now restart MyServer1. You can observe that requets will be again sent to +<p>Now restart MyServer1. You can observe that requests will be again sent to all three servers roughly after 60 seconds. This is because we have specified <suspendDurationOnFailure> as 60 seconds in the configuration. Therefore, load balance endpoint will suspend any failed child endpoint only @@ -1438,7 +1484,7 @@ <p>Above configuration is same as the load balancing configuration in sample 52, except that the session type is specified as "simpleClientSession". This is a client initiated session, which means that the client generates the -session identifier and send it to with each request. In this sample session +session identifier and sends it to with each request. In this sample session type, client adds a SOAP header named ClientID containing the identifier of the client. ESB binds this ID with a server on the first request and sends all seccessive requests containing that ID to the same server. Now switch to @@ -1446,7 +1492,7 @@ to check this in action. </p> <pre xml:space="preserve">ant loadbalancefailover -Dmode=session</pre> -<p>In the session mode, client continuesly sends requests with three diferent +<p>In the session mode, client continuously sends requests with three diferent client (session) IDs. One ID is selected among these three IDs for each request randomly. Then client prints the session ID with the responded server for each request. Client output for the first 10 requests are shown below. @@ -1552,9 +1598,9 @@ endpoints of the load balance endpoint. Therefore sessions are bound to the failover endpoints. Session information has to be replicated among the servers listed under each failover endpoint using some clustering mechanism. -Therefore, if one endpoint bound to a session failed, successive requets for +Therefore, if one endpoint bound to a session failed, successive requests for that session will be directed to the next endpoint in that failover group. -Run the client using the following command to observe this behavoir. </p> +Run the client using the following command to observe this behaviour. </p> <pre xml:space="preserve">ant loadbalancefailover -Dmode=session</pre> <p>You can see a client output as shown below. </p> @@ -1574,7 +1620,7 @@ <p>Note that session 0 is always directed to MyServer1 and session 1 is directed to MyServer3. No requests are directed to MyServer2 and MyServer4 as they are kept as backups by failover endpoints. Now shutdown the server named -MyServer1 while running the sample. You will observer that all successive +MyServer1 while running the sample. You will observe that all successive requests for session 0 is now directed to MyServer2, which is the backup server for MyServer1's group. This is shown below, where MyServer1 was shutdown after the request 534. </p> @@ -1801,7 +1847,7 @@ sample client using the following command. </p> <pre xml:space="preserve">ant stockquote -Dsymbol=IBM -Dmode=quote -Daddurl=http://localhost:8280</pre> -<p>You can observer the client output displaying the quote price for IBM as +<p>You can observe the client output displaying the quote price for IBM as follows: </p> <pre xml:space="preserve">[java] Standard :: Stock price = $189.2521262517493</pre> @@ -2044,7 +2090,7 @@ </proxy> </definitions></pre> -<p><strong>Objective: Switching transports and from SOAP to REST/POX</strong> +<p><strong>Objective: Switching transports and message format from SOAP to REST/POX</strong> </p> <p><strong>Prerequisites:</strong><br /> @@ -2066,7 +2112,7 @@ <p></p> <p>Accessing this over https (ant stockquote --Dtrpurl=https://localhost:4433/soap/StockQuoteProxy) causes the proxy +-Dtrpurl=https://localhost:8243/soap/StockQuoteProxy) causes the proxy service to access the SimpleStockQuoteService on the sample Axis2 server using REST/POX. This could be seen if the message exchange was captured using TCPMon as follows. The REST/POX response is now transformed back into a SOAP @@ -2148,7 +2194,7 @@ <p></p> -<p>The proxy service will recieve secure messages with security headers which +<p>The proxy service will receive secure messages with security headers which are MustUnderstand. But hence element 'engageSec' is not present in the proxy configuration ESB will not engage that Apache Rampart on this proxy service. It is expected that an MustUnderstand failure exception on the AxisEngine @@ -2173,7 +2219,7 @@ because the message inside ESB is signed and encrypted and can only be forwarded to a secure service to be useful. </p> -<h2><a id="Sample154">Sample 154: Load Balancing with Proxy Service </a> </h2> +<h2><a id="Sample154">Sample 154: Load Balancing with Proxy Services </a> </h2> <div> <pre xml:space="preserve"> <!-- A proxy service with a loadbalace endpoint --> @@ -2246,6 +2292,60 @@ <p>Functionality is similar to the sample #54. </p> + <h2> + <a name="Sample155" id="Sample155">Sample 155: Dual channel invocation + on both client side and serverside of synapse with Proxy Services</a> + </h2> +<pre xml:space="preserve"><definitions xmlns="http://ws.apache.org/ns/synapse"> + <proxy name="StockQuoteProxy"> + <target> + <endpoint> + <address uri="http://localhost:9000/soap/SimpleStockQuoteService"> + <enableAddressing separateListener="true"/> + </address> + </endpoint> + <outSequence> + <send/> + </outSequence> + </target> + <publishWSDL uri="file:repository/conf/sample/resources/proxy/sample_proxy_1.wsdl"/> + </proxy> +</definitions></pre> + <p> + <strong>Objective: Demonstrate the dual channel invocation with Synapse proxy services</strong> + </p> + <p> + <strong>Prerequisites:</strong><br/> Start the Synapse + configuration numbered 150: i.e. synapse -sample 155<br/> Start the + Axis2 server and deploy the SimpleStockQuoteService if not already done + </p> + <p/> + <p> + This sample will show the action of the dual channel invocation within client and Synapse + as well as within synapse and the actual server. Note that if you want to enable dual + channel invocation you need to set the separateListener attribute to true of the + enableAddressing element of the endpoint. + </p> + <p> + Execute the stock quote client by requesting for a stock quote on a dual channel from the + proxy service as follows: + </p> +<pre xml:space="preserve">ant stockquote -Daddurl=http://localhost:8280/soap/StockQuoteProxy -Dmode=dualquote</pre> + <p> + In the above example, the request received is forwarded to the sample service + hosted on Axis2 and the endpoint specifies to enable addressing and do the invocation + over a dual channel. If you observe this message flow by using a TCPmon, you could see that + on the channel you send the request to synapse the response has been written as an + HTTP 202 Accepted, where as the real response from synapse will come over a different channel + which cannot be obsesrved unless you use tcpdump to dump all the TCP level messages. + </p> + <p> + At the same time you can observe the behaviour of the invocation between synapse and + the actual Axis2 service, where you can see a 202 Accepted message being delivered to synapse + as the response to the request. The actual response will be delivered to synapse over a + different channel. + </p> + <h1><a id="ProxyServiceQoS">QoS addition and deduction for service mediation (proxy) samples</a> </h1> @@ -2362,7 +2462,7 @@ <p>In this case, client sends WS-RM enabled request to ESB where ESB sends normal request to the server. This can be observed by examining the wire level messages between the client and ESB. These messages would be similar to -the wire level messages shown in sample 53. Each message would perform a +the wire level messages shown in sample 101. Each message would perform a similar function to the messages discussed in sample 53. </p> <p></p> @@ -2814,7 +2914,7 @@ values. Change transport.vfs.FileURI, transport.vfs.MoveAfterProcess, transport.vfs.MoveAfterFailure parameter values to the above in, original, original directories respectively. Change outSequence endpoint address uri to -out directory with the prefeix <em>vfs:</em>. Values you have to change are +out directory with the prefix <em>vfs:</em>. Values you have to change are marked with <!--CHANGE-->. </p> <p>Start the Synapse configuration numbered 254: i.e. wso2-esb -sample 254 @@ -2966,6 +3066,141 @@ <p>After a few seconds (e.g. 30s), you should receive a POX response in your email account with the stock quote reply. </p> + <h2> + <a id="Sample257">Sample 257: Proxy services with the + FIX transport </a> + </h2> +<pre xml:space="preserve"><!-- Using the FIX transport --> +<definitions xmlns="http://ws.apache.org/ns/synapse"> + <proxy name="FIXProxy" transports="fix"> + + <parameter name="transport.fix.AcceptorConfigURL">file:/home/synapse_user/fix-config/fix-synapse.cfg</parameter> + <parameter name="transport.fix.InitiatorConfigURL">file:/home/synapse_user/fix-config/synapse-sender.cfg</parameter> + <parameter name="transport.fix.AcceptorMessageStore">file</parameter> + <parameter name="transport.fix.InitiatorMessageStore">file</parameter> + + <target> + <endpoint> + <address uri="fix://localhost:19876?BeginString=FIX.4.0&amp;SenderCompID=SYNAPSE&amp;TargetCompID=EXEC"/> + </endpoint> + <inSequence> + <log level="full"/> + </inSequence> + <outSequence> + <log level="full"/> + <send/> + </outSequence> + </target> + </proxy> +</definitions> </pre> + <p> + <strong>Objective: Demonstrate the usage of the FIX (Financial Information eXchange) transport with proxy services</strong> + </p> + <p> + <strong>Prerequisites:</strong><br/> + You will need the two sample FIX applications that come with Quickfix/J + (Banzai and Executor). Configure the two applications to establish + sessions with Synapse. See <a href="ESB_Samples_Setup.html#fixsamplesconfig"> + Configuring Sample FIX Applications</a> + </p> + <p> + Start Banzai and Executor + </p> + <p> + Enable FIX transport in the Synapse axis2.xml. See <a + href="ESB_Samples_Setup.html#fixtransport">Setting up FIX transport + </a> + </p> + <p> + Configure Synapse for FIX samples. See <a href="ESB_Samples_Setup.html#fixsamples"> + Configuring Synapse for FIX Samples</a> + </p> + <p> + Open up the SYNAPSE_HOME/repository/conf/sample/synapse_sample_257.xml file + and make sure that transport.fix.AcceptorConfigURL property points to the + fix-synapse.cfg file you created. Also make sure that transport.fix. + InitiatorConfigURL property points to the synapse-sender.cfg file you + created. Once done you can start the Synapse configuration numbered 257: + i.e. synapse -sample 257. Note that Synapse creates a new FIX session with + Banzai at this point. + </p> + <p> + Send an order request from Banzai to Synapse. + </p> + <p> + Synapse will create a session with Executor and forward the order request. The + responses coming from the Executor will be sent back to Banzai. It will take a + couple of seconds for the responses to arrive for the first request since Synapse + has to establish a session with the Executor. But all the subsequent messages + will pass through almost instantaneously. + </p> + <h2> + <a id="Sample258">Sample 258: Switching from HTTP to FIX </a> + </h2> +<pre xml:space="preserve"> +<definitions xmlns="http://ws.apache.org/ns/synapse"> + <proxy name="FIXProxy"> + + <parameter name="transport.fix.InitiatorConfigURL">file:/home/synapse_user/fix-config/synapse-sender.cfg</parameter> + <parameter name="transport.fix.InitiatorMessageStore">file</parameter> + <parameter name="transport.fix.SendAllToInSequence">false</parameter> + + <target> + <endpoint> + <address uri="fix://localhost:19876?BeginString=FIX.4.0&amp;SenderCompID=SYNAPSE&amp;TargetCompID=EXEC"/> + </endpoint> + <inSequence> + <property name="transport.fix.ServiceName" value="FIXProxy" scope="axis2-client"/> + <log level="full"/> + </inSequence> + <outSequence> + <log level="full"/> + <send/> + </outSequence> + </target> + </proxy> +</definitions> </pre> + <p> + <strong>Objective: Demonstrate switching from HTTP to FIX</strong> + </p> + <p> + <strong>Prerequisites:</strong><br/> + You will need the Executor sample application that comes with Quickfix/J. + Configure Executor to establish a session with Synapse. See <a href= + "ESB_Samples_Setup.html#fixsamplesconfig">Configuring Sample FIX + Applications</a> + </p> + <p> + Start Executor. + </p> + <p> + Enable FIX transport sender in the Synapse axis2.xml. See <a + href="ESB_Samples_Setup.html#fixtransport">Setting up FIX transport + </a> + </p> + <p> + Configure Synapse for FIX samples. See <a href="ESB_Samples_Setup.html#fixsamples"> + Configuring Synapse for FIX Samples</a>. There is no need to create the fix-synapse.cfg + file for this sample. Having only the synapse-sender.cfg file is sufficient. + </p> + <p> + Go to the SYNAPSE_HOME/repository/conf/sample/synapse_sample_258.xml + file and make sure that transport.fix.InitiatorConfigURL property + points to the synapse-sender.cfg file you created. Once done you can + start the Synapse configuration numbered 258: i.e. synapse -sample 258 + </p> + <p> + Invoke the FIX Client as follows. This command sends a FIX message + embedded in a SOAP message over HTTP. + </p> + <pre>ant fixclient -Dsymbol=IBM -Dqty=5 -Dmode=buy -Daddurl=http://localhost:8280/soap/FIXProxy</pre> + <p> + Synapse will create a session with Executor and forward the order request. The + first response coming from the Executor will be sent back over HTTP. Executor + generally sends two responses for each incoming order request. But since the + response has to be forwarded over HTTP only one can be sent back to the client. + </p> + <h1><a id="Task">Introduction to ESB tasks</a> </h1> <h2><a id="Sample300">Sample 300: Introduction to tasks with simple @@ -3005,7 +3240,7 @@ You will need access to build the SimpleStockQuoteService as mentioned in the above and start the sample axis2 server before staring ESB. </p> -<p>When ever ESB gets started and initialized, this task will run +<p>When ever ESB gets started with this configuration (i.e. ./synapse.sh -sample 300), this task will run periodically in 5 second intervals. You could limit the number of times that you want to run this task by adding a count attribute with an integer as the value, if the count is not present as in this sample this task will run @@ -3014,7 +3249,7 @@ <p>One can write his own task class implementing the org.apache.synapse.startup.Task interface and implementing the execute method to do the task. For this particular sample we have used the MessageInjector -which just injects a message specified in to the ESB environment. </p> +which just injects a message specified into the ESB environment. </p> <h1><a id="AdvancedMediation">Advanced mediations with advanced mediators</a> </h1> @@ -3073,7 +3308,7 @@ } ]]></x></pre> -<p><strong>Objective: Introduction to script mediators</strong> </p> +<p><strong>Objective: Introduction to the script mediators</strong> </p> <p><strong>Prerequisites:</strong> </p> @@ -3422,7 +3657,7 @@ <p></p> -<p><strong>Objective:</strong> I<strong>ntroduction to the dblookup +<p><strong>Objective:Introduction to the dblookup mediator</strong> </p> <p><strong>Prerequisites:</strong> Setting up Derby database as explained @@ -3519,8 +3754,8 @@ </definitions></pre> <div> -<p><strong>Objective: I<strong>ntroduction to the dbreport -mediator</strong></strong> </p> +<p><strong>Objective: Introduction to the dbreport +mediator</strong> </p> <p><strong>Prerequisites:</strong> Setting up Derby database as above. </p> @@ -3882,8 +4117,8 @@ </sequence> </definitions></pre> -<p><b>Objective: Demonstrate the use of throttle mediator for concurrency -throttling </b> </p> +<p><strong>Objective: </strong>Demonstrate the use of throttle mediator for concurrency +throttling></p> <p><strong>Prerequisites:</strong> </p> @@ -3897,15 +4132,15 @@ <p>Above configuration specifies a throttle mediator inside the in mediator. Therefore, all request messages directed to the main sequence will be -subjected to throttling. Throttle mediator has policy, onAccept and onReject -tags at top level. Policy tag specifies the throttling policy to be applied -for messages. In this sample policy contains only component called +subjected to throttling. Throttle mediator has 'policy', 'onAccept' and +'onReject' tags at top level. The 'policy' tag specifies the throttling policy for +throttling messages. This sample policy only contains a component called "MaximumConcurrentAccess" .This indicates the maximum number of concurrent -request that may have passed through the ESB on a single unit of time. To -test concurrency throttling ,it is required to send concurrent request to -ESB. For ESB with above configuration ,if client send 20 request concurrently -,then approximately half of those will success. The client command is as -follows. </p> +requests that can pass through Synapse on a single +unit of time. To test concurrency throttling, it is required to send +concurrent requests to Synapse. If Synapse with above configuration, receives +20 requests concurrently from clients, then approximately half of those will +succeed while the others being throttled. The client command to try this is as follows.</p> <pre xml:space="preserve">ant stockquote -Dsymbol=IBM -Dmode=quote -Daddurl=http://localhost:8280/</pre> <p></p> @@ -4125,7 +4360,7 @@ <h2><a id="Class">Extending the mediation in java (Class Mediator)</a> </h2> <p>Class mediator can be used to write your own custom mediation in Java and -you have access to the SynapseMessageContext and all the Synapse API in +you have access to the SynapseMessageContext and to the full Synapse API in there. This is a useful extension mechanism within ESB to extend its functionality. This class can contain fields for which you can assign values at runtime through the configuration. </p> @@ -4398,8 +4633,8 @@ <p></p> -<p><b><strong>Objective: Demonstrate the use of XQuery mediator to import -external XML documents to the XQuery engine</strong></b> </p> +<p><strong>Objective: Demonstrate the use of XQuery mediator to import +external XML documents to the XQuery engine</strong></p> <p><strong>Prerequisites:</strong>Deploy the SimpleStockQuoteService in sample Axis2 server and start it on port 9000. </p> @@ -4451,9 +4686,9 @@ </proxy> </definitions></pre> -<p><b><strong>Objective: Demonstrate the use of Iterate mediator to split the +<p><strong>Objective: Demonstrate the use of Iterate mediator to split the messages in to parts and process them asynchronously and then aggregate the -responses coming in to ESB</strong></b> </p> +responses coming in to ESB</strong></p> <p><strong>Prerequisites:</strong>Deploy the SimpleStockQuoteService in sample Axis2 server and start it on port 9000. </p> @@ -4473,7 +4708,7 @@ <h2><a id="Cache">Caching the responses over the requests (Cache Mediator)</a> </h2> -<p>Cached mediator can be used to utilize the network bandwidth, to protect +<p>Cache mediator can be used to utilize the network bandwidth, to protect the backend service from being loaded with the same type of requests like browser refresh actions and also to speed up the execution of the web service. This mediator should be used with sence, because it is not @@ -4500,9 +4735,9 @@ </out> </definitions></pre> -<p><b><strong>Objective: Demonstrate the use of Cache mediator in order to +<p><strong>Objective: Demonstrate the use of Cache mediator in order to cache the response and use that cached response as the response for an -identical xml request</strong></b> </p> +identical xml request</strong></p> <p><strong>Prerequisites:</strong>Deploy the SimpleStockQuoteService in sample Axis2 server and start it on port 9000. </p> _______________________________________________ Esb-java-dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/esb-java-dev
