This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SCEA I -- Protocol

 
JiaPei Jen
Ranch Hand
Posts: 1309
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have read that if we use HTTP, "the client will be prevented from running a socket server". I do not quite understand this sentence. What kind of client and what socket server does this sentence mean?
 
Rufus BugleWeed
Ranch Hand
Posts: 1551
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The client applet can only open a connction to the originating host. This is to prevent rogue servers from attempting to use the client as an agent in a denial of service attack.
 
JiaPei Jen
Ranch Hand
Posts: 1309
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply. Again, I have read somewhere says that "socket server is forbidden by EJB". I do not understand. Could anybody kindly explain it?
 
Emil Kirschner
Greenhorn
Posts: 10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by JiaPei Jen:
Thanks for the reply. Again, I have read somewhere says that "socket server is forbidden by EJB". I do not understand. Could anybody kindly explain it?

it means that the EJB spex do not allow you to create a server socket and listen to it (the create/bind/listen/accept sequence) and that is beacause the thread that listens for connections on your socket would block until a connection comes in and this would prevent the app server to properly manage the available pool of threads. basically, a thread is blocked without anything usefull happening there, which is a waste of resources.
 
Emil Kirschner
Greenhorn
Posts: 10
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Emil Kirschner:

it means that the EJB spex do not allow you to create a server socket and listen to it (the create/bind/listen/accept sequence) and that is beacause the thread that listens for connections on your socket would block until a connection comes in and this would prevent the app server to properly manage the available pool of threads. basically, a thread is blocked without anything usefull happening there, which is a waste of resources.

I meant that in the context of an EJBean.
 
JiaPei Jen
Ranch Hand
Posts: 1309
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I really benefit from this knowledge sharing. If you could bear me with more questions:
Q1. Is it true that signed/policy-compliant applets can run a socket server over HTTP?
Q2. Can servlet or JSP create a socket server?
Thanks in advance.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic