You Are Here:

Community: Developer Discussion Boards

#1 Old Question Regardin open connection - 2005-08-30, 09:40

Join Date: May 2005
Posts: 22
acceltree_pune
Offline
Registered User
hello all,

I am opening the connection in commandAction method of Midlet
then follwing warning comes and porgram terminates..

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

#2 Old Re: Regardin open connection - 2005-08-30, 15:19

Join Date: Mar 2003
Posts: 19
RogerJFX
Offline
Registered User
Just do it!

class MyConnector implements Runnable {
... // better start this Thread at once and just notify it by the actionCommand

Besides: what is the commandAction for? Nokia phones do know a keyCode for any key (thx to Nokia). So consuming the keyEvent by [Canvas]

protected void keyReleased (int code) {
...

will ease a lot up, because keyReleased isn't wrapped in a Thread. So there's no need for multithreading, that means, you can start your connection thread on demand.
Reply With Quote

#3 Old Re: Regardin open connection - 2005-09-03, 09:25

Join Date: Jul 2005
Posts: 79
Send a message via Yahoo to aminuddin09
aminuddin09's Avatar
aminuddin09
Offline
Regular Contributor
see, There is restriction for that, if you are going to establish HTTPConnection.

query should be in a separate thread...

for Code, search engine can help you to get the idea.
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
How to keep Socket connection open for a time barre30 Mobile Java Networking & Messaging & Security 0 2004-07-22 10:31
Problem: RGenericAgent::Progress does not detect open connection bjorn.rudolfsson Symbian Networking & Messaging 1 2004-02-18 09:59
Open connection to the right virtual server MrPatol Mobile Java Networking & Messaging & Security 0 2003-11-21 22:21
playing sounds on 9210 while data connection is open andywein General Symbian C++ 1 2002-09-28 20:05
open and close connection in the MMS Library cmingoia General Messaging 1 2002-09-17 11:54

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia