cancel
Showing results for 
Search instead for 
Did you mean: 

Netweaver Servlet threading

Former Member
0 Kudos

Hi,

I wrote a servlet in NWDS and deployed it to a dual stack Netweaver 7.3 instance. I am accessing the servlet via a Load-UI test script with the load set to 50. It would appear that Netweaver is only allowing the servlet to process a single thread at a time. If I deploy the same code to a Tomcat server it processes requests concurrently so I know it's not a synchronization issue within the servlet code.

Is there a configuration in Netweaver that controls how many threads are allocated for processing requests for a servlet or something similar which might explain the behavior that I am seeing?  I've checked the properties for ApplicationThreadManager and ThreadManager and all of the thread counts and MaxRQSize, etc are much greater than 1.

Thanks,

Steve

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member45419
Active Contributor
0 Kudos

helo steve,

check below links

http://scn.sap.com/thread/3458683

Regards

Nayeem

Former Member
0 Kudos

That's a link to this post isn't it?

Former Member
0 Kudos

Steve Snodgrass wrote:

It would appear that Netweaver is only allowing the servlet to process a single thread at a time.

Can you provide more information which led you to this conclusion?

Former Member
0 Kudos

Sure.

I first used Wily Introscope to monitor the servlet and the number of concurrent invocations never rises above 1. I didn't trust this reading though so I added some debug code to the servlet as follows.

I have a static AtomicInteger which I increment at the start of the doGet method and decrement at the end of the method. Depending on the query string used to access the servlet it either returns a diagnostic page indicating the value of the AtomicInteger, or it returns a PDF file. When I use Load-UI to test concurrent users I never see the value of the AtomicInteger with a value greater than 1. When I run the same servlet in Tomcat, the value of the AtomicInteger equals the number of concurrent users assigned in my Load-UI test.

Thanks,

Steve

Former Member
0 Kudos

Can you provide source code of your project?

Former Member
0 Kudos

I started to create a scaled down version to post here and realized in doing so that I was wrong. The servlet is being run concurrently. It's just difficult to make it do so in Netweaver. Apparently the servlet executes extremely quickly even when it writes a 5 MB PDF file to the response stream. Netweaver must be buffering it whereas when it runs on Tomcat it seems that it isn't buffered, hence the difference I was seeing between I two. I added a Thread.sleep to the servlet so I could make it run a little longer and then was able to see that it can execute concurrently.

Thanks!

Former Member
0 Kudos
Former Member
0 Kudos

Thank you for the reply. That link appears to be applicable only to Netweaver Portal right?