Hi,

Please my comments in line.

Thanks,
Raymond

----- Original Message ----- From: "Jim Marino" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, August 23, 2006 10:16 AM
Subject: Re: adding an interceptor


Are you proposing the use of "databinding." the package name for the annotations or does that have some significance? If it is just a package name, I'd assume we would want a fully qualified one. If this is the case, then an interesting question comes up - which one to use. Since these are extensions, I don't think we should allow the use of "Tuscany" for data binding extensions not provided by the project. Also, if we go this route, we'll need annotation processors for each annotation.


Sorry, it was a mistake in the sample. I meant two different annotations such as "DataBindingSDO" and "DataBindingJAXB".

Another option may be to define a generic "databinding" annotation such as:

@Target({METHOD})
@Retention(RUNTIME)
public @interface Databinding {

    String type() default "";

}

Individual extensions would supply a value for type (its too bad enums can't be extended). There would be one annotation processor which would handle the decoration of the model. What do you think?


I already have such an annotation defined in the databinding-framework module. We probably want to rename it as DataType to be consistent with the DataType model.

As for the two different annotation styles, I had some discussions with Jeremy. Here're some issues we touched:

1) The annotation can be used to create/decorate a DataType
2) The generic annotation should be able to catch all the related metadata for a given DataType (maybe some name/value pair for extra info) 3) We should allow databinding providers to add their own annotation if they choose to do so (I assume it's low proirity for now)


Also, some quick questions inline:

On Aug 21, 2006, at 10:45 AM, Raymond Feng wrote:

Hi,

For the data transformation to be handled by a databinding interceptor, let's assume we have the following case:

* The source side uses SDO.

   <import.sdo location="xsd/customer.xsd"/>
int getCreditScore(@databinding.sdo(namespace="http://customer"; name="Customer")Customer customer);

Is data binding definable per param, with the possibility to mix or do we want to just say for the entire method (mixing seems kind of strange). Also, what about the return value? Maybe it would be better to place the param only on the method?


This concern was brought up by Ant as well. We have three levels here: Interface, Method and Parameter. Jeremy's DataType model seems to promote Parameter level. I think it's reasonable to set some defaults at Interface or Method level.


* The target side uses JAXB.

   int getCreditScore(@databinding.jaxb Customer customer);

Then the interceptor will require the following information:

1) DataType on the source side (SDO Customer)
2) A "commonj.sdo.TypeHelper" associated with the current composite that will provide the SDO type system
3) DataType on the target side (JAXB Customer)
4) (some JAXB context for the JAXB Customer?)

Thanks,
Raymond

----- Original Message ----- From: "Jim Marino" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Saturday, August 19, 2006 5:24 PM
Subject: Re: adding an interceptor




---------------------------------------------------------------------
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