• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Java 7 Concurrency Cookbook: Testing Concurrent Code & Avoid Deadlock

 
Ranch Hand
Posts: 258
2
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Javier,

I am very interested in testing concurrent code and avoid deadlock in multi-threaded environment.
I found your book has a chapter discussing on testing and wonder if it would includes integration with testing and mocking framework like JUnit, TestNG, Mockito, etc.
In addition, if your book has tips on avoiding deadlock.

Thanks
 
author
Posts: 20
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hello Raymond

The book includes a chapter about testing concurrency code that includes:

-Monitoring concurrency related classes, as Lock, Phaser, Executor or the Fork/Join pool
-How to write effective log messages in a concurrent enviroment
-How to configure Eclipse and Netbeans to debug concurrent applications
-How to analyze concurrent code with FindBugs
-How to test concurrent code with the MultithreadedTC library

We have include the frameworks you mention, but it's an interesting theme to be included in future works.

The book includes an appendix, that it's not included in the physical book, but it can be downloaded from the Packt's website, that include some tips about how to design a concurrent application and how to avoid a deadlock situation. All the examples explained in the book show how to use the different elements of the Java Concurrency API avoiding deadlocks.

If you need more info, please let me know.
 
Ranch Hand
Posts: 104
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

Javier, in your experience have you come across any sample projects/applications that really excel in helping the programmer develop understanding of the different aspects of multi-threaded programming? I developed a simple 'car park' application at university that had threads representing cars entering and leaving the car park, however this was essentially a collection of counters being incremented/decremented. If anyone has any interesting resources, I would be grateful for the share.

Cheers,

S
 
Javier Fernandez Gonzalez
author
Posts: 20
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hi Stuie

The book has a lot of examples and each of them explain a functionality of the Java 7 Concurrency API. I think all of them are very clear and explain well the concept they want to explain. You can download the source code of the book as Eclipse projects so you can play with them.

If you want to see a bigger real application that uses concurrency classes, you can investigate the source code of an open source project that uses them.

If you need more info, please let me know.
 
Stuie Clarky
Ranch Hand
Posts: 104
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the information, I look forward to getting stuck into the examples

Cheers,

S
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic