Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
<?xml version="1.0" encoding="UTF-8"?>
<!--
#%L
Service Activity Monitoring :: Agent
%%
Copyright (C) 2011 Talend Inc.
%%
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
#L%
-->


<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd" >

	<bean
		class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
		<property name="ignoreUnresolvablePlaceholders" value="true" />
		<property name="location"
			value="classpath:locator.properties" />
	</bean>

    <bean id="serviceLocator"
          class="org.talend.esb.servicelocator.client.internal.ServiceLocatorImpl"
          init-method="connect" destroy-method="disconnect">
        <property name="locatorEndpoints" value="${locator.endpoints}"/>
    </bean>

    <bean id="locatorRegistrar" class="org.talend.esb.servicelocator.cxf.internal.LocatorRegistrar">
        <property name="bus" ref="cxf" />
        <property name="serviceLocator" ref="serviceLocator" />
        <property name="endpointPrefix" value="${endpoint.prefix}"/>
    </bean>

    <bean id="defaultSelectionStrategy" class="org.talend.esb.servicelocator.cxf.internal.DefaultSelectionStrategy">
    </bean>

   <bean id="evenDistributionSelectionStrategy" class="org.talend.esb.servicelocator.cxf.internal.EvenDistributionSelectionStrategy">
        <property name="reloadAdressesCount" value="${locator.reloadAdressesCount}"/>
   </bean>

   <bean id="randomSelectionStrategy" class="org.talend.esb.servicelocator.cxf.internal.RandomSelectionStrategy">
        <property name="reloadAdressesCount" value="${locator.reloadAdressesCount}"/>
   </bean>

   <bean id="locatorClientEnabler" class="org.talend.esb.servicelocator.cxf.internal.LocatorClientEnabler">
       <property name="locatorSelectionStrategies">
            <map>
				<entry key="defaultSelectionStrategy" value-ref="defaultSelectionStrategy" />
				<entry key="randomSelectionStrategy" value-ref="randomSelectionStrategy" />
				<entry key="evenDistributionSelectionStrategy" value-ref="evenDistributionSelectionStrategy" />
			</map>
        </property>
        <property name="bus" ref="cxf" />
        <property name="serviceLocator" ref="serviceLocator" />
        <property name="defaultLocatorSelectionStrategy" value="${locator.strategy}" />
     </bean>

    <bean id="locatorManager" class="org.talend.esb.servicelocator.cxf.internal.ServiceLocatorManager">
        <property name="bus" ref="cxf" />
        <property name="locatorRegistrar" ref="locatorRegistrar" />
        <property name="locatorClientEnabler" ref="locatorClientEnabler" />
    </bean> 
</beans>
New to GrepCode? Check out our FAQ X