summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/jdbc/Object.cxx
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
commit3a44d525296ca249bd45b0866b35d136241cddf3 (patch)
treed46ef6f607a1ab12f4cc8e53d3ea088e31893ee9 /connectivity/source/drivers/jdbc/Object.cxx
parent00dc82d8ef2975907f84bf616f408aacadfd4c58 (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/source/drivers/jdbc/Object.cxx')
-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 10c357a484..d2d56cd0e2 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 );
}
}