Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Problems with Java Wireless Toolkit

 
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.
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try something like this:

 
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.
 
These are the worst of times and these are the best of times. And this is the best tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic