« Return to Thread: Why doesn't Datasource implement DataSource?
Re: Why doesn't Datasource implement DataSource?
Hi Steven,
I was going to look over this, but the pastebin entries have already
been removed automatically. Could you maybe create an issue in Jira
that contains the code snippets and use the improvement issue type.
Like this nothing can get lost and it's easy to follow up on.
Thanks!
Geert
On 27 Aug 2006, at 09:14, Steven Grimm wrote:
> At the risk of talking to myself, I got something working. I ended
> up making a new class (which I rather unimaginatively called
> DatasourceDataSource) that takes a RIFE Datasource as input. It
> implements javax.sql.DataSource. It returns instances of a
> DbConnection wrapper (DbConnectionConnection) that delegates to
> either the DbConnection object or to the underlying JDBC object
> where DbConnection doesn't have an equivalent method.
>
> I've posted my code at http://rifers.org/paste/show/1600 and http://
> rifers.org/paste/show/1601 if anyone wants to check it out. I have
> successfully wired this to iBatis and Quartz using Spring; I
> haven't exhaustively tested it but it appears to work. I used it in
> combination with the DatasourceFactory and
> AutowiringParticipantSpringWeb classes which are both on the RIFE
> Wiki's "Spring integration" page.
>
> To make this work, I had to modify DbConnection to add a getter for
> the underlying Connection object. That method is posted at http://
> rifers.org/paste/show/1602 (not that there's much to it.)
>
> The only place where DbConnectionConnection is more than just a
> simple delegating wrapper is in the setAutoCommit() method, which
> calls beginTransaction() or commit() on the DbConnection object. I
> *think* that's the right implementation to allow non-RIFE code to
> interact with RIFE transactions. (Less certain about the commit()
> call than the rest of it, though.)
>
> Is this approach reasonable?
>
> -Steve
>
> _______________________________________________
> Rife-devel mailing list
> Rife-devel@...
> http://lists.uwyn.com/mailman/listinfo/rife-devel
>
--
Geert Bevin
Uwyn "Use what you need" - http://uwyn.com
RIFE Java application framework - http://rifers.org
Music and words - http://gbevin.com
_______________________________________________
Rife-devel mailing list
Rife-devel@...
http://lists.uwyn.com/mailman/listinfo/rife-devel
I was going to look over this, but the pastebin entries have already
been removed automatically. Could you maybe create an issue in Jira
that contains the code snippets and use the improvement issue type.
Like this nothing can get lost and it's easy to follow up on.
Thanks!
Geert
On 27 Aug 2006, at 09:14, Steven Grimm wrote:
> At the risk of talking to myself, I got something working. I ended
> up making a new class (which I rather unimaginatively called
> DatasourceDataSource) that takes a RIFE Datasource as input. It
> implements javax.sql.DataSource. It returns instances of a
> DbConnection wrapper (DbConnectionConnection) that delegates to
> either the DbConnection object or to the underlying JDBC object
> where DbConnection doesn't have an equivalent method.
>
> I've posted my code at http://rifers.org/paste/show/1600 and http://
> rifers.org/paste/show/1601 if anyone wants to check it out. I have
> successfully wired this to iBatis and Quartz using Spring; I
> haven't exhaustively tested it but it appears to work. I used it in
> combination with the DatasourceFactory and
> AutowiringParticipantSpringWeb classes which are both on the RIFE
> Wiki's "Spring integration" page.
>
> To make this work, I had to modify DbConnection to add a getter for
> the underlying Connection object. That method is posted at http://
> rifers.org/paste/show/1602 (not that there's much to it.)
>
> The only place where DbConnectionConnection is more than just a
> simple delegating wrapper is in the setAutoCommit() method, which
> calls beginTransaction() or commit() on the DbConnection object. I
> *think* that's the right implementation to allow non-RIFE code to
> interact with RIFE transactions. (Less certain about the commit()
> call than the rest of it, though.)
>
> Is this approach reasonable?
>
> -Steve
>
> _______________________________________________
> Rife-devel mailing list
> Rife-devel@...
> http://lists.uwyn.com/mailman/listinfo/rife-devel
>
--
Geert Bevin
Uwyn "Use what you need" - http://uwyn.com
RIFE Java application framework - http://rifers.org
Music and words - http://gbevin.com
_______________________________________________
Rife-devel mailing list
Rife-devel@...
http://lists.uwyn.com/mailman/listinfo/rife-devel
« Return to Thread: Why doesn't Datasource implement DataSource?
| Free Forum Powered by Nabble | Forum Help |
