Author: indika Date: Wed Jul 1 00:36:16 2009 New Revision: 40478 URL: http://wso2.org/svn/browse/wso2?view=rev&revision=40478
Log: spring mediator doc update Modified: trunk/esb/java/docs/xdoc/mediators/spring.xml Modified: trunk/esb/java/docs/xdoc/mediators/spring.xml URL: http://wso2.org/svn/browse/wso2/trunk/esb/java/docs/xdoc/mediators/spring.xml?rev=40478&r1=40477&r2=40478&view=diff ============================================================================== --- trunk/esb/java/docs/xdoc/mediators/spring.xml (original) +++ trunk/esb/java/docs/xdoc/mediators/spring.xml Wed Jul 1 00:36:16 2009 @@ -1,58 +1,73 @@ -<?xml version="1.0" encoding="utf-8"?> +<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> - <head> - <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> - <title>WSO2 ESB - Spring Mediator </title> - <link href="css/esb-docs.css" rel="stylesheet" /> - <link href="styles/dist-docs.css" rel="stylesheet" type="text/css" - media="all" /> - </head> - <body> - <h2>Spring Mediator</h2> - <p> - The spring mediator creates an instance of a mediator, which is - managed by Spring. This Spring bean must implement the Mediator interface for - it to act as a Mediator. The key will reference the Spring - ApplicationContext/Configuration used for the bean - </p> - <h3>Syntax</h3> - <pre xml:space="preserve"> <spring:spring bean="exampleBean1" key="string"/></pre> - <h4>Spring Configuration </h4> - - <p> - A Spring configuration could be created as a localEntry or remote registry - entry providing a URL or a key reference to a Registry. The configuration is - then created on first use or as necessary (as per registry lookup semantics) by - the mediators which reference this configuration. - </p> - - <pre xml:space="preserve"> <localEntry key="string"/> - <localEntry key="string" src="url"/></pre> - - <p> - The name attribute specifies a unique name for the configuration, and the - src, key or inlined XML references to the Spring configuration - </p> - <h3>UI Configuration</h3> - <p> - <img alt="" src="../spring-mediator/docs/images/spring-mediator-screenshot.jpg"/> - </p> - <p> - <strong>Figure1: Spring Mediator</strong> - </p> - - - <ul> - <li> - Bean: The name of the bean - </li> - <li> - Key: The registry reference to the spring Application-Context/Configuration used for the bean. You can select it by clicking - the "Registry Keys". - </li> - </ul> - - </body> -</html> \ No newline at end of file +<head> + <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> + <title>WSO2 ESB - Spring Mediator </title> + <link href="css/esb-docs.css" rel="stylesheet" /> + <link href="styles/dist-docs.css" rel="stylesheet" type="text/css" + media="all" /> +</head> + +<body> +<h2>Spring Mediator</h2> + +<p>The Spring mediator exposes a spring bean as a mediator. The spring mediator +creates an instance of a mediator, which is managed by Spring. This Spring bean +must implement the Mediator interface for it to act as a Mediator. </p> + +<h3>Syntax</h3> +<pre xml:space="preserve"> <spring:spring bean="exampleBean" key="string"/> </pre> + +<p></p> + +<p>The <strong>key</strong> will reference the Spring +ApplicationContext/Configuration (i.e. spring configuration XML) used for the +bean. This <strong>key</strong> can be a registry key or local entry key. The +<strong>bean</strong> attribute is used for looking up a Spring bean from the +spring Application Context. Therefore, a bean with same name must be in the +given spring configuration. In additions, that bean must implement the Mediator +interface. </p> + +<p></p> + +<h3>UI Configuration</h3> + +<p><img alt="" +src="../spring-mediator/docs/images/spring-mediator-screenshot.jpg" /> </p> + +<p><strong>Figure1: Spring Mediator</strong> </p> +<ul> + <li>Bean: The name of the bean </li> + <li>Key: The registry reference to the spring + Application-Context/Configuration used for the bean. You can select it by + clicking the "Registry Keys". <br /> + </li> +</ul> + +<h3>Example</h3> + +<p></p> +<ol> + <li><pre><spring:spring bean="<strong>springtest</strong>" key="conf/sample/resources/spring/springsample.xml"/> + </pre> + <p>In the above configuration, spring XML is in the registry and it can be + looked up using the registry key + <strong>conf/sample/resources/spring/springsample.xml</strong> . This + spring XML (i.e springsample.xml) must contain a bean with the name + <strong>springtest</strong>. The following figure shows an example can be + used as the registry resource - <strong>springsample.xml</strong>. </p> + <p></p> + <pre><!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> +<beans> + <bean id="<strong>springtest</strong>" class="org.apache.synapse.mediators.spring.SpringTestBean" singleton="false"> + <property name="testProperty" value="100"/> + </bean> +</beans></pre> + </li> +</ol> + +<p></p> +</body> +</html> _______________________________________________ Esb-java-dev mailing list [email protected] https://wso2.org/cgi-bin/mailman/listinfo/esb-java-dev
