tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@apache.org
Subject cvs commit: jakarta-tomcat-connectors/jk/java/org/apache/jk/common ChannelJni.java ChannelUn.java Shm.java
Date Thu, 18 Apr 2002 17:44:49 GMT
costin      02/04/18 10:44:49

  Modified:    jk/java/org/apache/jk/common ChannelJni.java ChannelUn.java
                        Shm.java
  Log:
  Deal with APR not available gracefully ( with a simple message ).
  
  If libapr.so and libjkjni.so are not in LD_LIBRARY_PATH, all native
  functions will be disabled.
  
  If it is - we'll use them. No configuration required ( except if you want
  to change the defaults - which should be reasonable )
  
  Revision  Changes    Path
  1.7       +1 -2      jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelJni.java
  
  Index: ChannelJni.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelJni.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ChannelJni.java	17 Apr 2002 22:37:50 -0000	1.6
  +++ ChannelJni.java	18 Apr 2002 17:44:49 -0000	1.7
  @@ -84,13 +84,12 @@
       public ChannelJni() {
           // we use static for now, it's easier on the C side.
           // Easy to change after we get everything working
  -        log.info("Created channel jni ");
       }
   
       public void init() throws IOException {
           // static field init, temp
           apr=(AprImpl)wEnv.getHandler("apr");
  -        if( apr==null ) { 
  +        if( apr==null || ! apr.isLoaded() ) { 
               log.error("No apr, disabling jni channel ");
               return;
           }
  
  
  
  1.13      +6 -1      jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelUn.java
  
  Index: ChannelUn.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/ChannelUn.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- ChannelUn.java	17 Apr 2002 22:38:16 -0000	1.12
  +++ ChannelUn.java	18 Apr 2002 17:44:49 -0000	1.13
  @@ -127,8 +127,13 @@
   
       public void init() throws IOException {
           apr=(AprImpl)wEnv.getHandler("apr");
  -        if( apr==null ) {
  +        if( apr==null || ! apr.isLoaded() ) {
               log.error("Apr is not available, disabling unix channel ");
  +            apr=null;
  +            return;
  +        }
  +        if( file==null ) {
  +            log.error("No file, disabling unix channel");
               return;
           }
           if( next==null ) {
  
  
  
  1.2       +3 -2      jakarta-tomcat-connectors/jk/java/org/apache/jk/common/Shm.java
  
  Index: Shm.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/java/org/apache/jk/common/Shm.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Shm.java	17 Apr 2002 22:36:04 -0000	1.1
  +++ Shm.java	18 Apr 2002 17:44:49 -0000	1.2
  @@ -108,8 +108,9 @@
           }
           try {
               apr=(AprImpl)wEnv.getHandler("apr");
  -            if( apr==null ) {
  +            if( apr==null || ! apr.isLoaded() ) {
                   log.error( "Apr unavailable, disabling shared memory " );
  +                apr=null;
                   return;
               }
   
  @@ -119,7 +120,7 @@
   
               if( aprShmP== 0 ) {
                   // no shared mem. This is normal result, but create should throw
  -                log.info("Can't attach, try to create ");
  +                log.info("Can't attach, try to create " + file );
               }
               
               //XXX not implemented.
  
  
  

--
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