You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by xtof <ch...@hp.com> on 2007/09/04 11:44:20 UTC

Re: Defining variable targetService in xbean.xml

I succeed in defining parameters in property file but it does not work for
targetService.
Any idea?

<beans xmlns:f="http://servicemix.apache.org/file/1.0"
	xmlns:t="http://com.hp.temip.servicemix/myproduct/1.0">

	<bean id="propertyConfigurer" 
	 
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> 
	  <property name="location"
value="classpath:access-module-proto1-su.properties" /> 
	</bean> 

  <f:poller service="product:polling" 
               endpoint="XMLFilePoller"
               file="${infile}"
               targetService="${targetService}"
               deleteFile="false"
               period="10000"
  />
              
</beans>


Thank
Christophe


xtof wrote:
> 
> Hello,
> 
> How defining variable targetService in a xbean.xml?
> 
> Indeed, I would like to define the targetService in an external
> configuration file. 
> 
> It could be also useful to define bc/se parameters in the same external
> configuration file.
> 
> The goal is to provide to multiple customers the same Service Assembly
> which could be configured according to customer environment without
> re-generating the SA on the customer platform.
> 
> Thank
> Christophe
>  
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Defining-vairable-targetService-in-xbean.xml-tf4376085s12049.html#a12474766
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Defining variable targetService in xbean.xml

Posted by Gordon Dickens <gd...@anexinet.com>.
Since the service and targetservice are bound at deployment time, they 
can not be read from a properties file.  I wrote a maven script that 
would change them before the actual compilation and packaging of the 
service assemblies.


xtof wrote:
> I succeed in defining parameters in property file but it does not work for
> targetService.
> Any idea?
>
> <beans xmlns:f="http://servicemix.apache.org/file/1.0"
>         xmlns:t="http://com.hp.temip.servicemix/myproduct/1.0">
>
>         <bean id="propertyConfigurer"
>
> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
>           <property name="location"
> value="classpath:access-module-proto1-su.properties" />
>         </bean>
>
>   <f:poller service="product:polling"
>                endpoint="XMLFilePoller"
>                file="${infile}"
>                targetService="${targetService}"
>                deleteFile="false"
>                period="10000"
>   />
>
> </beans>
>
>
> Thank
> Christophe
>
>
> xtof wrote:
>   
>> Hello,
>>
>> How defining variable targetService in a xbean.xml?
>>
>> Indeed, I would like to define the targetService in an external
>> configuration file.
>>
>> It could be also useful to define bc/se parameters in the same external
>> configuration file.
>>
>> The goal is to provide to multiple customers the same Service Assembly
>> which could be configured according to customer environment without
>> re-generating the SA on the customer platform.
>>
>> Thank
>> Christophe
>>
>>
>>
>>
>>     
>
> --
> View this message in context: http://www.nabble.com/Defining-vairable-targetService-in-xbean.xml-tf4376085s12049.html#a12474766
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>
> .
>
>   


Re: Defining variable targetService in xbean.xml

Posted by xtof <ch...@hp.com>.
Great it works !!!

Just change the class to javax.xml.namespace.QName

Thank
Christophe


gnodet wrote:
> 
> Well, it may comes from the fact that the service is a QName that is
> preprocessed before the property configuration i suppose. One way to
> work around that may be to use a QName bean instead of the xbean
> support:
>    <file:poller targetService="#targetService" ... />
>    <bean id="targetService" class="javax.xml.QName">
>      <contructor-arg value="${namespace}" />
>      <contructor-arg value="${service}" />
>    </bean>
> Or something along those lines...
> 
> On 9/4/07, xtof <ch...@hp.com> wrote:
>>
>> I succeed in defining parameters in property file but it does not work
>> for
>> targetService.
>> Any idea?
>>
>> <beans xmlns:f="http://servicemix.apache.org/file/1.0"
>>         xmlns:t="http://com.hp.temip.servicemix/myproduct/1.0">
>>
>>         <bean id="propertyConfigurer"
>>
>> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
>>           <property name="location"
>> value="classpath:access-module-proto1-su.properties" />
>>         </bean>
>>
>>   <f:poller service="product:polling"
>>                endpoint="XMLFilePoller"
>>                file="${infile}"
>>                targetService="${targetService}"
>>                deleteFile="false"
>>                period="10000"
>>   />
>>
>> </beans>
>>
>>
>> Thank
>> Christophe
>>
>>
>> xtof wrote:
>> >
>> > Hello,
>> >
>> > How defining variable targetService in a xbean.xml?
>> >
>> > Indeed, I would like to define the targetService in an external
>> > configuration file.
>> >
>> > It could be also useful to define bc/se parameters in the same external
>> > configuration file.
>> >
>> > The goal is to provide to multiple customers the same Service Assembly
>> > which could be configured according to customer environment without
>> > re-generating the SA on the customer platform.
>> >
>> > Thank
>> > Christophe
>> >
>> >
>> >
>> >
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Defining-vairable-targetService-in-xbean.xml-tf4376085s12049.html#a12474766
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> 
> 

