summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2003-12-01 09:48:44 +0000
committerRüdiger Timm <rt@openoffice.org>2003-12-01 09:48:44 +0000
commitec95c8e1873f5e35178cca28d97473685e19e4ab (patch)
tree7b372bf8391e9290eee8a48c16ee518ce32bb24f /connectivity
parent208f66602cbd183b16d7655edf5215f2daf3061d (diff)
INTEGRATION: CWS geordi2q10 (1.15.56); FILE MERGED
2003/11/28 09:38:58 rt 1.15.56.1: #111934#: join CWS dba01pp1
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/jdbc/Object.cxx12
1 files changed, 8 insertions, 4 deletions
diff --git a/connectivity/source/drivers/jdbc/Object.cxx b/connectivity/source/drivers/jdbc/Object.cxx
index b17c3a802289..3c713abffaf3 100644
--- a/connectivity/source/drivers/jdbc/Object.cxx
+++ b/connectivity/source/drivers/jdbc/Object.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: Object.cxx,v $
*
- * $Revision: 1.15 $
+ * $Revision: 1.16 $
*
- * last change: $Author: vg $ $Date: 2003-06-25 11:06:13 $
+ * last change: $Author: rt $ $Date: 2003-12-01 10:48:44 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -170,9 +170,11 @@ using namespace ::com::sun::star::lang;
}
// -----------------------------------------------------------------------------
SDBThreadAttach::SDBThreadAttach()
- : m_aGuard(java_lang_Object::getVM())
+ : pEnv(NULL)
{
- pEnv = m_aGuard.getEnvironment();
+ m_aGuard = ::std::auto_ptr< jvmaccess::VirtualMachine::AttachGuard>(new jvmaccess::VirtualMachine::AttachGuard(java_lang_Object::getVM()) );
+ if ( m_aGuard.get() )
+ pEnv = m_aGuard->getEnvironment();
}
// -----------------------------------------------------------------------------
SDBThreadAttach::~SDBThreadAttach()
@@ -323,6 +325,8 @@ void java_lang_Object::ThrowSQLException(JNIEnv * pEnv,const Reference< XInterfa
delete pThrow;
throw SQLException(aMsg,_rContext,::rtl::OUString(),-1,Any());
}
+ else
+ pEnv->DeleteLocalRef( jThrow );
}
}