diff options
author | Oliver Bolte <obo@openoffice.org> | 2005-07-07 09:52:55 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2005-07-07 09:52:55 +0000 |
commit | 7499cffb6c48d0e7cbe98ce09195772abfdc593a (patch) | |
tree | ece8afbef0021efc419bbd30358ca2960c40a5b4 | |
parent | fa57d311e5a114f18e2ed7b5ef58270080352d57 (diff) |
INTEGRATION: CWS sb33 (1.2.200); FILE MERGED
2005/06/30 15:22:10 sb 1.2.200.2: #120220# Minor simplification.
2005/06/30 14:53:45 sb 1.2.200.1: #120220# Adapted to changed uno_getEnvironment(..., java, pContext).
-rw-r--r-- | bridges/test/java_uno/any/transport.cxx | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/bridges/test/java_uno/any/transport.cxx b/bridges/test/java_uno/any/transport.cxx index a5125e865297..877b009c4ae9 100644 --- a/bridges/test/java_uno/any/transport.cxx +++ b/bridges/test/java_uno/any/transport.cxx @@ -2,9 +2,9 @@ * * $RCSfile: transport.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: hr $ $Date: 2003-03-18 19:07:19 $ + * last change: $Author: obo $ $Date: 2005-07-07 10:52:55 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -64,6 +64,7 @@ #include "uno/mapping.hxx" #include "uno/environment.hxx" #include "jvmaccess/virtualmachine.hxx" +#include "jvmaccess/unovirtualmachine.hxx" #include "cppuhelper/implbase1.hxx" #include "test/java_uno/anytest/XTransport.hpp" @@ -93,7 +94,7 @@ Any Transport::mapAny( Any const & any ) //################################################################################################## extern "C" JNIEXPORT jobject JNICALL Java_test_java_1uno_anytest_TestJni_create_1jni_1transport( - JNIEnv * jni_env, jclass ) + JNIEnv * jni_env, jclass, jobject loader ) SAL_THROW_EXTERN_C() { // publish some idl types @@ -106,8 +107,16 @@ extern "C" JNIEXPORT jobject JNICALL Java_test_java_1uno_anytest_TestJni_create_ JavaVM * java_vm; OSL_VERIFY( 0 == jni_env->GetJavaVM( &java_vm ) ); // create jvmaccess vm - ::rtl::Reference< ::jvmaccess::VirtualMachine > vm( - new ::jvmaccess::VirtualMachine( java_vm, JNI_VERSION_1_2, false, jni_env ) ); + ::rtl::Reference< ::jvmaccess::UnoVirtualMachine > vm; + try { + vm = new ::jvmaccess::UnoVirtualMachine( + new ::jvmaccess::VirtualMachine( + java_vm, JNI_VERSION_1_2, false, jni_env ), + loader ); + } catch ( ::jvmaccess::UnoVirtualMachine::CreationException & ) { + OSL_ASSERT( false ); + throw; + } // create uno envs OUString java_name( RTL_CONSTASCII_USTRINGPARAM(UNO_LB_JAVA) ); OUString cpp_name( RTL_CONSTASCII_USTRINGPARAM(CPPU_CURRENT_LANGUAGE_BINDING_NAME) ); |