Adam Bien's Weblog

Project connectorZ--Lean JCA 1.6 Connector Implementations

connectorZ project is an example connector implementation under Apache 2.0 license.

The initial project (work-manager) implementation uses JCA WorkManager to execute Runnable implementations asynchronously:

public class ThreadsResource {

    WorkExecutorFactory executorFactory;
    public String threads(){
        try(WorkExecutor executor = executorFactory.newExecutor();){
        Runnable runnable = new Runnable(){
            public void run() {
            //some work to do

The main benefit over the EJB 3.1 @Asynchronous annotation is better management and monitoring. JCA's connection pooling is configurable by application server, so throttling and monitoring comes for free.

[The connectorZ project was initiated by factoring out examples from the book "Real World Java EE Patterns--Rethinking Best Practices" book (Second Iteration), page 303 in, chapter "Generic (File) JCA"]

See you at Java EE Workhops at MUC Airport (October 22nd-24th)!

NEW dates, new workshop: Java EE 7 Workshops: Bootstrap, Effective, Architectures, JavaScript Bootstrap and HTML 5 December, 7th-11th
NEW: Java EE 7 Testing-- Available For Streaming


A book about rethinking Java EE Patterns


Thanks for sharing!

Can you give us some bootstarp for inbound jca with MDB?

Posted by slim ouertani on October 03, 2012 at 04:28 PM CEST #

Hi Adam!
Thanks for sharing this great jca 1.6 example on github. In the other hand there is no ra.xml in the compiled-bundled (mvn clean install) work-manager.rar file. Is it a bug or also a new jca 1.6 feature?

Posted by dejo on July 23, 2013 at 05:09 PM CEST #

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