-
1. Re: Posting Again: Can Servlet automatically listen to user-
robisz Oct 26, 2004 6:10 AM (in response to poojac20)You can configure a connector on port 7001.
Check your_jboss_conf/deploy/jbossweb-tomcat50.sar/server.xml.
But if you want to use HttpServlet you must access it through
http protocol, of course. But it can't be a problem. See URL and
HttpURLConnection classes in J2SE API documentation. -
2. Re: Posting Again: Can Servlet automatically listen to user-
poojac20 Oct 27, 2004 2:10 AM (in response to poojac20)Thanx robisz.
Understood this connector thing now.
But about using HttpURLConnection, in my case, this will not be possible - my client is a pos terminal which dials on to a modem and which then passes on to some server's specific port. Including a URL is not possible in this scenario.
I am trying this out - do u think if I extend GenericServlet and write something on my own, that may help - will i still need to access the servlet through some URL? Or I can then expect an automatic call to my process function? -
3. Re: Posting Again: Can Servlet automatically listen to user-
robisz Oct 27, 2004 3:16 AM (in response to poojac20)It's possible to write non-http servlet, but you need an
appropriate servlet container that can handle it.
Are you sure you want to use J2EE?
As I see, all you need is a plain TCP/IP socket. -
4. Re: Posting Again: Can Servlet automatically listen to user-
poojac20 Oct 27, 2004 8:04 AM (in response to poojac20)
Actually, I have most of the business logic already available as EJBs.
Hence J2ee as back end is already there.
I need to use these EJBs and am trying to avoid RMI calls through another home-made server.
And then I also thought IF JBoss can manage multiple sockets/threads/clients on its own , then I can avoid this work.
It seems Connector can achieve this multiple socket management .. am i right? So the next question is can a servlet (or something else from which I can call EJBs) be automatically called by the container when request comes on a certain port?
Thanx for the help.