|
From: Juergen H. <ju...@in...> - 2005-04-13 16:51:09
|
Hi over here too, Steve! I've already briefly responded on the user list. I'll go a bit further here... The core of a JCA container is the implementation of the javax.resource.spi.ConnectionManager interface. This is what the ManagedConnectionFactory of a concrete JCA connector needs to receive to be able to work in a managed fashion. Everything else essentially comes with the connector itself. This ConnectionManager implementation can either be a simple connection pool (for JCA's non-managed mode) or a full-fledged manager of the overall JCA service contracts (for JCA's managed mode, in particular including XA transaction management). For the latter mode, it has to collaborate with a javax.transaction.TransactionManager. In a Spring context, such a ConnectionManager would simply be defined as bean. Each JCA connector would then be set up with Spring's existing LocalConnectionFactoryBean, taking a ManagerConnectionFactory instance and a ConnectionManager instance and exposing the connector's native ConnectionFactory (e.g. a JDBC DataSource or CCI ConnectionFactory). So for a Spring environment, we don't actually need a JCA *container* in the sense that it manages the setup of the connectors. All we need is a JCA ConnectionManager implementation that is XA-capable and able to interact with a given javax.transaction.TransactionManager instance. If the ConnectionManager is defined as bean, it could simply receive the JTA TransactionManager as bean reference. This would allow us to define all involved components as Spring beans: the TransactionManager, the ConnectionManager, the ManagedConnectionFactory of each connector, and the native ConnectionFactory for each connector. Note that in the above configuration model, it's all objects: no static accessors or static state anywhere, it's all in instances. A ConnectionManager like the above would be completely generic in that it could work with any JCA connector and with any JTA implementation. Furthermore, it doesn't require any Spring dependencies: as long as the ConnectionManager follows JavaBean conventions, it can easily be used in a Spring environment despite being a completely separate component. Juergen -----Original Message----- From: spr...@li... [mailto:spr...@li...]On Behalf Of Steve Lewis Sent: Wednesday, April 13, 2005 6:07 PM To: Spr...@li... Subject: [Springframework-developer] Re: JCA support Hello Juergen, I've recently begun a project (not hosted anywhere yet) for a JCA container. It's in the very early stages, but it uses Commons Pool for the pooling. I've begun to talk with Thierry so maybe we can throw something together that's useful. Currently I am in the early stages of testing my container against the local transaction JBoss JDBC adapter. But basically I'd like to say something like: Container.registerAdapter(AdapterInfo); Then once it's registered, call Container.getDataSource() or Container.getConnectionFactory() Something very simple that hides all that complexity, as much as possible. Thanks, Steve __________________________________ Yahoo! Mail Mobile Take Yahoo! Mail with you! Check email on your mobile phone. http://mobile.yahoo.com/learn/mail ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click _______________________________________________ Springframework-developer mailing list Spr...@li... https://lists.sourceforge.net/lists/listinfo/springframework-developer |