-- 
View this message in context: http://www.nabble.com/Defining-vairable-targetService-in-xbean.xml-tf4376085s12049.html#a12493473
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Defining variable targetService in xbean.xml

Posted by xtof <ch...@hp.com>.
Thank for your answer,

I'll try it

Christophe 


gnodet wrote:
> 
> Well, it may comes from the fact that the service is a QName that is
> preprocessed before the property configuration i suppose. One way to
> work around that may be to use a QName bean instead of the xbean
> support:
>    <file:poller targetService="#targetService" ... />
>    <bean id="targetService" class="javax.xml.QName">
>      <contructor-arg value="${namespace}" />
>      <contructor-arg value="${service}" />
>    </bean>
> Or something along those lines...
> 
> On 9/4/07, xtof <ch...@hp.com> wrote:
>>
>> I succeed in defining parameters in property file but it does not work
>> for
>> targetService.
>> Any idea?
>>
>> <beans xmlns:f="http://servicemix.apache.org/file/1.0"
>>         xmlns:t="http://com.hp.temip.servicemix/myproduct/1.0">
>>
>>         <bean id="propertyConfigurer"
>>
>> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
>>           <property name="location"
>> value="classpath:access-module-proto1-su.properties" />
>>         </bean>
>>
>>   <f:poller service="product:polling"
>>                endpoint="XMLFilePoller"
>>                file="${infile}"
>>                targetService="${targetService}"
>>                deleteFile="false"
>>                period="10000"
>>   />
>>
>> </beans>
>>
>>
>> Thank
>> Christophe
>>
>>
>> xtof wrote:
>> >
>> > Hello,
>> >
>> > How defining variable targetService in a xbean.xml?
>> >
>> > Indeed, I would like to define the targetService in an external
>> > configuration file.
>> >
>> > It could be also useful to define bc/se parameters in the same external
>> > configuration file.
>> >
>> > The goal is to provide to multiple customers the same Service Assembly
>> > which could be configured according to customer environment without
>> > re-generating the SA on the customer platform.
>> >
>> > Thank
>> > Christophe
>> >
>> >
>> >
>> >
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Defining-vairable-targetService-in-xbean.xml-tf4376085s12049.html#a12474766
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Blog: http://gnodet.blogspot.com/
> 
> 

-- 
View this message in context: http://www.nabble.com/Defining-vairable-targetService-in-xbean.xml-tf4376085s12049.html#a12493275
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: Defining variable targetService in xbean.xml

Posted by Guillaume Nodet <gn...@gmail.com>.
Well, it may comes from the fact that the service is a QName that is
preprocessed before the property configuration i suppose. One way to
work around that may be to use a QName bean instead of the xbean
support:
   <file:poller targetService="#targetService" ... />
   <bean id="targetService" class="javax.xml.QName">
     <contructor-arg value="${namespace}" />
     <contructor-arg value="${service}" />
   </bean>
Or something along those lines...

On 9/4/07, xtof <ch...@hp.com> wrote:
>
> I succeed in defining parameters in property file but it does not work for
> targetService.
> Any idea?
>
> <beans xmlns:f="http://servicemix.apache.org/file/1.0"
>         xmlns:t="http://com.hp.temip.servicemix/myproduct/1.0">
>
>         <bean id="propertyConfigurer"
>
> class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
>           <property name="location"
> value="classpath:access-module-proto1-su.properties" />
>         </bean>
>
>   <f:poller service="product:polling"
>                endpoint="XMLFilePoller"
>                file="${infile}"
>                targetService="${targetService}"
>                deleteFile="false"
>                period="10000"
>   />
>
> </beans>
>
>
> Thank
> Christophe
>
>
> xtof wrote:
> >
> > Hello,
> >
> > How defining variable targetService in a xbean.xml?
> >
> > Indeed, I would like to define the targetService in an external
> > configuration file.
> >
> > It could be also useful to define bc/se parameters in the same external
> > configuration file.
> >
> > The goal is to provide to multiple customers the same Service Assembly
> > which could be configured according to customer environment without
> > re-generating the SA on the customer platform.
> >
> > Thank
> > Christophe
> >
> >
> >
> >
>
>
> --
> View this message in context: http://www.nabble.com/Defining-vairable-targetService-in-xbean.xml-tf4376085s12049.html#a12474766
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/