|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
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. |
|
#2
|
|||
|
|||
|
if u have got an answer to ur problem, plz could u say how it was sorted?
|
|
#3
|
|||
|
|||
|
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:
|
|
#4
|
|||
|
|||
|
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) ![]() |
![]() |
| Viewing: Dev Articles Community Forums > Programming > Java Development > problem with http connection for MIDlet |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|