Posts Tagged ‘Thread


Java Connector Architecture (JCA)

Long time since my last post but job was demanding way too much time from me. Anyways today I’ll start a series of posts about the Java Connector Architecture. Chances are that you have already used a JCA Connector but never needed to write one by yourself. But, why would someone need to write one? Picky question but the JavaEE specification is very clear, you can’t open ServerSockets, Threads, to name a few.

But why would I need a Thread inside an EJB container if it is already built around a Threaded model? Answer is, you need it everytime your component has a sofisticate interaction with an external system for example. To make things clearer let me use the scenario I faced weeks ago.

Communication with Legacy application using Sockets

One of the requisites of the application I am working on is to communicate with a legacy application written in C. If the communication was always started by my application and I didn’t needed a Pooling model I could stick easily with a ClientSocket inside my EJB (since specification only mandates that ServerSockets and Threads are denied inside an EJB), but, since the legacy application sometimes sends a “ping” request and I needed pooling for low latency I had to create my own JCA connector.

First Steps

For those who are starting I’d suggest a few tutorials around the net:

Introduction to the J2EE Connector Architecture

Tutorial: Deploying a JCA Resource Adapter for an EJB Application

Connect the enterprise with the JCA, Part 2

I agree, what is the point of this post if I am only referencing some other tutorials? I only wanted to make a briefing about the posts to come. Personally during the development of my JCA connector I found some dificulties that I think are worthy posting over here.

So, if you are interested in JCA, start reading the tutorials mentioned and take a quick look at the JCA 1.5 specification as well and keep an eye on this blog for the next weeks.

Update for the original post:

Another good reason for learning how to implement a JCA Connector: Aqualogic Service Bus, one of the foundations of Oracle Fusion suite, heavily relies on JCA Connectors for communicating with every kind of application you can imagine. So, if your company is moving to Service Orientation (SOA) and depending on the systems you’ll be integrating you’ll have to roll your own connector.

Complete post series

Outbound connector related posts:

Outbound JCA connectors introduction
Connection request flow on outbound JCA connector
matchManagedConnections short tip
Future updates to the JCA tutorial

Inbound connector related posts:

Inbound JCA Connectors Introduction
Anatomy of an inbound JCA connector


Blog Stats

  • 375,197 hits since aug'08

%d bloggers like this: