----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files.  Don't make us guess your problem!!!
----------------------------------------------------------------


Yes Sir. 

However, it gets slightly tricker than that. The TCP
connection is established within a JAR file which is a
library to communicate with a proprietary messaging
system within our company. In other words, I got this
Jar file and I'd like to create my own TCP-Pool
Servlet that works as a gateway to our proprietary
messaging.

/some servlet/ ------->   /my persistent pooling
servlet utilizing the jar library I have been given to
handle communicatio to our messaging system/

On the other hand, I got some help from Murphy's law.
In my case Murphy's law says that whenever I give up
and send an email for help, my program starts working.
That's what happened in this case. I ended up
restarting the apache server, which forced an unload
of the servlet (not the pooling servlet but a servlet
using the messaging JAR file directly) and when the
servlet was loaded again everything worked. So, I am
learning as I go. 

Still, I would like to create a "pooling" servlet
since the library has to set up connections every time
it is called. If I can avoid that, it would help. I am
guessing I need to make the servlet act as an RMI
server?

Thanks for your response,
Svein Winje

--- Travis Low <[EMAIL PROTECTED]> wrote:
>
----------------------------------------------------------------
> BEFORE YOU POST, search the faq at
> <http://java.apache.org/faq/>
> WHEN YOU POST, include all relevant version numbers,
> log files,
> and configuration files.  Don't make us guess your
> problem!!!
>
----------------------------------------------------------------
> 
> If I understand you correctly, you need a shared
> class to dole out TCP/IP
> connections.  This class need not be a servlet, and
> it can be persistent. 
> Then you'd just call something like
> TcpPool.getConnection() in your
> doPost.  Right?  Wrong?  Seems too simple.
> 
> -- Travis Low  
>    <mailto:[EMAIL PROTECTED]>
>    <http://dawnstar.org/travis>
> 
> Svein Winje wrote:
> > 
> > Hi, I am wondering (and probably, so have many
> before
> > me) where I can find information about creating a
> > "persistent" servlet that can talk to other
> servlets.
> > 
> > My problem, which I may or may not be accurate in
> > describing due to an imcomplete understanding of
> Java
> > and Jserv, is that my servlet opens a TCP/IP
> > connection. When it dies (I assume Jserv restarts
> it
> > when it sees a more recent version of the class),
> the
> > TCP/IP connection goes with it. On Sun the timeout
> for
> > socket is around 600 seconds, which means have I
> have
> > to wait for 10 minutes to run the servlet again.
> > 
> > Considering what people have done with JDBC
> connection
> > pooling, I figured it should be possible to
> instead
> > make a shared servlet object that other servlets
> can
> > talk to such that I don't have to kill and restart
> the
> > class that creates the TCP/IP socket?
> > 
> > Hoping someone is able to interpret what I am
> asking
> > and I am simply looking for good documentation
> > resources, whether on the Web or in books.
> > 
> > Thanks,
> > Svein Winje
> 
> 
> --
>
--------------------------------------------------------------
> Please read the FAQ! <http://java.apache.org/faq/>
> To subscribe:       
> [EMAIL PROTECTED]
> To unsubscribe:     
> [EMAIL PROTECTED]
> Archives and Other: 
> <http://java.apache.org/main/mail.html>
> Problems?:           [EMAIL PROTECTED]
> 
> 
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com


--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html>
Problems?:           [EMAIL PROTECTED]

Reply via email to