Hi ant,

Sorry for the late.

Here is the scenario that illustrates the point that we are discussing.

We need to set the field named "test" of the TestCommand class with the
value "testvalue" before execution and set the field value to the message
context property with the name "testcontext" after the execution.

Here is what my proposed configuration for the above scenario (actually the
current code supports this :) )

<POJOCommand class="org.apache.synapse.TestCommand">
  <property name="test" value="test value" context-name="testcontext"/>
</POJOCommand>

And here is what paul like it to be,

<POJOCommand class="org.apache.synapse.TestCommand">
  <property name="test" value="test value"
expression="get-property('testcontext')"/>
</POJOCommand>

Paul wants the configuration to be simple (don't want to add another
attribute context-name and use the expression attribute), but I think this
configuration is confusing because it has the get-property to actually mean
a set property. This is the problem.

(Note: I have avoided the actions since it will make this more complex, but
when we add context-name there will be three more actions namely
"ReadContext", "UpdateContext", "ReadAndUpdateContext")

Paul, please correct me if I have interpreted your views wrongly.

Thanks,
Ruwan


On Dec 14, 2007 4:30 PM, ant elder <[EMAIL PROTECTED]> wrote:

> Could someone post actual examples of the simplest xml with each approach
> so we can see the differences?
>
>    ...ant
>
>
> On Dec 14, 2007 10:08 AM, Ruwan Linton < [EMAIL PROTECTED]> wrote:
>
> > Paul,
> >
> > On Dec 14, 2007 1:52 PM, Paul Fremantle < [EMAIL PROTECTED]> wrote:
> >
> > > Ruwam
> >
> >
> > I think you are referring to me (Ruwan) not some one named Ruwam :)
> >
> > Well, even though we need to keep the consistency, at the same time we
> > have to keep the things simpler to understand and the implementation solid.
> > But I don't see this as simple to understand.
> >
> > To me this syntax is cleaner than what you suggested.
> >
> > Thanks,
> > Ruwan
> >
> >
> > >
> > > What I don't like about this is that everywhere else in Synapse we
> > > have a consistent access to message context properties. Nowhere else do we
> > > use this syntax.
> > >
> > > Whatever we do we need to sync it up with all the other places where
> > > we get and set mc properties I think - e.g. DBLookup, etc.
> > >
> > > Paul
> >
> >
> >
> >
> > --
> > Ruwan Linton
> > http://www.wso2.org - "Oxygenating the Web Services Platform"
> >
>
>


-- 
Ruwan Linton
http://www.wso2.org - "Oxygenating the Web Services Platform"

Reply via email to