You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jdo-dev@db.apache.org by "Matthew T. Adams (JIRA)" <ji...@apache.org> on 2009/08/07 23:01:16 UTC

[jira] Created: (JDO-638) Add annotations for instance callbacks

Add annotations for instance callbacks
--------------------------------------

                 Key: JDO-638
                 URL: https://issues.apache.org/jira/browse/JDO-638
             Project: JDO
          Issue Type: Improvement
          Components: api2
            Reporter: Matthew T. Adams
            Priority: Minor


The current JDO annotations in javax.jdo.annotations do not include annotations equivalent to instance callbacks.  We should add method annotations for each method in javax.jdo.InstanceCallback.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JDO-638) Add annotations for instance callbacks

Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JDO-638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12749614#action_12749614 ] 

Craig Russell commented on JDO-638:
-----------------------------------

Just to clarify, we discussed this issue during the conference call but didn't decide anything. Decisions are made on email and jira issue discussions.


> Add annotations for instance callbacks
> --------------------------------------
>
>                 Key: JDO-638
>                 URL: https://issues.apache.org/jira/browse/JDO-638
>             Project: JDO
>          Issue Type: Improvement
>          Components: api2
>            Reporter: Matthew T. Adams
>            Priority: Minor
>         Attachments: InstanceCallbackAnnotations-1.0.patch, InstanceCallbackAnnotations-2.patch
>
>
> The current JDO annotations in javax.jdo.annotations do not include annotations equivalent to instance callbacks.  We should add method annotations for each method in javax.jdo.InstanceCallback.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JDO-638) Add annotations for instance callbacks

Posted by "Matthew T. Adams (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JDO-638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12744083#action_12744083 ] 

Matthew T. Adams commented on JDO-638:
--------------------------------------

How should we handle the case where a class both implements an instance callback interface and uses an instance callback annotation?  Seems to me that f the annotated method is the same method as the instance callback interface method, it is not an error (warning would be nice), otherwise it's an error.  I also would consider a stricter policy that says it's one or the other, interfaces or annotations, not both.  What do you think?

> Add annotations for instance callbacks
> --------------------------------------
>
>                 Key: JDO-638
>                 URL: https://issues.apache.org/jira/browse/JDO-638
>             Project: JDO
>          Issue Type: Improvement
>          Components: api2
>            Reporter: Matthew T. Adams
>            Priority: Minor
>         Attachments: InstanceCallbackAnnotations-1.0.patch, InstanceCallbackAnnotations-2.patch
>
>
> The current JDO annotations in javax.jdo.annotations do not include annotations equivalent to instance callbacks.  We should add method annotations for each method in javax.jdo.InstanceCallback.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JDO-638) Add annotations for instance callbacks

Posted by "Matthew T. Adams (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JDO-638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12743271#action_12743271 ] 

Matthew T. Adams commented on JDO-638:
--------------------------------------

I'll add @Target & @Retention on next patch.  TCK tests will have to be in patch after that.  ;)

> Add annotations for instance callbacks
> --------------------------------------
>
>                 Key: JDO-638
>                 URL: https://issues.apache.org/jira/browse/JDO-638
>             Project: JDO
>          Issue Type: Improvement
>          Components: api2
>            Reporter: Matthew T. Adams
>            Priority: Minor
>         Attachments: InstanceCallbackAnnotations-1.0.patch
>
>
> The current JDO annotations in javax.jdo.annotations do not include annotations equivalent to instance callbacks.  We should add method annotations for each method in javax.jdo.InstanceCallback.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (JDO-638) Add annotations for instance callbacks

Posted by "Matthew T. Adams (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JDO-638?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matthew T. Adams updated JDO-638:
---------------------------------

    Attachment: InstanceCallbackAnnotations-2.patch

Added Target & Retention annotations.  TCK tests still TBD.

> Add annotations for instance callbacks
> --------------------------------------
>
>                 Key: JDO-638
>                 URL: https://issues.apache.org/jira/browse/JDO-638
>             Project: JDO
>          Issue Type: Improvement
>          Components: api2
>            Reporter: Matthew T. Adams
>            Priority: Minor
>         Attachments: InstanceCallbackAnnotations-1.0.patch, InstanceCallbackAnnotations-2.patch
>
>
> The current JDO annotations in javax.jdo.annotations do not include annotations equivalent to instance callbacks.  We should add method annotations for each method in javax.jdo.InstanceCallback.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JDO-638) Add annotations for instance callbacks

Posted by "Michael Bouschen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JDO-638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12749588#action_12749588 ] 

Michael Bouschen commented on JDO-638:
--------------------------------------

We discussed this during the JDO TCK conference call and came to the conclusion that JDO should support multiple methods being annotated with the same instance callback annotation. This also includes mixing annotations and implementing the instance callback interface, as long as the signature of the callback methods are correct.  The order of execution of callbacks/annotated methods is not defined. 

> Add annotations for instance callbacks
> --------------------------------------
>
>                 Key: JDO-638
>                 URL: https://issues.apache.org/jira/browse/JDO-638
>             Project: JDO
>          Issue Type: Improvement
>          Components: api2
>            Reporter: Matthew T. Adams
>            Priority: Minor
>         Attachments: InstanceCallbackAnnotations-1.0.patch, InstanceCallbackAnnotations-2.patch
>
>
> The current JDO annotations in javax.jdo.annotations do not include annotations equivalent to instance callbacks.  We should add method annotations for each method in javax.jdo.InstanceCallback.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (JDO-638) Add annotations for instance callbacks

