Thanx Craig,

i think i'll move in the directions yu ,John, Ed and Alex have given me. i
t'll take a day or two. i'll get back when it's done .

Thank you very much to everybody ..!!

Pankaj

"Craig R. McClanahan" <[EMAIL PROTECTED]> wrote:
Pankaj wrote:

> Hello,
> i think i'll elaborate a little on my problem. here:
>
> In my credit card processing servlet(a proto for our project) i am making
> https calls to bank(dummy) and mall(dummy) for verifying client details.
Now
> since making 2-3 https calls takes a while i want to know at the end of
> processing whether the client is still there or he has got disconnected
> somehow. It is very imp coz my servlet(and hence the Bank) might have
> committed the transaction and the client will never know. In that case i
want
> to send him email. So what r the possible ways for me to know that client
has
> got disconnected..? At the end of my procesing i redirect the client back
to
> the mall where he came from. I triend to capture the function's IOException
to
> know whether  the cliend has got disconnected but it doesn't work all the
> time.

This does not always work because servlet engines often buffer responses --
any
I/O error that happens when the buffer is flushed will often occur after the
service() method has returned (so your servlet won't see it).

> Sometimes i get a Committed Transaction without a corresponding email
> being generated.
>

That's probably the case where you didn't get an IOException.  As above, you
cannot count on it.

>
> Is it advisable to use Time-outs..?

Absolutely.  The correct timeout value will need to be determined when you do
your usability tests.  You can set it with the
HttpSession.setMaxInactiveInterval() method.

Also, you should put a little JavaScript function in an "onunload" attribute
of
the <body> tag.  This function should submit an "I'm leaving" type message to
your servlet when the user navigates somewhere else.  It won't catch the case
where the browser crashes or the phone line hangs up (timeouts still catch
that),
but it deals with a few more scenarios.

> can ICMP help me polling the client..? or
> some other way of pinging the client..?
>

Nothing at all along this line is going to be feasible in the general case.

Consider the usual way that companies are connected to the Internet.  The
internal company network has IP addresses in the reserved range for Intranets
(for example, mine is 192.168.137.xxx) that are designed so every network can
use
them with no duplication -- but they are not valid IP addresses on the
Internet
itself.  When I surf to your site from any computer in this network, your
site
sees the single "real" IP address of my router (which keeps things straight).
None of the devices inside can be directly addressed from the outside.
Therefore
you cannot ping them.

>
> Please help me.
>

I don't know if this helped, but remember ... every other web application is
in
this same boat also :-).

>
> Thanks,
> Pankaj.

Craig McClanahan

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html


____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to