Programming Tutorials Browser Tutorials Articles Struts Tutorials Hibernate Tutorials

  Tutorial: Understanding MIDP System Threads

Describes the multi-threaded aspects of the J2ME application environment. Understanding the interactions between systems threads, user-interface and application threads will help in avoiding MIDlet deadlock.

Tutorial Details:

Concurrency - multiple threads executing simultaneously within a single application - is a complex topic. Although Java technology has always included extensive built-in support for multithreading, writing correct concurrent code is seldom as simple as it seems. To give you some welcome help J2SE 5.0 (also called Java 1.5) adds a number of concurrency utilities that are based on work by Doug Lea, author of Concurrent Programming in Java - an excellent reference, well worth reading. These new classes are not available to J2ME applications, unfortunately, so the basic techniques discussed in the article "Using Threads in J2ME Applications" still apply. This tech tip focuses on dealing with system threads, an aspect of MIDP programming that trips up many a beginner.

A system thread is any thread not started and managed by an application. In a MIDP environment, system threads are created by the application management software (AMS) that controls MIDlet execution. Each active application has at least one system thread and zero or more application threads.

Notice that "at least"! An implementation is free to use multiple system threads for different operations or, if necessary, to share system threads among multiple MIDlets - while respecting the MIDlet sandbox and other restrictions. The MIDP specification makes no guarantees as to which threads the AMS uses to perform particular operations.


 

Read Tutorial at: Click here to view the tutorial

Rate Tutorial:
Understanding MIDP System Threads

View Tutorial:
Understanding MIDP System Threads

Related Tutorials:

Programming Java threads in the real world, Part 1 - JavaWorld - September 1998
Programming Java threads in the real world, Part 1 - JavaWorld - September 1998
 
A beginner's guide to Enterprise JavaBeans - JavaWorld - October 1998
A beginner's guide to Enterprise JavaBeans - JavaWorld - October 1998
 
Understanding Java Card 2.0 - JavaWorld March 1998
Understanding Java Card 2.0 - JavaWorld March 1998
 
Use the JVM Profiler Interface for accurate timing - JavaWorld
Use the JVM Profiler Interface for accurate timing - JavaWorld
 
Device programming with MIDP, Part 1 - JavaWorld January 2001
Device programming with MIDP, Part 1 - JavaWorld January 2001
 
J2ME: The next major games platform? - JavaWorld March 2001
J2ME: The next major games platform? - JavaWorld March 2001
 
J2EE project dangers! - JavaWorld March 2001
J2EE project dangers! - JavaWorld March 2001
 
Device programming with MIDP, Part 3 - JavaWorld July 2001
Device programming with MIDP, Part 3 - JavaWorld July 2001
 
Implement a J2EE-aware application console in Swing
Implement a J2EE-aware application console in Swing
 
Build database-powered mobile applications on the Java platform
Build database-powered mobile applications on the Java platform
 
Track wireless sessions with J2ME/MIDP
Track wireless sessions with J2ME/MIDP
 
Sync up Palm OS with J2ME
Sync up Palm OS with J2ME
 
J2ME devices: Real-world performance
J2ME devices: Real-world performance
 
Big designs for small devices
Big designs for small devices
 
Asynchronous IO for Java
What is Asynchronous IO for Java? Asynchronous IO for JavaTM (AIO4J) is a package that provides the capability to perform input and output (IO) on sockets and files asynchronously -- that is, where the Java application can request the operation but can
 
Java Application Instrumentation with Log4J
Java Application Instrumentation with Log4J Application metrics, such as performance metrics, are key to understanding and improving application efficiency. Profiling and monitoring tools yield valuable information on CPU and resource usage, including OS
 
Understanding MIDP System Threads
Describes the multi-threaded aspects of the J2ME application environment. Understanding the interactions between systems threads, user-interface and application threads will help in avoiding MIDlet deadlock.
 
Develop MIDlets using the J2ME MIDP Development for NetBeans IDE 4.0
This release integrates with the J2ME Wireless Toolkit 2.2 to create a powerful environment for developing MIDP 2.0 applications.
 
What are the defined J2ME system property names?
A compilation of J2ME properties sorted by JSR. Learn the names, test for optional packages or retrieve platform specific configuration values.
 
Writing a Custom Counter Component
MIDP 2.0 introduced the javax.microedition.lcdui.CustomItem class. As the name implies, a developer can now create custom UI components by extending the CustomItem class. This tech tip designs and implements a UI component for displaying a numeric counter
 
Site navigation
 

 

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright © 2006. All rights reserved.