felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Kriens <peter.kri...@aqute.biz>
Subject Re: DataSourceFactory
Date Mon, 21 Oct 2013 07:02:15 GMT
Jorge,
You raise a very valid point and I hope that in a future specification this will be addressed.
In this case I've created a 'managed' JDBC bundle that uses Configuration Admin and Data Source
Factory services to create an XA Data Source service. Since JPA has a similar issue, I also
created a 'managed' JPA in the same vein. By creating a Configuration Admin configuration
factory record, you create a configured instance.

However, in this case I still need the Data Source Factory service to create configured XA
Data Source objects. I found that H2 implements this out of the box, I did it myself for MySQL
and hope to get this work in their code base since it is quite trivial to do. 

This is still experimental but you can find this at: http://github.com/osgi/osgi.bundles and
feedback is appreciated.

Kind regards,

	Peter Kriens



On 19 okt. 2013, at 22:41, bokie <jms.cercas@gmail.com> wrote:

> Hi,
> 
> I've been reading the specs and looking at some implemented examples of the
> DataSourceFactory
> (https://ops4j1.jira.com/wiki/display/PAXJDBC/Native+Driver+Adapters).
> 
> And, after looking at the "JDBC idea" in OSGi, I must admit that it wasn't
> what I expected to find - I was expecting to find the "PROVIDER" paradigm
> (in the single instance sense) instead of the "CREATOR" paradigm:
>   createConnectionPoolDataSource(java.util.Properties props)
>   createDataSource(java.util.Properties props)
>   createDriver(java.util.Properties props)
>   createXADataSource(java.util.Properties props)
> 
> Could someone clear up the thought behind DataSourceFactory; who are the
> intended clients of the factory service - it doesn't make sense for a client
> to receive a freshly created datasource every time it needs to interact with
> the database.
> 
> Thanks,
> Jorge
> 
> 
> 
> 
> --
> View this message in context: http://apache-felix.18485.x6.nabble.com/DataSourceFactory-tp5005667.html
> Sent from the Apache Felix - Users mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Mime
View raw message