Skip to main content

SocketConnection - problems reconnecting on a Sony K800

3 replies [Last post]
Anonymous

Hi all,

I'm having a battle with a Sony Ericsson K800 and a SocketConnection.

When our MIDlet starts, it opens a socket to our server. If an Exception
is later thrown in either our reading or writing thread, the
DataInputStream, DataOutputStream and SocketConnection are all closed
and the references destroyed. Each 15 seconds, the MIDlet tries to
reconnect until it successfully does so.

Generally speaking that works across the board: Nokias, Sonys, Motorolas
and others reconnect seamlessly when the network is available again.

On the K800 though (and I think this is common to Sony Java Platform 7
phones but not earlier ones) the connection is never regained. Each time
the MIDlet calls "socket = (SocketConnection) Connector.open(url);" a
ConnectionNotFoundException is thrown with no message.

Has anyone come across a similar problem or have a solution they could
suggest.

Cheers,
Kirwan

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Frank Gaebler

[att1.html]

Eric Giguere

I wonder if the connection is still lingering and preventing you from
opening another connection. If so, presumably it would eventually
timeout and you'd be able to make a connection again... is that the
case? I don't know if SE has an option to turn off the lingering, but
you could certainly do it from the server side.

Eric
http://j2me.synclastic.com

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".

Kirwan Lyster

Hi Eric,

I've been approaching the problem from the standpoint that something
must not be getting cleaned up correctly, but I'm certainly closing
everything.

The server does close the socket, but as the trouble starts with a lost
network connection nothing the server does is going to have any direct
impact upon the MIDlet.

As for the connection lingering, I wonder if using
SocketConnection.setSocketOption might help. I'll try that now.

Cheers,
Kirwan

Eric Giguere wrote:
> I wonder if the connection is still lingering and preventing you from
> opening another connection. If so, presumably it would eventually
> timeout and you'd be able to make a connection again... is that the
> case? I don't know if SE has an option to turn off the lingering, but
> you could certainly do it from the server side.
>
> Eric
> http://j2me.synclastic.com
>
> ===========================================================================
>
> To unsubscribe, send email to listserv@java.sun.com and include in the
> body
> of the message "signoff KVM-INTEREST". For general help, send email to
> listserv@java.sun.com and include in the body of the message "help".
>
>

--
Kirwan Lyster
Head of Mobile Development » Reporo

e » kirwan.lyster@reporo.com
t » +44 (0)20 7928 8128

Reporo
Europoint Centre
5-11 Lavington Street
London
SE1 0NZ
United Kingdom

t » +44 (0)20 7928 8128

w » www.reporo.com

------------------------------------------------------------------------
Disclaimer »
The information contained in this e-mail is confidential and is intended
for the recipient only.
If you have received it in error, please notify us immediately by reply
e-mail and then delete it from your system.
Please do not copy it or use it for any other purposes, or disclose the
content of the e-mail to any other person or store or copy the
information in any medium.
The views contained in this e-mail are those of the author and not
necessarily those of Reporo.
------------------------------------------------------------------------

===========================================================================
To unsubscribe, send email to listserv@java.sun.com and include in the body
of the message "signoff KVM-INTEREST". For general help, send email to
listserv@java.sun.com and include in the body of the message "help".
[att1.html]