2 Replies Latest reply on Feb 16, 2005 12:15 PM by thomas.diesler

    ejb / jbossws threading problems

      Hi all..

      We have a stateless EJB that both exposes an SEI and consumes an external web-service. Both client and server stubs have been generated from existing wsdls using wscompile/etc... When loading-testing with 1 thread we have no problems, but as soon as we move up to multiple threads we get stocastic errors in our EJB related to the invocations it makes to the external services; the invocations either return null or throw internal null-pointer exceptions in jboss/axis classes. The invocation actually never "leaves" jboss, ie our external services are never invoked.

      (The external services we are invoking show no signs of any problems and we have also load-tested them individually with up to 50 threads without any problems.)

      please anyone.. this is a stopper for us :-)

      /Ole

        • 1. Re: ejb / jbossws threading problems

          ok.. fault was mine (as usual :-)..

          we shared the created client stub between our threaded ejb's. It seems the client is not threadsafe.. when we created dedicated clients for each ejb we got no more errors.. (should it be threadsafe?)

          another (minor) problem that showed up was that looking up a ws client does not seem to be thread-safe, ie jndiContext.lookup( "my ws service-ref" ) fails if run in multiple threads. bug?

          regards!

          /ole

          • 2. Re: ejb / jbossws threading problems
            thomas.diesler

            A jaxrpc Call object is a stateful construct, hence it is not threadsafe. Each client needs to use its own Call.

            The lookup of the Service should be threadsafe. What is the exception that you are seeing?