Actually I agree with Kim. I think it would be nice if a task injected
a message against a sequence. The pattern I use works ok, but its
messy to remember each time.

The simplest thing to do would be to add a new messageSequence task to
allow an inlined sequence. Thoughts?

Paul

On Wed, Mar 11, 2009 at 4:33 AM, Ruwan Linton <[email protected]> wrote:
> Hi Kim,
>
>
>
>>
>> I would expect Synapse to have tasking based aorund higher level concepts
>> like a sequence or proxy. For example a file dump is an event that triggers
>> a VFS:File proxy. Why not a timer event that triggers either a sequence
>> or a proxy too. Calling Java is an ugly approach that means we have to
>> create
>> hacks to get what we want.
>
>
> Not really, it is a general implementation to schedule jobs inside synapse,
> as I explained in an earlier email you could write your own task
> implementation to implement a NamedSequenceMessageInjector, which will
> inject the message to the specified named sequence.
>
> Thanks,
> Ruwan
>
>
>>
>>
>>
>>
>> Andreas Veithen-2 wrote:
>> >
>> > The message injector indeed doesn't allow you to specify the sequence
>> > to execute. However Paul once described [1] a pattern that can be used
>> > to get around this limitation.
>> >
>> > [1] http://markmail.org/thread/kfqxxqwrjwzohglm
>> >
>> > On Mon, Mar 9, 2009 at 03:54, kimhorn <[email protected]> wrote:
>> >>
>> >> Seems strange that a task calls a Java class. Would it not be better for
>> >> it
>> >> to
>> >> start a <sequence>.
>> >>
>> >> I want to call two web services in a chain that also require a java
>> call,
>> >> every 20 minutes.
>> >> A task is the solution for the timing bit. I want to start a complex
>> >> sequence.
>> >>
>> >> Part of the sequecne calls a Java class that adds BASIC auth info
>> >> (username
>> >> and password) to TRANSAPORT.
>> >>
>> >> With a task I can't call two Java classes, one to inject Message and one
>> >> to
>> >> add AUTH.
>> >>
>> >> I could to edit the Message Injector class to also add in the BASIC auth
>> >> headers.
>> >> So create a new injector with basic auth properties too. This also is a
>> >> very
>> >> poor solution.
>> >>
>> >> At the moment I am using the task message injector to call a Synapse
>> >> proxy
>> >> that runs
>> >> my sequence; as a named proxy. This sequence builds the message payload
>> >> and
>> >> calls the Java to add
>> >> BASIC Auth headers. This seems a round about and indirect  way to solve
>> >> the
>> >> problem.
>> >>
>> >> As I can embed a java class in a sequence, having a task call a sequence
>> >> would
>> >> be a more general solution than having it just call a java class.
>> >>
>> >>
>> >> --
>> >> View this message in context:
>> >> http://www.nabble.com/Tasks-are-strange.-tp22406367p22406367.html
>> >> Sent from the Synapse - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Tasks-are-strange.-tp22406367p22424956.html
>> Sent from the Synapse - User mailing list archive at Nabble.com.
>>
>>
>
>
> --
> Ruwan Linton
> Senior Software Engineer & Product Manager; WSO2 ESB; http://wso2.org/esb
> WSO2 Inc.; http://wso2.org
> email: [email protected]; cell: +94 77 341 3097
> blog: http://ruwansblog.blogspot.com
>



-- 
Paul Fremantle
Co-Founder and CTO, WSO2
Apache Synapse PMC Chair
OASIS WS-RX TC Co-chair

blog: http://pzf.fremantle.org
[email protected]

"Oxygenating the Web Service Platform", www.wso2.com

Reply via email to