*not part of the build*

fix for 90573


git-svn-id: svn://10.0.0.236/trunk@99224 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
idk%eng.sun.com
2001-07-13 22:14:57 +00:00
parent db7a14cab5
commit 0947413732
5 changed files with 49 additions and 14 deletions

View File

@@ -40,6 +40,8 @@ PRLogModuleInfo* bcJavaGlobal::log = NULL;
static int counter = 0;
JNIEnv * bcJavaGlobal::GetJNIEnv(int *detachRequired) {
PRLogModuleInfo * l = GetLog();
PR_LOG(l,PR_LOG_DEBUG,("--bcJavaGlobal::GetJNIEnv\n"));
JNIEnv * env;
int res;
*detachRequired = 1;
@@ -53,7 +55,7 @@ JNIEnv * bcJavaGlobal::GetJNIEnv(int *detachRequired) {
} else {
res = jvm->AttachCurrentThread(JNIENV &env,NULL);
#ifdef DEBUG_idk
printf("--bcJavaGlobal::GetJNIEnv ++counter %d\n",++counter);
PR_LOG(l,PR_LOG_DEBUG,("--bcJavaGlobal::GetJNIEnv ++counter %d\n",++counter));
#endif
}
}
@@ -61,11 +63,13 @@ JNIEnv * bcJavaGlobal::GetJNIEnv(int *detachRequired) {
}
void bcJavaGlobal::ReleaseJNIEnv() {
PRLogModuleInfo * l = GetLog();
PR_LOG(l,PR_LOG_DEBUG,("--bcJavaGlobal::ReleaseJNIEnv\n"));
int res;
if (jvm) {
res = jvm->DetachCurrentThread();
#ifdef DEBUG_idk
printf("--bcJavaGlobal::ReleaseJNIEnv --counter %d\n",--counter);
PR_LOG(l,PR_LOG_DEBUG,("--bcJavaGlobal::ReleaseJNIEnv --counter %d\n",--counter));
#endif
}
}

View File

@@ -198,6 +198,7 @@ NS_IMETHODIMP bcJavaStubsAndProxies::GetOID(char *location, bcOID *oid) {
//location[strlen(location)-5] = 0; //nb dirty hack. location is xyz.jar.info
strcpy(location + strlen(location)-4,"comp");
jstring jstr = env->NewStringUTF(location);
strcpy(location + strlen(location)-4,"info");
jobject object = env->CallStaticObjectMethod(componentLoader, loadComponentID, jstr);
bcIStub *stub = new bcJavaStub(object);
NS_WITH_SERVICE(bcIORBComponent,_orb,kORBComponent,&result);