3
votes

I try to create Asynchronous(non-blocking) request in my J2me application.

I write code as per this tutorial: Ajax-like Asynchronous SOA Calls with Java ME.

Code run successfully on emulator on Netbeans.

But when app deploy and device it fails on multiple connection.

When two connection open. then first connection tread kill and execute second only.

This problem only on device. It works fine on PC

1

1 Answers

3
votes

According to this article http://developers.sun.com/mobility/midp/articles/mmapioverview/index.html "Note also that MIDP limits the number of HTTP connections open simultaneously to four.", but your device seems to only allow one connection.

In this case you should create a queue and execute one thread at a time.