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
Joined: Feb 22, 2002
Posts: 1551
posted
0
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
Joined: Nov 19, 2000
Posts: 1309
posted
0
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
Joined: Jul 10, 2002
Posts: 10
posted
0
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
Joined: Jul 10, 2002
Posts: 10
posted
0
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
Joined: Nov 19, 2000
Posts: 1309
posted
0
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.