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 tf...@apache.org on 2007/01/26 21:30:35 UTC
svn commit: r500332 - in /db/torque:
runtime/trunk/src/java/org/apache/torque/TorqueInstance.java
site/trunk/xdocs/changes.xml
Author: tfischer
Date: Fri Jan 26 12:30:34 2007
New Revision: 500332
URL: http://svn.apache.org/viewvc?view=rev&rev=500332
Log:
Check whether Torque is initialized in Torque.getInstance(), and throw an interpretable exception if it is not.
Modified:
db/torque/runtime/trunk/src/java/org/apache/torque/TorqueInstance.java
db/torque/site/trunk/xdocs/changes.xml
Modified: db/torque/runtime/trunk/src/java/org/apache/torque/TorqueInstance.java
URL: http://svn.apache.org/viewvc/db/torque/runtime/trunk/src/java/org/apache/torque/TorqueInstance.java?view=diff&rev=500332&r1=500331&r2=500332
==============================================================================
--- db/torque/runtime/trunk/src/java/org/apache/torque/TorqueInstance.java (original)
+++ db/torque/runtime/trunk/src/java/org/apache/torque/TorqueInstance.java Fri Jan 26 12:30:34 2007
@@ -887,6 +887,10 @@
public Connection getConnection(String name)
throws TorqueException
{
+ if (!Torque.isInit())
+ {
+ throw new TorqueException("Torque is not initialized");
+ }
try
{
return getDatabase(name)
@@ -946,6 +950,10 @@
String password)
throws TorqueException
{
+ if (!Torque.isInit())
+ {
+ throw new TorqueException("Torque is not initialized");
+ }
try
{
return getDataSourceFactory(name)
Modified: db/torque/site/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/db/torque/site/trunk/xdocs/changes.xml?view=diff&rev=500332&r1=500331&r2=500332
==============================================================================
--- db/torque/site/trunk/xdocs/changes.xml (original)
+++ db/torque/site/trunk/xdocs/changes.xml Fri Jan 26 12:30:34 2007
@@ -32,6 +32,10 @@
<body>
<release version="3.3" date="in SVN">
+ <action type="add" dev="tfischer" issue="TORQUE-79">
+ Added check whether Torque is initialized in Torque.getConnection().
+ If Torque is not initialized, a corresponding TorqueException is thrown;
+ </action>
<action type="add" dev="tfischer">
The maven 2 plugin generates the non-base classes into a different
directory than the base classes. This behaviour can also be configured for
---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org