db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Vandahl (JIRA)" <j...@apache.org>
Subject [jira] Commented: (TORQUE-79) TorqueInstance.getConnection should throw an interpretable error message if Torque is not initialized
Date Thu, 25 Jan 2007 07:56:49 GMT

    [ https://issues.apache.org/jira/browse/TORQUE-79?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12467274
] 

Thomas Vandahl commented on TORQUE-79:
--------------------------------------

As far as I can tell, all access to the TorqueInstance goes thru Torque.getInstance(), doesn't
it? Wouldn't it be better to place the check there? Maybe one could start initialization automatically,
there are places inside Torque where something similar is already done. What do you think?


> TorqueInstance.getConnection should throw an interpretable error message if Torque is
not initialized
> -----------------------------------------------------------------------------------------------------
>
>                 Key: TORQUE-79
>                 URL: https://issues.apache.org/jira/browse/TORQUE-79
>             Project: Torque
>          Issue Type: Improvement
>          Components: Runtime
>    Affects Versions: 3.3-RC1
>            Reporter: Thomas Fischer
>         Assigned To: Thomas Fischer
>            Priority: Trivial
>             Fix For: 4.0
>
>
> From the users mailing list, if Torque.getConection() is called and Torque is not initiialized,
the error message is now 
> java.lang.NullPointerException: There was no DataSourceFactory configured for the connection
XXX
>          at org.apache.torque.TorqueInstance.getConnection(TorqueInstance.java:711)
>          at org.apache.torque.Torque.getConnection(Torque.java:268)
>          at org.apache.torque.util.Transaction.beginOptional(Transaction.java:80)
>          at org.apache.torque.util.Transaction.begin(Transaction.java:62)
> .....
> There should be a check whether Torque is initialized, and an exception thrown which
says that Torque is not initialized if it is not.
> This issue does not block the release of Torque-3.3-RC2

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


Mime
View raw message