[jira] Commented: (TORQUE-79) TorqueInstance.getConnection should throw an interpretable error message if Torque is not initialized

2007-01-26 Thread Thomas Fischer (JIRA)

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

Thomas Fischer commented on TORQUE-79:
--

But Torque,init() also passes through Torque.getInstance(), so if you check 
there, you cannot initialize any more. Besides, I'd think that one should be 
able to use Torque without the static facade one day, so I'd rather not put 
functionality in there.
What do you mean by "automatic initialization" ? I cannot see from where Torque 
should guess the db url, username and password ?

> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[jira] Commented: (TORQUE-79) TorqueInstance.getConnection should throw an interpretable error message if Torque is not initialized

2007-01-24 Thread Thomas Vandahl (JIRA)

[ 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]