[jboss-cvs] JBossAS SVN: r90002 - in projects/service-binding/trunk/core/src: examples and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Jun 9 15:03:24 EDT 2009
Author: bstansberry at jboss.com
Date: 2009-06-09 15:03:24 -0400 (Tue, 09 Jun 2009)
New Revision: 90002
Added:
projects/service-binding/trunk/core/src/examples/
projects/service-binding/trunk/core/src/examples/simple-example-jboss-beans.xml
Log:
[JBAS-6802] Add an example
Added: projects/service-binding/trunk/core/src/examples/simple-example-jboss-beans.xml
===================================================================
--- projects/service-binding/trunk/core/src/examples/simple-example-jboss-beans.xml (rev 0)
+++ projects/service-binding/trunk/core/src/examples/simple-example-jboss-beans.xml 2009-06-09 19:03:24 UTC (rev 90002)
@@ -0,0 +1,155 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ Example JBoss Microcontainer deployment descriptor to deploy an instance
+ of the ServiceBindingManager along with a few sample bindings and binding sets.
+
+ For more complete documentation see:
+
+ http://www.jboss.org/community/wiki/AS5ServiceBindingManager
+-->
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <!-- The actual SBM from which services obtain binding information -->
+ <bean name="ServiceBindingManager" class="org.jboss.services.binding.ServiceBindingManager">
+
+ <constructor>
+ <!-- The name of the set of bindings to use for this server -->
+ <parameter>${jboss.service.binding.set:ports-default}</parameter>
+
+ <!-- The store of binding information -->
+ <parameter>
+ <bean class="org.jboss.services.binding.impl.PojoServiceBindingStore">
+
+ <!-- The different named sets of bindings -->
+ <property name="serviceBindingSets">
+ <set>
+ <inject bean="PortsDefaultBindings"/>
+ <inject bean="Ports01Bindings"/>
+ <inject bean="Ports02Bindings"/>
+ </set>
+ </property>
+
+ <!-- Base binding metadata that is used to create bindings for each set -->
+ <property name="standardBindings"><inject bean="StandardBindings"/></property>
+ </bean>
+ </parameter>
+
+ </constructor>
+
+ </bean>
+
+
+ <!-- The ports-default bindings are obtained by taking the base bindings and adding 0 to each port value -->
+ <bean name="PortsDefaultBindings" class="org.jboss.services.binding.impl.ServiceBindingSet">
+ <constructor>
+ <!-- The name of the set -->
+ <parameter>ports-default</parameter>
+ <!-- Default host name -->
+ <parameter>${jboss.bind.address}</parameter>
+ <!-- The port offset -->
+ <parameter>0</parameter>
+ <!-- Set of bindings to which the "offset by X" approach can't be applied -->
+ <parameter><null/></parameter>
+ </constructor>
+ </bean>
+
+ <!-- The ports-01 bindings are obtained by taking the base bindings and adding 100 to each port value -->
+ <bean name="Ports01Bindings" class="org.jboss.services.binding.impl.ServiceBindingSet">
+ <constructor>
+ <!-- The name of the set -->
+ <parameter>ports-01</parameter>
+ <!-- Default host name -->
+ <parameter>${jboss.bind.address}</parameter>
+ <!-- The port offset -->
+ <parameter>100</parameter>
+ <!-- Set of bindings to which the "offset by X" approach can't be applied -->
+ <parameter><null/></parameter>
+ </constructor>
+ </bean>
+
+ <!-- The ports-02 bindings are obtained by taking ports-default and adding 200 to each port value -->
+ <bean name="Ports02Bindings" class="org.jboss.services.binding.impl.ServiceBindingSet">
+ <constructor>
+ <!-- The name of the set -->
+ <parameter>ports-02</parameter>
+ <!-- Default host name -->
+ <parameter>${jboss.bind.address}</parameter>
+ <!-- The port offset -->
+ <parameter>200</parameter>
+ <!-- Set of bindings to which the "offset by X" approach can't be applied -->
+ <parameter><null/></parameter>
+ </constructor>
+ </bean>
+
+ <!-- Base binding metadata that the ServiceBindingStore uses to create bindings for each set -->
+ <bean name="StandardBindings" class="java.util.HashSet">
+ <constructor>
+ <parameter class="java.util.Collection">
+ <set elementClass="org.jboss.services.binding.ServiceBindingMetadata">
+ <!-- ********************* conf/jboss-service.xml ****************** -->
+
+ <!-- Remote classloading service -->
+ <bean class="org.jboss.services.binding.ServiceBindingMetadata">
+ <property name="serviceName">SingleSocketService</property>
+ <property name="port">8888</property>
+ <property name="description">The listening socket for the foodad functor.</property>
+ </bean>
+
+ <!-- Naming Service -->
+ <bean class="org.jboss.services.binding.ServiceBindingMetadata">
+ <property name="serviceName">MultiSocketService</property>
+ <property name="bindingName">SocketA</property>
+ <property name="port">10099</property>
+ <property name="description">The listening socket for the thingamajig</property>
+ </bean>
+
+ <bean class="org.jboss.services.binding.ServiceBindingMetadata">
+ <property name="serviceName">MultiSocketService</property>
+ <property name="bindingName">SocketB</property>
+ <property name="port">10100</property>
+ <property name="description">The listening socket for the doohickey</property>
+ </bean>
+
+ <bean class="org.jboss.services.binding.ServiceBindingMetadata">
+ <property name="serviceName">MultiSocketService</property>
+ <property name="bindingName">DiscoverySocket</property>
+ <property name="hostName">233.3.4.5}</property>
+ <property name="port">11102</property>
+ <property name="description">Multicast socket on which MultiSocketService listens for discovery requests from clients</property>
+ <!-- This address should not be changed between different
+ binding sets; all nodes need to listen on the same
+ multicast address -->
+ <property name="fixedHostName">true</property>
+ <!-- This port should not be changed between different
+ binding sets; all nodes need to listen on the same port -->
+ <property name="fixedPort">true</property>
+ </bean>
+ </set>
+ </parameter>
+ </constructor>
+ </bean>
+
+ <!-- Conversion of selected bindings into system properties -->
+ <bean name="SystemPropertyBinder" class="org.jboss.services.binding.SystemPropertyBinder">
+
+ <constructor>
+ <parameter>
+ <set>
+ <!-- JBM's remoting connector -->
+ <bean class="org.jboss.services.binding.SystemPropertyBinding">
+ <constructor>
+ <parameter>foodad.functor.port</parameter>
+ <parameter class="int">
+ <value-factory bean="ServiceBindingManager" method="getIntBinding"
+ parameter="SingleSocketService"/>
+ </parameter>
+ </constructor>
+ </bean>
+ </set>
+ </parameter>
+ </constructor>
+
+ </bean>
+
+</deployment>
Property changes on: projects/service-binding/trunk/core/src/examples/simple-example-jboss-beans.xml
___________________________________________________________________
Name: svn:keywords
+
More information about the jboss-cvs-commits
mailing list