DataSourceFactory is intended to creative native database connection. Just see that as a factory for db connection (DataSource creates Connection, Driver creates Connection, PooledDataSource creates PooledConnection and XADataSource creates XACOnnection).
Pooling, transaction management has to be performed in another part. What is really confusing is that there are 2 semantics behind the DataSource interface: * It's a native connection factory provided by the DB vendor * It's also the interface used by the end consumer that hides connection pooling, transaction management, ... So, DataSourceFactory has to be used to provide real connections for a end-user's DataSource. It's not intended for direct end-user's usage. Hope that helps to clarify --G 2013/10/21 Felix Meschberger <[email protected]> > > You might also want to ask on users(at)aries(dot)apache(dot)org. The Aries > project has an implementation of the OSGi JDBC specification and AFAICT at > least some of the project members have been involved in the spec creation > and certainly know more. > > Regards > Felix > > Am 20.10.2013 um 07:30 schrieb David Jencks: > > > You might ask on an ops4j list, I don't think felix implements anything > like this. > > > > FWIW if you look up a datasource in jndi you are supposed to receive a > new instance on each lookup. Datasources are ways of getting connections, > not the actual connections. Depending on the implementation when you get a > connection from a datasource you might get a new connection or you might > get a connection checked out from a pool. > > > > david jencks > > > > On Oct 19, 2013, at 1:41 PM, bokie <[email protected]> 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: [email protected] > >> For additional commands, e-mail: [email protected] > >> > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [email protected] > > For additional commands, e-mail: [email protected] > > > >

