|
From: Juergen H. <ju...@in...> - 2005-04-11 09:34:44
|
Everybody, I've finally moved over the JCA support from the sandbox to the main sources, in a reworked and extended version. The structure of the "jca.cci" package is analogous to the "jdbc" package. Aside from the Common Client Interface data access package, there's also "jca.support" package for local setup of a JCA connection factory (CCI or other). I've used Thierry Templier's JCA support prototype as starting point - thanks very much again, Thierry! In comparison to this original version, CciTemplate is stripped down to some extent. All operations just use InteractionSpec now; ConnectionSpec handling has been completely removed from CciTemplate, in favor of a special ConnectionFactory (see below). The execute methods follow typical use cases now, with as much implicit handling as possible. For example, there are no explicit boolean flags passed to the execute methods anymore. Instead, CciTemplate tries to figure out the appropriate behavior: if an output Record has been passed in or if an OutputRecordCreator has been specified, the execute(InteractionSpec, Record, Record) version will be used; else, execute(InteractionSpec, Record). Likewise for using the same Record as input/output: simply specify pass in the same Record as input and output argument; no need to specify an explicit flag for this anymore. I've also renamed MappingRecordQuery into MappingRecordOperation (as there is no true query concept in JCA; it's rather all about generic operations with a Record result), and factored out a separate SimpleRecordOperation class. The former is concerned with mapping input and output objects to/from CCI Records, while the latter simply passes in input and output Records. Furthermore, there's a couple of ConnectionFactory adapters, similar to our JDBC and JMS support: for example, SingleConnectionFactory. There's also a special ConnectionSpecConnectionFactoryAdapter that works analogous to our UserCredentialsDataSourceAdapter for JDBC: getConnection() calls will automatically be routed to getConnection(ConnectionSpec), with the ConnectionSpec taken from the static configuration of the adapter or from the adapter's corresponding ThreadLocal. Feel free to give this stuff a try, either using a CVS snapshot or the upcoming 1.2 RC2! Juergen |