You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by James Chang <jc...@hotmail.com> on 2003/01/27 23:23:13 UTC

Re: using ajp (isapi_redirector2.dll) without tomcat on IIS (is_inited =0 in HttpExtensionProc)

Hi,

    Here is more information I got.  It looks like what happened is, the
socket open and data sending is done in HttpExtensionProc,
However the static int is_inited is always 0 when that function is called.
However is_inited is been set to 1 upon dll initialization by another
thread,
and when HttpFilterProc is called by IIS, the is_inited is 1.

    Almost looks like the 2 functions (filterProc and ExtensionProc) is been
called from 2 different stack frame from IIS, but when the address
of the variable is the same (XP virtual memory trick?).

    I am using windows XP Pro latest patch (as of jan 27, 2003) and IIS
5.01.
    Anybody got any ideas?

    Thanks


----- Original Message -----
From: "James Chang" <jc...@hotmail.com>
To: "Tomcat Developers List" <to...@jakarta.apache.org>
Sent: Monday, January 27, 2003 2:02 PM
Subject: using ajp (isapi_redirector2.dll) without tomcat on IIS


I have downloaded apache binary dist and the ajp connector source, and
builded the IIS redirector (It was rather strange that apr.h is in apache
binary dist but not in the apache source release).

What I found with debug messages is,  HttpFilterProc() is called with I
request http://localhost/examples/xxxxx, which means the dll is installed
correctly and the configuration files are correct (mappings and etc).
However there is no line of code in HttpFilterProc() that actually calls
anything to open the socket and send data.  I checked several possible
functions to see if they are the ones who send data, but all turn out to be
some string manipulation functions.

Could someone tell me which function call in HttpFilterProc actaully result
in open socket to 8009 port?

Thanks

----- Original Message -----
From: "James Chang" <jc...@hotmail.com>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Cc: <jc...@hotmail.com>
Sent: Sunday, January 26, 2003 8:53 PM
Subject: using ajp without tomcat


> Hi:
>
>     I am trying to get ajp to work for other jsp/servlet engines other
then
> tomcat.   Right now I am working on IIS with isapi_redirector2.dll and
> listening on port 8009 with my own ajp listener.
>
>     I downloaded isapi_redirector2.dll from:
>
http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk2/release/v2.0.
> 2/bin/win32/
>
>     set up the registry settings and use the simple works2.properties file
> below.  IIS shows the dll is loaded correctly, but when I try to request
to
> http://localhost/examples/xxxxx , the isapi_redirector2.dll doesn't send
any
> request to port 8009.
>
>     Could anyone tell me what is wrong with my configuration file?  Or is
> the dll somehow need tomcat to work (I have set it to use socket, but
maybe
> the dll needs some configuration file or shared library from tomcat)??
>
>     Any pointer will be usefull.
>     Thanks!
>
>
>     the registry I used is:
> REGEDIT4
>
> [HKEY_LOCAL_MACHINE\SOFTWARE\Apache Software Foundation\Jakarta Isapi
> Redirector\2.0]
> "serverRoot"="d:\\tm"
> "extensionUri"="/jakarta/isapi_redirector2.dll"
> "workersFile"="D:\\shared\\iisredir\\workers2.properties"
> "authComplete"="0"
> "threadPool"="5"
>
>     All strings are properly installed.
>
>
> My workers2.properties file contains:
>
> # Define the communication channel
> [channel.socket:localhost:8009]
> info=Ajp13 forwarding over socket
> tomcatId=localhost:8009

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Help: Why HttpFilterProc and HttpExtensionsProc on 2 different process in isapi_redirector2.dll?

Posted by James Chang <jc...@hotmail.com>.
Hi,

       System: windows XP pro, IIS 5.1.   isapi_redirector2.dll is not doing
its job.
        isapi_redirector2.dll from:
http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk2/release/v2.0.
2/bin/win32/

        What happened is, when IIS starts up, it calls dll_Main for all its
threads and calls GetVersion() 1 time, in the function isapi_redirector2.dll
initializes everything and set is_inited to TRUE.  All those happens in one
process (the same process IIS calls HttpFilterProc).

    However when the match is found and the redirector tries to call Tomcat,
IIS calls HttpExtensionProc from ANOTHER process, basically in this process
nothing is initialized (the process id get by GetCurrentProcessId() is
different from the first process).

    Anyone got any ideas?

    Thanks



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>