You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by "Thomas Fox (JIRA)" <ji...@apache.org> on 2010/10/28 20:34:21 UTC

[jira] Created: (TORQUE-153) Fail if null connection is supplied to a method

Fail if null connection is supplied to a method
-----------------------------------------------

                 Key: TORQUE-153
                 URL: https://issues.apache.org/jira/browse/TORQUE-153
             Project: Torque
          Issue Type: Improvement
          Components: Runtime
            Reporter: Thomas Fox


Current behaviour: Methods with a connection argument silently fetch a new connection if the passed connection is null
New behaviour: These methods should throw an exception if the passed connection is null
Rationale: these methods will be only needed if a method should be executed in a transaction context. If one assumes that a transaction is open (connection is not null), but it is not (connection == null), it is a bad idea to silently start one as this behaviour is very difficult to tell from the correct one. A clean failure is much easier to test for.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


[jira] [Closed] (TORQUE-153) Fail if null connection is supplied to a method

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

Thomas Fox closed TORQUE-153.
-----------------------------

    
> Fail if null connection is supplied to a method
> -----------------------------------------------
>
>                 Key: TORQUE-153
>                 URL: https://issues.apache.org/jira/browse/TORQUE-153
>             Project: Torque
>          Issue Type: Improvement
>          Components: Runtime
>            Reporter: Thomas Fox
>            Assignee: Thomas Fox
>             Fix For: 4.0-beta1
>
>
> Current behaviour: Methods with a connection argument silently fetch a new connection if the passed connection is null
> New behaviour: These methods should throw an exception if the passed connection is null
> Rationale: these methods will be only needed if a method should be executed in a transaction context. If one assumes that a transaction is open (connection is not null), but it is not (connection == null), it is a bad idea to silently start one as this behaviour is very difficult to tell from the correct one. A clean failure is much easier to test for.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


[jira] Assigned: (TORQUE-153) Fail if null connection is supplied to a method

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

Thomas Fox reassigned TORQUE-153:
---------------------------------

    Assignee: Thomas Fox

> Fail if null connection is supplied to a method
> -----------------------------------------------
>
>                 Key: TORQUE-153
>                 URL: https://issues.apache.org/jira/browse/TORQUE-153
>             Project: Torque
>          Issue Type: Improvement
>          Components: Runtime
>            Reporter: Thomas Fox
>            Assignee: Thomas Fox
>
> Current behaviour: Methods with a connection argument silently fetch a new connection if the passed connection is null
> New behaviour: These methods should throw an exception if the passed connection is null
> Rationale: these methods will be only needed if a method should be executed in a transaction context. If one assumes that a transaction is open (connection is not null), but it is not (connection == null), it is a bad idea to silently start one as this behaviour is very difficult to tell from the correct one. A clean failure is much easier to test for.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


[jira] [Resolved] (TORQUE-153) Fail if null connection is supplied to a method

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

Thomas Fox resolved TORQUE-153.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 4.0

All methods in BasePeer and the generated Peer classe should now use the behaviour.Only known exception is the IdBroker where the behaviour has always been configurable and is left as it is.

> Fail if null connection is supplied to a method
> -----------------------------------------------
>
>                 Key: TORQUE-153
>                 URL: https://issues.apache.org/jira/browse/TORQUE-153
>             Project: Torque
>          Issue Type: Improvement
>          Components: Runtime
>            Reporter: Thomas Fox
>            Assignee: Thomas Fox
>             Fix For: 4.0
>
>
> Current behaviour: Methods with a connection argument silently fetch a new connection if the passed connection is null
> New behaviour: These methods should throw an exception if the passed connection is null
> Rationale: these methods will be only needed if a method should be executed in a transaction context. If one assumes that a transaction is open (connection is not null), but it is not (connection == null), it is a bad idea to silently start one as this behaviour is very difficult to tell from the correct one. A clean failure is much easier to test for.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org