Hi Raymond,

I think I ended up confusing everybody with that... here are some
clarifications I wish to make.
- I am in no way recommending ASM here.  I only mentioned that the 'style'
of representing parameter types and return type for a method is something
that I have borrowed from ASM
- what I have presented is also supposed to be going as annotation to a
method, though I do admit it is very long one.  Just that I pulled the
entire annotation out of the method signature as such.  That is all :)

Now all this not to persuade that you consider my recommendation :)... just
about wanted to clarify things.... that's all :)

You may go ahead with what you have proposed, it does look good and I can
see you are thinking pretty comprehensive.  But just about a point that I
was not clear...

-  how would you represent a case where a method requires two different
bindings.. one for parameter data types and another for the return data
type.  Over here, I see that there is just one databinding that can apply to
the entire method.  Just that we could mark which parts of the method
require the transformation by annotating @DataParam and @DataResult.  Or
take the case when there are parameters that might need different
databindings.  Maybe I am missing something here... am I?


Thanks

- Venkat



On 9/29/06, Raymond Feng <[EMAIL PROTECTED]> wrote:

Hi,

That's annotation by parameter.

Reposted the sample for illustration. If you guys don't like the name
DataParam/DataResult, please help me find better ones.

Thanks,
Raymond

@Remotable
@DataBinding(name = "sdo") // Interface-level databinding declaration
public interface Dummy {

    // Order and Shipment are SDO DataObject(s), Date is a plain java
object
    // @DataParam marks the parameter and @DataResult marks the return
value, please note @DataResult applies to "METHOD". Both are optional

    @DataResult Shipment createShipment(@DataParam Order order, Date
deadline);

    @DataBinding(name = "jaxb", attributes = { @DataAttr(name =
"contextPath", value = "com.example.ipo.jaxb") }) // operation-level
databinding
    @DataResult CreditReport checkCredit(@DataParam Customer customer);

    @DataBinding(name = "xml:string")
    @DataResult String evaluate(@DataParam String xml, String xpath);
}


Thanks,
Raymond


----- Original Message -----
From: "Jeremy Boynes" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, September 29, 2006 8:47 AM
Subject: Re: Parameter-level databinding support


> On Sep 29, 2006, at 8:41 AM, Raymond Feng wrote:
>
>> Hi, Jim.
>>
>> That's my proposal.
>>
>> Venkat, I'm a bit worried to use ASM for this purpose. I agree
with  Jim
>> that annotating by parameters is consistent with CDI.
>>
>> If there's no objections, I'll make the changes based on my proposal.
>
> Is that with the indexes or by adding annotations to the parameters?
> --
> Jeremy
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to