You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tuscany.apache.org by Andrew Mak <ma...@ca.ibm.com> on 2009/06/17 17:00:19 UTC

JMS binding processor, does not preserve file structure?

Hi,

I have JMS binding in my composite, which looks like so:

    <binding.jms>
      <destination name="SomeDest"/>
    </binding.jms>

As far as I know, my XML fragment is valid w.r.t the the schema.  Now when 
I read that composite file into Tuscany to manipulate some other parts of 
the file, and then write back to file, my JMS binding element got changed 
to:

    <binding.jms uri="jms:SomeDest">
      <destination create="ifnotexist" name="SomeDest" type="queue"/>
    </binding.jms>

Although I think this XML fragment is semantically  the same as the 
original, it seems weird for a part of my file that I wasn't even working 
on to change like that.  So my question is, is there some option to 
configure the JMS binding processor so that it can preserve the structure 
of the JMS binding element and not add in the extra (optional) attributes?

Thanks,

Andrew Mak

Re: JMS binding processor, does not preserve file structure?

Posted by Simon Laws <si...@googlemail.com>.
On Wed, Jun 24, 2009 at 8:18 PM, Luciano Resende<lu...@gmail.com> wrote:
> On Tue, Jun 23, 2009 at 12:48 PM, Andrew Mak<ma...@ca.ibm.com> wrote:
>>
>> Thanks for the explanation.  However, I think there are some cases where
>> this behavior can potentially cause problems.  I opened
>> https://issues.apache.org/jira/browse/TUSCANY-3120 and put the details
>> there.
>>
>> Andrew
>>
>
>
> Just my 2c here, but I don' t think we should try to have XML Fidelity
> when using Tuscany Composite Processors, as this would make our SCA
> Model more complex and heavy.
>

Looking at the code, in this particular case, the JMS binding
processor is already coded to not write out content if it has the
default value. However the default values have changed and hence the
code is incorrect as it stands. There are also a few nits in the
writers causing similar effects. I'll correct the code to improve the
fidelity.

Simon

Re: JMS binding processor, does not preserve file structure?

Posted by Luciano Resende <lu...@gmail.com>.
On Tue, Jun 23, 2009 at 12:48 PM, Andrew Mak<ma...@ca.ibm.com> wrote:
>
> Thanks for the explanation.  However, I think there are some cases where
> this behavior can potentially cause problems.  I opened
> https://issues.apache.org/jira/browse/TUSCANY-3120 and put the details
> there.
>
> Andrew
>


Just my 2c here, but I don' t think we should try to have XML Fidelity
when using Tuscany Composite Processors, as this would make our SCA
Model more complex and heavy.

Re: JMS binding processor, does not preserve file structure?

Posted by Andrew Mak <ma...@ca.ibm.com>.
Thanks for the explanation.  However, I think there are some cases where 
this behavior can potentially cause problems.  I opened 
https://issues.apache.org/jira/browse/TUSCANY-3120 and put the details 
there.

Andrew



From:
Simon Laws <si...@googlemail.com>
To:
user@tuscany.apache.org
Date:
06/18/2009 10:59 AM
Subject:
Re: JMS binding processor, does not preserve file structure?



On Thu, Jun 18, 2009 at 3:06 PM, Andrew Mak<ma...@ca.ibm.com> wrote:
>
> Hey Scott,
>
> So when you say "issues", do you mean that this is a bug that's intended 
to
> be fix at some point? (is there a jira?  I can open one if there isn't). 
 Or
> is this pretty working as designed?
>
> Thanks,
>
> Andrew
>
>
> From: Scott Kurz <sc...@gmail.com>
> To: user@tuscany.apache.org
> Date: 06/17/2009 08:25 PM
> Subject: Re: JMS binding processor, does not preserve file structure?
> ________________________________
>
>
> Andrew,
>
> I don't think there is any such option and I think we have other
> similar issues where read/write produces equivalent but different XML,
> for example with certain defaults like the wireFormat (whether the
> default is explicitly specified or not,we'll still write out the
> default element).
>
> Scott
>
>
>

Hi Andrew

What you are seeing of course is the defaults that Tuscany uses in the
model if no input is provided. To write out only what was read in we
would have to keep some flags indicating which fields are default
values and which fields were specified by the user. We don't do that
at the moment.

Simon



Re: JMS binding processor, does not preserve file structure?

Posted by Simon Laws <si...@googlemail.com>.
On Thu, Jun 18, 2009 at 3:06 PM, Andrew Mak<ma...@ca.ibm.com> wrote:
>
> Hey Scott,
>
> So when you say "issues", do you mean that this is a bug that's intended to
> be fix at some point? (is there a jira?  I can open one if there isn't).  Or
> is this pretty working as designed?
>
> Thanks,
>
> Andrew
>
>
> From: Scott Kurz <sc...@gmail.com>
> To: user@tuscany.apache.org
> Date: 06/17/2009 08:25 PM
> Subject: Re: JMS binding processor, does not preserve file structure?
> ________________________________
>
>
> Andrew,
>
> I don't think there is any such option and I think we have other
> similar issues where read/write produces equivalent but different XML,
> for example with certain defaults like the wireFormat (whether the
> default is explicitly specified or not,we'll still write out the
> default element).
>
> Scott
>
>
>

Hi Andrew

What you are seeing of course is the defaults that Tuscany uses in the
model if no input is provided. To write out only what was read in we
would have to keep some flags indicating which fields are default
values and which fields were specified by the user. We don't do that
at the moment.

Simon

Re: JMS binding processor, does not preserve file structure?

Posted by Andrew Mak <ma...@ca.ibm.com>.
Hey Scott,

So when you say "issues", do you mean that this is a bug that's intended 
to be fix at some point? (is there a jira?  I can open one if there 
isn't).  Or is this pretty working as designed?

Thanks,

Andrew



From:
Scott Kurz <sc...@gmail.com>
To:
user@tuscany.apache.org
Date:
06/17/2009 08:25 PM
Subject:
Re: JMS binding processor, does not preserve file structure?



Andrew,

I don't think there is any such option and I think we have other
similar issues where read/write produces equivalent but different XML,
for example with certain defaults like the wireFormat (whether the
default is explicitly specified or not,we'll still write out the
default element).

Scott



Re: JMS binding processor, does not preserve file structure?

Posted by Scott Kurz <sc...@gmail.com>.
Andrew,

I don't think there is any such option and I think we have other
similar issues where read/write produces equivalent but different XML,
for example with certain defaults like the wireFormat (whether the
default is explicitly specified or not,we'll still write out the
default element).

Scott