I was involved in a project with the goal of improving one of the mission critical systems of a North European mobile telecom company. I was a great success, the upgrade went well, without major problems.
This system, had connection to 7 other systems. Each connection was implemented in a custom way. The protocols were CORBA, LDAP, JDBC and custom TCP/IP.
When I attended courses held by SUN (Developing Applications for the J2EE Platform and Architecting and Designing J2EE Applications), on both occasions, I was told that using JCA is the right way to implement connection to external systems, although we didn't write any connector due to the lack of time. The benefits I learned were:
- Generalizing the custom codes
- Container support (connection handling, monitoring, restart)
- Industry standard
- The specification is too complicated with many (I mean MANY!) interfaces.
- I couldn't find an useful reference implementation
- The concept of JCA is analogous with JDBC. This is what the container supports. However this is not what you need in most cases.
- Class loader hell
- The container support we could use is minimal
What did I mean by Class loader hell? Well, the problem is that the JCA resource adapters have their own class loader, so if you want to use classes during communication with the resource adapter, you have to package them outside of the connector and outside of your application too. Our dist EAR consist of 1 War, 7 Rars, 16 Jars build from our source, plus 14 3rd party Jars (and there are many connector specific Jars also inside of the Rars). So this is a big mess, but this was the only way we could cope with classloaders. Another possibility would have been serializing between JCA and the app...
If had the chance to start it again, I would have not used JCA at all. I liked the Java Connector Architecture concept very much, so if you have to create a connection fremework, the specification is a good thing to read to give you a few ideas, but then, you will be able to implement an own framework with much less work and complexity. Complexity is time and time is money.
I'd leave it to SAP, Siebel, and co. to create JCA resource adapters for their overproced products. For all others, think again!
No comments:
Post a Comment