Wednesday, June 21, 2006

 

Concurrent Programming with J2SE 5.0

JDK 1.5 makes doing concurrent programming - working with threads and such - a lot easier.

Java has long supported the most primitive features needed to support concurrency.

The Thread class has been around forever. So have the monitors that are controlled with the synchronized statement and method declaration attribute, and the primitives defined right on the Object class (meaning all classes, courtesy of inheritance): wait(), notify(), notifyAll().

In JDK 1.5, Sun added a lot more to their standard Java class library.

The new features give you the finished building blocks to solve problems. Instead of you having to build them yourself from the ground up, they do that for you now.
Concurrent Programming with J2SE 5.0:
The Java 2 Platform, Standard Edition release 5.0 (J2SE 5.0), which is also known as Tiger, has provided a new path to multithreading in the Java programming language. The original mechanisms for coordinating threads with wait() and notify() are now enhanced with new and sophisticated mechanisms for working with threads. The new mechanisms are part of the java.util.concurrent package, which aims to offer a standard set of concurrency utilities that will ease the task of developing multithreaded applications and servers. In addition, such standards will improve the quality of such applications.

Of course you are still highly restricted on when you can use threads. The standard EJB and web containers that are written in Java do not like you to do that. If they allowed it, then resource management and clustering would be considerably more difficult and inefficient, if it was even possible at all.

Ah, there is the rub.
Technorati tags: , ,

Comments: Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?