      }
  
    OCIHandleFree(_current_stm, OCI_HTYPE_STMT);
-@@ -138,6 +141,14 @@
- 	{
- 	  NSLog(@"FAILED: OCITerminate()");
+@@ -75,6 +78,30 @@
+ //
+ @implementation OracleAdaptorChannel
+ 
++static void
++DBTerminate()
++{
++  if (OCITerminate(OCI_DEFAULT))
++    NSLog(@"FAILED: OCITerminate()");
++  else
++    NSLog(@"Oracle8: environment shut down");
++}
++
+++ (void) initialize
++{
++  // We Initialize the OCI process environment.
++  if (OCIInitialize((ub4)OCI_DEFAULT, (dvoid *)0,
++                    (dvoid * (*)(dvoid *, size_t)) 0,
++                    (dvoid * (*)(dvoid *, dvoid *, size_t))0,
++                    (void (*)(dvoid *, dvoid *)) 0 ))
++    NSLog(@"FAILED: OCIInitialize()");
++  else
++    {
++      NSLog(@"Oracle8: environment initialized");
++      atexit(DBTerminate);
++    }
++}
++
+ - (id) initWithAdaptorContext: (EOAdaptorContext *) theAdaptorContext
+ {
+   if ((self = [super initWithAdaptorContext: theAdaptorContext]))
+@@ -134,10 +161,14 @@
+ 	  NSLog(@"FAILED: OCILogoff()");
  	}
+ 
+-      if (OCITerminate(OCI_DEFAULT))
+-	{
+-	  NSLog(@"FAILED: OCITerminate()");
+-	}
 +
 +      OCIHandleFree(_oci_ctx, OCI_HTYPE_SVCCTX);
 +      OCIHandleFree(_oci_err, OCI_HTYPE_ERROR);

 - (NSException *)exceptionForFailedMatch:(unsigned char)_match
   got:(unsigned char)_avail
 {
Index: sope-mime/NGMime/NGMimeBodyPart.m
===================================================================
--- sope-mime/NGMime/NGMimeBodyPart.m	(rvision 1546)

   RELEASE(delegate);
 
   [super dealloc];
@@ -368,15 +394,6 @@
       return NO;
     }
 
-  // We Initialize the OCI process environment.
-  if (OCIInitialize((ub4)OCI_DEFAULT, (dvoid *)0,
-                    (dvoid * (*)(dvoid *, size_t)) 0,
-                    (dvoid * (*)(dvoid *, dvoid *, size_t))0,
-                    (void (*)(dvoid *, dvoid *)) 0 ))
-    {
-      NSLog(@"FAILED: OCIInitialize()");
-      return NO;
-    }
   
   if (OCIEnvInit((OCIEnv **)&_oci_env, (ub4)OCI_DEFAULT, (size_t)0, (dvoid **)0))
     {
Index: sope-gdl1/Oracle8/OracleAdaptorChannelController.m
===================================================================
--- sope-gdl1/Oracle8/OracleAdaptorChannelController.m	(rvision 1546)
