Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 780619
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T20:06:11+00:00 2026-05-14T20:06:11+00:00

I am using Connector in J2ME and found that sometimes it take a very

  • 0

I am using Connector in J2ME and found that sometimes it take a very long time to send a request, and sometime it may halt the whole process.
So I try to put code related to Connector in a thread and try to set timeout to the thread. But I found out that it’s very difficult to do this in J2ME because there’s no join(timeout) in J2ME.
Is there any way to do this? Or any better way to deal with network connection in J2ME?
Thanks a lot in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T20:06:12+00:00Added an answer on May 14, 2026 at 8:06 pm

    You should use a combination of 3 mechanisms:

    • Connector.open() can be used with a third parameter for timeout.
    • You can call Thread.sleep() and Connection.close() from a different thread than the one you call Connector.open() in.
    • You can call Thread.sleep() and Thread.interrupt() from a different thread than the one you call Connector.open() in.

    On some badly implemented MIDP runtimes, Connection.close() can block if the connection is busy. You need to test this thoroughly on the handsets you plan to support.

    Thread.interrupt() can leave the MIDP runtime (and the underlying handset operating system) with orphaned resources so only use it as a last resort.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create a J2ME app, which talks to webserver using HttpConnection connector.
I am using the HttpConnection class of J2ME in my BlackBerry app to send
I want to make am HTTP GET request from my J2ME application using HttpConnection
I'm trying to implement a comet style, long polling connection using an XMLHttpResponse object.
I'm writing an app for Blackberry that was originally implemented in standard J2ME. The
I am trying to use the hessian j2me implementation @ http://hessian.caucho.com/ using java me
I have read in many places that network connection in a j2me app should
I use connect() and cursor() for using SQLite self.connector = sqlite3.connect(self.dbFile) self.cursor = self.connector.cursor()
I am trying to connect to a database using MySQL C++ Connector. I have
Using the ADO.NET MySQL Connector, what is a good way to fetch lots of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.