Win a copy of Murach's Java Programming this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

HttpConnection and CLDC 1.0  RSS feed

 
Joao Eduardo Galli
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,

I'm having some troubles with CLDC 1.0, my Midlet is communicating with the server over HTTP, but if I make some 4 to 6 HttpConnections without restarting the Midlet, it shows me an Exception. I was testing it in a Motorola V3 Black and a Samsung SGH-C200 both CLDC 1.0, but in any CLDC 1.1 device this exception is never thrown, anyone knows why?

Obs.: In Motorola's devices we get the size of the bytes transferred, and it is always something near 6000 bytes, than the Exception occurs.

Are there any limitations?
 
Arnb Sen
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could there be a limitation on the number of connections that can be opened simultaneously ?

Hi Joao,

Can you share the exception being thrown ?

Arnab
 
Joao Eduardo Galli
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

sorry to disturb you.... I forgot to close the inputStream...
but why the CLDC 1.1 doesn't have this problem? The Connection closes the InputStream together in CLDC 1.1 ?

thanks
 
Arnb Sen
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you will have the same problem with CLDC 1.1 if you open few more connections.. or it could be due to implementation of the APIs for that phone..

Arnab
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!