New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Database.from(<DataSource>) has been removed #4
Comments
We can add that method but in the meantime just make a ConnectionProvider
that delegates to your DataSource.
…On Wed, 27 Sep. 2017, 12:17 Frank Lyaruu ***@***.***> wrote:
I'm using rxjava-jdbc and I use Database.from() pretty much everywhere.
I'm upgrading to RxJava2 and see that that is no longer possible.
Is this intentional? Is there a straightforward work around?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#4>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AATa69WVpL-RDgBnlcmE1sVwFdAF3Qn5ks5smiCtgaJpZM4PliX1>
.
|
Ok, I know create a 'ConnectionProviderFromDataSource' (basically copied from the rxjava1 jdbc impl) that wraps the DataSource, use that when creating a Pool, and pass that when querying a datasource. Seems to work fine, thanks! |
I will need to add some strategies for using DataSources because they are
normally shared across multiple applications and if you specify a
non-blocking pool then it will not return connections to the container for
use by other applications. I'll have a think about it, suggestions welcome.
…On Wed, 27 Sep. 2017, 16:06 Frank Lyaruu ***@***.***> wrote:
Closed #4 <#4>.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#4 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AATa65_Gnq21c2CaTFLBg755s2kSLDt8ks5smlW7gaJpZM4PliX1>
.
|
I'll reopen this while I'm working on it. I'll need for starters to do some unit testing with a blocking ConnectionProvider (and make them easy to create from a DataSource for instance). |
@flyaruu Out of curiosity do you deploy your application to a container so that the DataSource is shared with other applications or is it standalone? I've added a method I'll be discussing these options in the README shortly:
|
Right now they are mixed. I'm rewriting part of a legacy application to use a reactive model, perhaps I'll do all of it at some point, but realistically I think it will coexist with blocking calls. |
0.1-RC8 has been released with support for blocking connection providers (like a shared DataSource).
0.1-RC9 will have an overload in the I'll release 0.1-RC9 in a day or two. |
Sounds great! I'll have a look at it, thanks! |
Works like a charm! |
I'm using rxjava-jdbc and I use Database.from() pretty much everywhere. I'm upgrading to RxJava2 and see that that is no longer possible.
Is this intentional? Is there a straightforward work around?
The text was updated successfully, but these errors were encountered: