Lucas Jellema: Some Musings on JCA


News: Lucas Jellema: Some Musings on JCA

  1. Lucas Jellema: Some Musings on JCA (3 messages)

    In "Some Musings on JCA," Lucas Jellema discusses what seems to be the red-headed stepchild of J2EE: The Java Connector Architecture. In it, he points out where JCA will typically be found and who will implement it, as well as pointing out its strengths and weaknesses.
    Typically, although not necessarily, JCA Connectors are plugged into a J2EE Container and invoked within the container environment, for example by EJBs or MDBs. Since JCA 1.5, the Connector is not only a passive, callable interface - it can also initiate communications with interested parties: Message Listeners. JCA 1.5 provides an enhanced communication model, where the EIS can initiate and control inbound communications, including security context and transaction propagation.

    Alternatively and increasingly important, JCA connectors are plugged into Enterprise Service Bus architectures, adding new Service End Points to the ESB infrastructure. Most ESB implementations have native support (Service Containers) for integrating (with) JCA Resource Adapters. Examples include ServiceMix, Mule, Tibco and others.
    He also points out where Spring can help create JCA resources:
    The Spring Framework, since release 1.2, provides support for out-of-container access to JCA connectors, or more specifically: CCI (common client interface) for a JAC Connector: "The aim of the Spring CCI support is to provide classes to access a CCI connector in typical Spring style, leveraging’s Spring general resource and transaction management facilities." ... The documentation includes an example of how to call upon the Sun BlackBox Resource Adapter to perform database operations.
  2. Don't forget about Jencks![ Go to top ]

    I'd highly recommend folks take a peek of if they want a lightweight, Apache licensed, JCA container which is easy to deploy inside Spring.

    Jencks supports inbound and outbound messaging using APIs like JMS, JAX-RPC, JBI and JCA CCI as well as providing an XA based pooling mechanism for JDBC.

    It's the JCA container that the ServiceMix ESB project is using.

  3. Apologies to Jencks, but in the first 5 minutes browsing the website I was unable to find any decent documentation. An abstraction layer over these protocols may be a good idea, but if I can't see how to use it then its useless.

    (Think about a simple Java code example - to call x add this code to your application. It should be a 100% Java example, not Spring.)
  4. The point of Jencks IS to document how to use spring to configure the JCA container. Buy if you understand how spring configures POJOs you could, you could manually configure the JCA container with just java code.

    But the documentation does sometimes get a bit long winded. For example, I would venture to say you don't need much more than spring configuraiton file:*checkout*/jencks/src/test/resources/org/jencks/spring.xml?rev=HEAD
    and the MDP implementation:*checkout*/jencks/src/test/java/org/jencks/
    to understand how to write your own MDPs.