This discussion is archived
2 Replies Latest reply: Jan 7, 2013 2:13 PM by 841361 RSS

SOCKET in java EE on a glassfish/tomcat/apache server?

893337 Newbie
Currently Being Moderated
As the title suggests: I wanna play with a socket in glassfish/ tomcat/ apache in Java EE. The specification is that it should be a pure socket! (not http socket) because I will have compatibility issues otherwise. Is this possible?
If so, then please give me a starting point (I'm pretty good with Java SE, never worked with EE and I rarely interacted with the "networking" side of Java).

I've used sockets before in Java but this is an extremely specific problem since I will use an apache/ tomcat/ glassfish server in Java and i will have a C / C++ client app talking to it.
  • 1. Re: SOCKET in java EE on a glassfish/tomcat/apache server?
    gimbal2 Guru
    Currently Being Moderated
    I don't even know what a "http socket" is. I had the crazy idea that HTTP was some sort of Protocol.

    JavaEE is just a specification, at heart it is just "java" with a pile of APIs bolted around it and a piece of server software to wire it all together. So yeah you can open up a socket; you even have free choice if that is going to be a TCP or an UDP socket, old IO or new IO. The problem is not in opening a socket, the problem is going to be in how you design your application such that you can do it and manage it in the context of a JavaEE container. But you'll run into that sooner or later.
  • 2. Re: SOCKET in java EE on a glassfish/tomcat/apache server?
    841361 Newbie
    Currently Being Moderated
    Thanks for throwing some light on this term "Http sokcet"
    I have worked on TCP and UDP socket's but never heard of this.


  • Correct Answers - 10 points
  • Helpful Answers - 5 points