> I have trial version of Java Web Server 2.0. Whenever an html form is
> submitted, a servlet is called (which inturn calls a dll). It does not
> work fine if the html form is submitted by more than one users
> simultaneously. The Web server crashes.  Can someone help me out?
>
It seems, that either the DLL is not written to be reentrant. What do
you want to do with the DLL? If you have written the DLL yourself:

did you make the code reentrant? If not, and you have no chance to do that:
(1) Did you test the DLL without the Java Web Server with multiple
    threads? (Be aware of Native or Green threads!) If it doesn't work
    either the problem is the DLL and not the Java Web Server

Workarounds:
(2) One way would be to use only static synchronized methods
    of a single class to access the functions of the DLL.
    So you have no interleaving method calls.
(3) More restrictive: you can lock the DLL at the beginning of its usage
    within a servlet and then unlock it after the usage. Of course this
    would be more restrictive than in (1) and somewhat tricky to handle
    in case of servlet exceptions ... but that depends on the usage.
(4) Check the behavior of the DLL functions and try to figure out what the
    real problem is. Then try to find a more sophisticated workaround ...

Hope it helps - regards,
                        Simon

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to