Injectable, Configurable, Resilient and Monitorable ThreadPools in Java EE 7 -- Porcupine Is Available

The Apache 2.0 licensed Project Porcupine is based on JSR 236: Concurrency Utilities for Java EE and allows you to setup injectable thread pools on-the-fly.

Each thread pool is created according to sensible conventions and produces an injectable statistics POJO. Not only the configuration, but also all major components are extensible without any additional configuration:


import com.airhacks.porcupine.execution.boundary.Dedicated;
import java.util.concurrent.ExecutorService;
import javax.inject.Inject;

public class MessagesService {

    @Inject
    @Dedicated
    ExecutorService light;

    @Inject
    @Dedicated
    ExecutorService heavy;
    //...
}

The installation is easy:


<dependency>
	<groupId>com.airhacks</groupId>
	<artifactId>porcupine</artifactId>
	<version>NEWEST_VERSION</version>
	<scope>compile</scope>
</dependency>
and the dependency small (16 kB).

Enjoy https://github.com/AdamBien/porcupine and see you at workshops.adam-bien.com. Porcupine is heavily discussed during the workshops. Stay in touch with airhacksnews.com!.


NEW online workshop: WebStandards Igniter (online)

Airport MUC workshops: Java EE 8, Java 9: Bootstrap, Effective, Architectures, Single Page Apps, Progressive Web Apps, HTML 5, ES 6, CSS 3 and Microservices

Podcast: airhacks.fm and newsletter: airhacks.news

A book about rethinking Java EE Patterns

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
realworldpatterns.com
Online Workshops
...the last 150 posts
...the last 10 comments
License