views:

129

answers:

4

I am JEE developer, and I want to get skills on concurrency development.
Could you provide me some assignments, ideas, or other - just for learning and training concurrency programming?
Thanks!

+3  A: 

There's a brilliant book about Java concurrency called "Java Concurrency in Practice". I think this is the best starting point for diving deep into advanced concurrency.

Java Concurrency in Practice (Amazon)

Juriy
That book is a must-read if you're going to do concurrent programming in Java.
Jesper
I know that this book is cool, but I asked some practical ideas for training concurrencyThanks!
dev
+1  A: 

I have blogged about new concurrency solutions with the Spring framework 3 and JEE 6 here.

It explains how to execute asynchronous methods declaratively with the @Async or the JEE's @Asynchronous annotation.

These annotations are just a way to abstract away the complex concurrency logic.

You can configure Spring to use the excellent Executor class to do the concurrency logic. The Exceutor class was introduced in Java 5 and is explained well in the Java Concurrency in Practice book together with the other classes in the java.util.concurrent package.

The article also demonstrates how to use the same Executor service in the code and by the Spring framework. Which enables you to use the same thread pool for both your programmatic concurrency logic and your concurrency logic handled by an application container.

Else, you can learn a lot from the Java documentation. Read about all the classes in the concurrent package and especially the Executor class. This is at least my most used documetation.

Espen
A: 

I would suggest looking at JCSP. http://www.cs.kent.ac.uk/projects/ofa/jcsp/

With JCSP it is possible to prove your models are deadlock free.

IBM have more information about it http://www.ibm.com/developerworks/java/library/j-csp1.html

Mex
A: 

To start with just start coding to get an idea of some of the problems that may arise.

To get you started try writing the following:

  1. How would you implement a simple blocking queue?
  2. How do you stop a thread?
  3. How would you ensure only a single thread can read and write to a collection at a time?
  4. What would happen if you modify a collection while another thread is iterating over it.
  5. etc, etc

Just go online and maybe do a search for interview questions on concurrency.

Karl
thank you for response!
dev