diff options
author | Sam Ruby <rubys@php.net> | 2000-06-27 10:37:40 +0000 |
---|---|---|
committer | Sam Ruby <rubys@php.net> | 2000-06-27 10:37:40 +0000 |
commit | e216b8918e3e0a25e4ae8791dfb31421319160a6 (patch) | |
tree | 2f028bd70b63cc3596cabc5cce9cb652742cc43a /sapi | |
parent | e834812a06786f3d2c5b606c695284a8240134b5 (diff) | |
download | php-git-e216b8918e3e0a25e4ae8791dfb31421319160a6.tar.gz |
defer loading of the native code
Diffstat (limited to 'sapi')
-rw-r--r-- | sapi/servlet/servlet.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sapi/servlet/servlet.java b/sapi/servlet/servlet.java index b69d482e27..c085488309 100644 --- a/sapi/servlet/servlet.java +++ b/sapi/servlet/servlet.java @@ -42,7 +42,6 @@ public class servlet extends HttpServlet { /* native methods */ /******************************************************************/ - static { reflect.loadLibrary("servlet"); } public native void startup(); public native long define(String name); public native void send(String requestMethod, String queryString, @@ -124,7 +123,12 @@ public class servlet extends HttpServlet { public void init(ServletConfig config) throws ServletException { super.init(config); - if (0 == startup_count++) startup(); + + // first time in, initialize native code + if (0 == startup_count++) { + reflect.loadLibrary("servlet"); + startup(); + } // try to find the addHeader method (added in the servlet API 2.2) // otherwise settle for the setHeader method |