You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by "Dzmitry Kazimirchyk (JIRA)" <ji...@apache.org> on 2011/05/30 12:22:47 UTC

[jira] [Created] (CAY-1573) QueryLogger to DI JdbcEventLogger migration

QueryLogger to DI JdbcEventLogger migration
-------------------------------------------

                 Key: CAY-1573
                 URL: https://issues.apache.org/jira/browse/CAY-1573
             Project: Cayenne
          Issue Type: Improvement
            Reporter: Dzmitry Kazimirchyk
            Priority: Minor
         Attachments: query-logger.patch

Migration from deprecated QueryLogger to DI enabled JdbcEventLogger.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CAY-1573) QueryLogger to DI JdbcEventLogger migration

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

Dzmitry Kazimirchyk updated CAY-1573:
-------------------------------------

    Attachment: query-logger1.patch

Attached patch with corrections for JdbcAdapter..BaseSQLAction chunk. Now initialization with NoopJdbcEventsLogger performed in constructor.
Also, now all classes with direct reference to JdbcAdapter get logger directly from it without many levels of getters and setters.

> QueryLogger to DI JdbcEventLogger migration
> -------------------------------------------
>
>                 Key: CAY-1573
>                 URL: https://issues.apache.org/jira/browse/CAY-1573
>             Project: Cayenne
>          Issue Type: Improvement
>            Reporter: Dzmitry Kazimirchyk
>            Priority: Minor
>         Attachments: query-logger.patch, query-logger.patch, query-logger1.patch
>
>
> Migration from deprecated QueryLogger to DI enabled JdbcEventLogger.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Closed] (CAY-1573) QueryLogger to DI JdbcEventLogger migration

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

Andrus Adamchik closed CAY-1573.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 3.1M3

Both fresh patches applied with some refactoring on my part. Also figured we shouldn't keep QueryLogger around and removed it from Cayenne (this is pretty arbitrary on my part.... maybe we want to keep it for another cycle?)

> QueryLogger to DI JdbcEventLogger migration
> -------------------------------------------
>
>                 Key: CAY-1573
>                 URL: https://issues.apache.org/jira/browse/CAY-1573
>             Project: Cayenne
>          Issue Type: Improvement
>            Reporter: Dzmitry Kazimirchyk
>            Priority: Minor
>             Fix For: 3.1M3
>
>         Attachments: ql-adapters.patch, ql-rest.patch, query-logger.patch, query-logger.patch, query-logger1.patch
>
>
> Migration from deprecated QueryLogger to DI enabled JdbcEventLogger.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAY-1573) QueryLogger to DI JdbcEventLogger migration

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

Dzmitry Kazimirchyk updated CAY-1573:
-------------------------------------

    Attachment: ql-rest.patch
                ql-adapters.patch

Sorry for this, I can't apply it now too.
Attaching separate patches for adapters and for the rest chunk.

> QueryLogger to DI JdbcEventLogger migration
> -------------------------------------------
>
>                 Key: CAY-1573
>                 URL: https://issues.apache.org/jira/browse/CAY-1573
>             Project: Cayenne
>          Issue Type: Improvement
>            Reporter: Dzmitry Kazimirchyk
>            Priority: Minor
>         Attachments: ql-adapters.patch, ql-rest.patch, query-logger.patch, query-logger.patch, query-logger1.patch
>
>
> Migration from deprecated QueryLogger to DI enabled JdbcEventLogger.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAY-1573) QueryLogger to DI JdbcEventLogger migration

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

Dzmitry Kazimirchyk updated CAY-1573:
-------------------------------------

    Attachment: query-logger.patch

> QueryLogger to DI JdbcEventLogger migration
> -------------------------------------------
>
>                 Key: CAY-1573
>                 URL: https://issues.apache.org/jira/browse/CAY-1573
>             Project: Cayenne
>          Issue Type: Improvement
>            Reporter: Dzmitry Kazimirchyk
>            Priority: Minor
>         Attachments: query-logger.patch
>
>
> Migration from deprecated QueryLogger to DI enabled JdbcEventLogger.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CAY-1573) QueryLogger to DI JdbcEventLogger migration

Posted by "Andrus Adamchik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAY-1573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13041831#comment-13041831 ] 

Andrus Adamchik commented on CAY-1573:
--------------------------------------

Thanks for the patch. Having it all in one piece is a bit hard to process, so I tried to separate into manageable pieces. I succeeded somewhat to split somewhat unrelated 20% of the patch and made my first commit with it (r1129909). My main edit to this part (which we may follow  in the remaining parts) is  replacing lazy initialization of the logger in the getter method with eager initialization to NoopJdbcEventLogger in constructor. This appears to be the most safest and non-intrusive way to add logger to most classes.

In the remaining patch (aside from what git removes automatically when rebasing against my commit), we can also remove changes to DataContext, TransactionThreadTest, UserTransactionTest that are no longer needed with the approach above.

The next thing I looked at is JdbcAdapter/JdbcActionBuilder/BaseSQLAction, which seems to be the biggest (and the only?) remaining chunk. Maybe we can also perform with NoopJdbcEventLogger setup in constructor to avoid lazy initialization of the logger... This will give us a fully committable QueryLogger port.  

After that we may further refine it to perfection. The next pass (meaning a separate patch), we may avoid using "setJdbcEventLogger" and use safer constructor injection instead. This will require deeper refactoring so I don't want that to get mixed with any unrelated things.

> QueryLogger to DI JdbcEventLogger migration
> -------------------------------------------
>
>                 Key: CAY-1573
>                 URL: https://issues.apache.org/jira/browse/CAY-1573
>             Project: Cayenne
>          Issue Type: Improvement
>            Reporter: Dzmitry Kazimirchyk
>            Priority: Minor
>         Attachments: query-logger.patch, query-logger.patch
>
>
> Migration from deprecated QueryLogger to DI enabled JdbcEventLogger.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CAY-1573) QueryLogger to DI JdbcEventLogger migration

Posted by "Andrus Adamchik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAY-1573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13060011#comment-13060011 ] 

Andrus Adamchik commented on CAY-1573:
--------------------------------------

Trying the patch from June 1. It doesn't apply at all. Checking the first class in the patch (framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/jdbc/BaseSQLAction.java) - it didn't have changes since March, so this is not a merge conflict. Still the lines are off... I wonder how it was generated? Probably the wrong baseline was used.

> QueryLogger to DI JdbcEventLogger migration
> -------------------------------------------
>
>                 Key: CAY-1573
>                 URL: https://issues.apache.org/jira/browse/CAY-1573
>             Project: Cayenne
>          Issue Type: Improvement
>            Reporter: Dzmitry Kazimirchyk
>            Priority: Minor
>         Attachments: query-logger.patch, query-logger.patch, query-logger1.patch
>
>
> Migration from deprecated QueryLogger to DI enabled JdbcEventLogger.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CAY-1573) QueryLogger to DI JdbcEventLogger migration

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

Dzmitry Kazimirchyk updated CAY-1573:
-------------------------------------

    Attachment: query-logger.patch

> QueryLogger to DI JdbcEventLogger migration
> -------------------------------------------
>
>                 Key: CAY-1573
>                 URL: https://issues.apache.org/jira/browse/CAY-1573
>             Project: Cayenne
>          Issue Type: Improvement
>            Reporter: Dzmitry Kazimirchyk
>            Priority: Minor
>         Attachments: query-logger.patch, query-logger.patch
>
>
> Migration from deprecated QueryLogger to DI enabled JdbcEventLogger.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira