JBoss Application Server 7 has been released !
Java EE Connector Architecture (JCA) is one of those
hidden technologies in the Java Enterprise Edition platform and if you asked me the specification should be used a lot more to implement enterprise solutions.
You may ask
So, what is so special about JCA ?. If we take a look at the introduction of the specification we see
The Java Connector Architecture (JCA) defines a standard architecture for connecting the Java EE platform to heterogeneous Enterprise Information Systems (EIS). Examples of EISs include Enterprise Resource Planning (ERP), mainframe transaction processing (TP), databases and messaging systems.
Hey, wait a minute... databases and messaging ?!?
Yes, every time you hit a database or a messaging system - or use technologies that hides those systems like JPA and EJB/MDBs - in your application they go through the IronJacamar container.
The resource adapters - the enterprise archive format for deployment - provides the specific interface for those system, like exposing a JDBC or JMS API to the applications - this means that the JCA container is
hidden from the applications.
Which leads to
So why should I care ?. Well, since the IronJacamar container controls all connections and their properties that means that the JCA container can add extra features
on-top of APIs - like connection pooling, connection validation, a flush strategy in case of an error, reauthentication of connections and more.
Things that you take for granted that an application server will provide you - now you know how we do it :)
As I mentioned above the IronJacamar project provides the JCA container for JBoss AS 7, so the features of the project really mandates what datasource can do and which features that are available to a resource adapter deployment.
I wrote a blog about our 1.0.0.Final release here - that will give you some insight to what the project is about.
And yes, the project is included in our Java EE 6 Web Profile bundle too.
The documentation shows you how to deploy an application in different ways, but for now we will just assume that you manually copied the
eis.rar file to the deployments/ directory.
Next you will need to configure the resource adapter like provide the JNDI name for a connection factory.
An example could look like this
<subsystem xmlns="urn:jboss:domain:resource-adapters:1.0"> <resource-adapters> <resource-adapter> <archive>eis.rar</archive> <config-property name="Server">localhost</config-property> <config-property name="Port">19000</config-property> <transaction-support>XATransaction</transaction-support> <connection-definitions> <connection-definition class-name="com.acme.eis.ra.EISManagedConnectionFactory" jndi-name="java:/eis/AcmeConnectionFactory" pool-name="AcmeConnectionFactory"> <pool> <min-pool-size>10</min-pool-size> <max-pool-size>100</max-pool-size> </pool> <security> <application/> </security> </connection-definition> </connection-definitions> </resource-adapter> </resource-adapters> </subsystem>
which configures the connection factory of
com.acme.eis.ra.EISManagedConnectionFactory to be located under
Alternative - you could add a
META-INF/ironjacamar.xml file to the .rar archive with the configuration.
Be sure to also read Stefano's blog about how to do datasource deployments in AS 7.
For Those About to Rock, We Salute You !