That's exactly what I have to do... and I found out how! I'm going to explain
how to do, if anyone is going to have the same question:

Simply add a variable with getters and setters into Endpoint class and use
it into the xbean.xml of the associated SU.

Thanks, Giuseppe


Adrian Co wrote:
> 
> Ah.
> 
> If my understanding is correct, a SU, is just an endpoint configured and 
> deployed in the SE. For the case of the standard smx components (like 
> servicemix-http, servicemix-jms, etc), the endpoint in the service 
> engine contains a targetService property that is configured via the 
> xbean.xml in the service unit. If your component is xbean enabled, then 
> you could essentially do the same thing. i.e. provide a targetService 
> property in the service engine and configure per SU.
> 
> For examples on using xbean, I would look at any of the binding 
> components under deployables. AFAIK, you need only add an @XBean tag in 
> the Endpoint class and use the xbean-maven-plugin, but I'm not an xbean 
> expert, so I'm not entirely sure. :)
> 
> beppe82 wrote:
>> What do you mean with "standard smx components"? I want to configure the
>> destination of the messages sent by a SU whose SE was written by me: I
>> use
>> smx 's ftp component, and that's no problem, but what if I want to
>> configure
>> MySE and MySU?
>> Thanks
>>
>>
>> Adrian Co wrote:
>>   
>>> Most if not all of the standard smx components have the targetService 
>>> attribute that you can configure in the xbean.xml.
>>>
>>> I might be misunderstanding your problem... :)
>>>
>>> beppe82 wrote:
>>>     
>>>> Hi, I have a SE created via mvn archetype and the correspondent SU. How
>>>> can I
>>>> do to specify in the SU that I want the messages sent to a certain
>>>> component? I don't want to hard code the destination like in:
>>>>
>>>> InOnly ex = exchangeFactory.createInOnlyExchange();
>>>> ex.setService(new QName("http://giuseppe.org";, "xmlsingleelab",
>>>> "beppe"));
>>>>
>>>> What I want is to configure my own SU like, for example, the ftp
>>>> component
>>>> provided with ServiceMix, which can contain a "targetService="...."
>>>> attribute.
>>>> Thanks
>>>>   
>>>>       
>>>
>>>     
>>
>>   
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/how-to-handle-targetService-tf3987891s12049.html#a11341428
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to