Posted by "Michael Bouschen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JDO-638?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Bouschen updated JDO-638:
---------------------------------

             Assignee: Matthew T. Adams
        Fix Version/s: JDO 3 maintenance release 1
    Affects Version/s: JDO 3
          Component/s: specification
                       tck

> Add annotations for instance callbacks
> --------------------------------------
>
>                 Key: JDO-638
>                 URL: https://issues.apache.org/jira/browse/JDO-638
>             Project: JDO
>          Issue Type: Improvement
>          Components: api, specification, tck
>    Affects Versions: JDO 3
>            Reporter: Matthew T. Adams
>            Assignee: Matthew T. Adams
>            Priority: Minor
>             Fix For: JDO 3 maintenance release 1
>
>         Attachments: InstanceCallbackAnnotations-1.0.patch, InstanceCallbackAnnotations-2.patch, InstanceCallbackAnnotations-3.patch
>
>
> The current JDO annotations in javax.jdo.annotations do not include annotations equivalent to instance callbacks.  We should add method annotations for each method in javax.jdo.InstanceCallback.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (JDO-638) Add annotations for instance callbacks

Posted by "Craig Russell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JDO-638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12743260#action_12743260 ] 

Craig Russell commented on JDO-638:
-----------------------------------

I have no philosophical objections to adding these annotations.

> TCK tests TBD.

;-) I suppose that will be in your next patch.

Also need the @Target and @Retention annotations on the annotations.


> Add annotations for instance callbacks
> --------------------------------------
>
>                 Key: JDO-638
>                 URL: https://issues.apache.org/jira/browse/JDO-638
>             Project: JDO
>          Issue Type: Improvement
>          Components: api2
>            Reporter: Matthew T. Adams
>            Priority: Minor
>         Attachments: InstanceCallbackAnnotations-1.0.patch
>
>
> The current JDO annotations in javax.jdo.annotations do not include annotations equivalent to instance callbacks.  We should add method annotations for each method in javax.jdo.InstanceCallback.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (JDO-638) Add annotations for instance callbacks

Posted by "Matthew T. Adams (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JDO-638?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matthew T. Adams updated JDO-638:
---------------------------------

    Attachment: InstanceCallbackAnnotations-3.patch

The following proposes the ordering of annotated methods.  I've added an order property to each of the annotations with javadoc as follows:

	/**
	 * The order of execution of this method relative to other annotated
	 * callback methods. A lower order value means that the annotated method has
	 * a higher precedence among annotated methods, and a higher order, a lower
	 * precedence. Order values need not be contiguous among annotated methods.
	 * Methods that are implementations of the corresponding callback interface
	 * method are always called first. The order value {@link Integer#MAX_VALUE}
	 * , the default, signifies that the order is undefined among annotated
	 * methods. If other annotated methods define an order, those methods will
	 * be called before annotated methods with an undefined order. If other
	 * annotated methods define equal order values, then methods annotated with
	 * lower order values will be called before them, the methods with equal
	 * order values will be called in an undefined order, and then any methods
	 * with higher order values will be called after the methods with equal
	 * order values have been called. If a method that represents an
	 * implementation of the corresponding interface method carries this
	 * annotation, the annotation and its order are ignored, and the interface
	 * method is called first. If a subclass annotates a method with the same
	 * order as an annotated method in its superclass hierarchy, then the
	 * subclass's method is called first, otherwise the order values among all
	 * annotated methods in the class and its superclass hierarchy determine
	 * call order.
	 */
	int order() default Integer.MAX_VALUE;

Thoughts?

> Add annotations for instance callbacks
> --------------------------------------
>
>                 Key: JDO-638
>                 URL: https://issues.apache.org/jira/browse/JDO-638
>             Project: JDO
>          Issue Type: Improvement
>          Components: api2
>            Reporter: Matthew T. Adams
>            Priority: Minor
>         Attachments: InstanceCallbackAnnotations-1.0.patch, InstanceCallbackAnnotations-2.patch, InstanceCallbackAnnotations-3.patch
>
>
> The current JDO annotations in javax.jdo.annotations do not include annotations equivalent to instance callbacks.  We should add method annotations for each method in javax.jdo.InstanceCallback.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (JDO-638) Add annotations for instance callbacks

Posted by "Matthew T. Adams (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JDO-638?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matthew T. Adams updated JDO-638:
---------------------------------

    Attachment: InstanceCallbackAnnotations-1.0.patch

Attached patch contains annotations.  TCK tests TBD.

> Add annotations for instance callbacks
> --------------------------------------
>
>                 Key: JDO-638
>                 URL: https://issues.apache.org/jira/browse/JDO-638
>             Project: JDO
>          Issue Type: Improvement
>          Components: api2
>            Reporter: Matthew T. Adams
>            Priority: Minor
>         Attachments: InstanceCallbackAnnotations-1.0.patch
>
>
> The current JDO annotations in javax.jdo.annotations do not include annotations equivalent to instance callbacks.  We should add method annotations for each method in javax.jdo.InstanceCallback.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.