Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

While writing an EJB (deployed on WAS) that connects to a db, i have never needed to use JCA. But apparently JCA is the standard for connection to thrid party EIS (which includes database). So does the WAS implement JCA internally? Under what situation would the app develoepr need to use JCA related classes?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

JCA is the standard for connection to thrid party EIS (which includes database)

JCA (Java Connector Architecture) is intended as a generic architecture for connecting to legacy systems. JDBC (Java Database Connectivity) is the standard for connecting to databases.

It is possible to connect to a database using JCA only if the database vendor (or a third party) has provided a JCA resource adapter which can talk to the database. This JCA adapter would be deployed on the application server and your application would talk to the database using the standard JCA interfaces.

Having said that, the more common way for database connectivity is JDBC, and that is what you should use unless there's a specific requirement to use JCA only and you have a JCA adapter for the database.

share|improve this answer
    
+1 Writing your own JCA adapters is a non-trivial task (especially when dealing with transactions). –  Martijn Verburg Aug 9 '13 at 7:34
    
Thanks. But connecting to legacy systems can also happen through soap web services. So in this case i guess JCA has no role to play. –  Kaushik Aug 9 '13 at 12:05
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.