This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes SCEA I -- Protocol Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "SCEA I -- Protocol" Watch "SCEA I -- Protocol" New topic
Author

SCEA I -- Protocol

JiaPei Jen
Ranch Hand

Joined: Nov 19, 2000
Posts: 1309
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
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
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
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
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
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.
 
Don't get me started about those stupid light bulbs.
 
subject: SCEA I -- Protocol
 
Similar Threads
Socket Sending and Recieving at same Time?
Running a client/server apllication
socket programming on 2 ports
simple socket mechanism
Doubt in ServerSocket and Socket