Java Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingJava Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old September 15th, 2004, 03:27 AM
guccica guccica is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2004
Posts: 1 guccica User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Exclamation problem with http connection for MIDlet

ay i know how to connect to servelet while the midlet is running. i face problem if i put the connection function in command action function. but it can run if i put in startApp function. I need to get the user name and password from user before i connect to database.
How to solve my problem?

here is the error i faced :-

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 October 25th, 2004, 01:57 AM
Joel.Karimpil Joel.Karimpil is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Posts: 2 Joel.Karimpil User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question did u get an answer to ur question as yet?

if u have got an answer to ur problem, plz could u say how it was sorted?

Reply With Quote
  #3  
Old October 26th, 2004, 02:37 AM
shipf1 shipf1 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Oct 2004
Location: Bangalore
Posts: 2 shipf1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 48 m 17 sec
Reputation Power: 0
Question But, how do u solve the problem using CommanadAction() ?

I understand twhat u say. But, if I have to use the CommandAction() function how do u solve the problem ? If anyone knows plz help ?

Quote:
Originally Posted by guccica
ay i know how to connect to servelet while the midlet is running. i face problem if i put the connection function in command action function. but it can run if i put in startApp function. I need to get the user name and password from user before i connect to database.
How to solve my problem?

here is the error i faced :-

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
  #4  
Old March 11th, 2008, 03:38 AM
tdesany2 tdesany2 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2008
Posts: 1 tdesany2 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 m 55 sec
Reputation Power: 0
Talking Answered

Dears,

Please note that the J2ME specification about httpconnection said that you must always create an independant thread to manage your connections otherwise your main thread will wait forever.

So you just have to create something like:

1. Thread creation
2. Put business in the thread run method
3. Run the thread

With kindest regards,
Thibaut de Sany (J2ME certified)

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJava Development > problem with http connection for MIDlet


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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 On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap