Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JAX-RPC question clarification

 
Divya Gehlot
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I need calrification for the following question.

which two are true about JAX-RPC web services?(choose two)
1.EJB based endpoints are always invoked one thread at a time.
2.servlet based endpoints are always invoked one thread at a time.
3.EJB based endpoints may be invoked by multiple threads at the same time.
4.Servlet based endpoints may be invoked by multiple threads at the same time.
Answer:1,4
My opinion correct answer could be:2,3
As far as I know EJB endpoints supports multiple thread transactions where servlet end points doesnt.
Am I in right track?
Please calirfy me.
Thanks in advance.
 
Sumeet Raheja
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In EJB endpoint there are Session Bean which are stored in a Pool and invocation is done on any Bean which is free and available in the Pool so it is NOT multithreaded as for "n" number of request "n" number of Bean wll be used from the pool hence option <B>1</B> is true

For Servlet based endpoint , it is always One instance of servlet which handles "n" number of request so it is Multithreaded in nature hence option <B>4</B> is true
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic