• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problems with Java Wireless Toolkit

 
antonio rodriguez ayuso
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello to all,

I'm developing a aplication with JWToolkit "clientMobile" for access to web services. When running the window of emulator "DefaultColorPhone" prints the following message:

"clientMobile wants to send an receive data using the network. This will use airtime any may result in charges. Is it OK to use airtime?"

Also in the window of JWToolkit prints the following message:

"Warning: To avoid potential deadlock, operations that may block, such as
networking, should be performed in a different thread than the
commandAction() handler."

What is the problem? How I cant solve it?

I hope that somebody can help me.

thank to all.
 
Marcin Zduniak
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try something like this:

 
Ransika deSilva
Ranch Hand
Posts: 524
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
For the first question, where the system asks the use to confirm to send/recieve information, that is natural, it should ask, cause this is a security feature of j2me.
For the other question, again it is a good programming practice to have the statements where it makes a connection in a new Thread. Cause the IO operations are unpredictable plus will take time, since only one thread can be running in the processor at a given time, the application should not block all the other threads entering the processor. If you put the IO code also in the application thread, you are blocking the other threads. Well hope this is correct. enjoy!.
 
antonio rodriguez ayuso
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

the problems have been solved. Thanks for help me.

Antonio.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic