Hi
Yes, I am using a java program using threads to create the concurrent
requests.
Ok I have done some more testing
This is the method I am calling, I am using a synchronized bean that
holds the number of concurrent accesses to this method, which prints out
concurrent accesses and waits 10 seconds.
private static SynchronizedBean concurrent = new SynchronizedBean();
@WebMethod
public void tenSeconds() {
try {
concurrent.add();
System.out.println("CONCURRENT
"+concurrent.getCONCURRENT());
Thread.sleep(10000);
} catch (InterruptedException ex) {
System.out.println(ex);
} finally {
concurrent.minus();
}
}
When I run some client java program to create say, 30 requests, I get
these results.
Via EJB Remote Calls: 11s (# concurrent 30)
Via Web Service Calls: 60 s (# concurrent 5)
40 requests
Via EJB Remote Calls: 15s (# concurrent 40)
Via Web Service Calls: 80 s (# concurrent 5)
Basically, the ejb calls can run the method concurrently and works as
you would expect, creating the correct amount of beans in the pool.
But the Web Service call only ever hits 5 concurrent (I know I said 10
in my last email, but I was using my laptop for my last tests and that's
dual core, if that makes any difference). So basically the web service
call handles the requests sequentially in 5s.
Why is this, can I configure glassfish to improve this performance?
Glen
-----Original Message-----
From: glassfish_at_javadesktop.org [mailto:glassfish_at_javadesktop.org]
Sent: 18 October 2007 22:27
To: users_at_glassfish.dev.java.net
Subject: Re: Question about EJB concurrent behaviour
Which client are you using? We have seen that a browser typically
doesn't send more than 2 requests (even if you have multiple tabs) if
the requests are going to the same URL.
In other words the client may not be actually making 20 or 30 requests
concurrently.
One way to test this is to write a simple java program that talks
directly to the beans. You will see that the appserver indeed creates
upto max-pool-size beans.
Thanks.
[Message sent by forum member 'mk111283' (mk111283)]
http://forums.java.net/jive/thread.jspa?messageID=241051
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
For additional commands, e-mail: users-help_at_glassfish.dev.java.net