tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/jk/native2/common jk_vm_default.c
Date Mon, 01 Jul 2002 15:45:20 GMT
mturk       2002/07/01 08:45:20

  Modified:    jk/native2/common jk_vm_default.c
  Log:
  Add the destroy callback that calls the DestroyJavaVM
  
  Revision  Changes    Path
  1.19      +20 -0     jakarta-tomcat-connectors/jk/native2/common/jk_vm_default.c
  
  Index: jk_vm_default.c
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native2/common/jk_vm_default.c,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- jk_vm_default.c	11 Jun 2002 21:19:31 -0000	1.18
  +++ jk_vm_default.c	1 Jul 2002 15:45:20 -0000	1.19
  @@ -613,6 +613,25 @@
       return JK_OK;
   }
   
  +static void jk2_vm_destroy(jk_env_t *env, jk_vm_t *jkvm)
  +{
  +    int err;
  +    JavaVM *jvm = (JavaVM *)jkvm->jvm;
  +    
  +    if( jvm == NULL ) {
  +        return;
  +    }
  +
  +    err= (*jvm)->DestroyJavaVM(jvm);
  +    if(err == 0 ) {
  +        env->l->jkLog(env, env->l, JK_LOG_INFO, 
  +                      "vm.destroy() ok\n");
  +    } else {
  +        env->l->jkLog(env, env->l, JK_LOG_ERROR, 
  +                      "vm.destroy() cannot destroy the JVM.\n");
  +    }
  +}
  +
   static int JK_METHOD
   jk2_jk_vm_setProperty(jk_env_t *env, jk_bean_t *mbean, char *name, void *valueP )
   {
  @@ -649,6 +668,7 @@
       jkvm->init=jk2_vm_initVM;
       jkvm->attach=jk2_vm_attach;
       jkvm->detach=jk2_vm_detach;
  +    jkvm->destroy=jk2_vm_destroy;
       
       result->object=jkvm;
       result->setAttribute=jk2_jk_vm_setProperty;
  
  
  

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message