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
