-
-
Notifications
You must be signed in to change notification settings - Fork 198
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
Let ebean module support multiple named dataSources #771
Comments
Can you explain why database name isn't enough? The reason why jdbc module allow to use the New jdbc-like modules use the database name. |
Because in case there are many datasources, we need to specify its name when retrieve the instance via require() or injection in code. On the other hand, when the applications is deployed to prod environment, the datasource.url is determined by users, not by developers. We want more flexibility. BTW, in multi-datasource case with ebean module, the hot-reload feture doesn't work in dev mode. I mean, using |
That's a good argument.
Raise a new issue, add an example and error output. I will look later |
OK. I am going to raise a new issue now. |
Let ebean module support multiple named dataSources fix #771
Sometimes we need to connect to multiple databases within the same application. Currently with Jdbc
module we can do like this:
But with ebean module, we cannot name the EbeanServer bean on the same way. Currently Jooby just parses the url to 'guess' a database name, that makes it difficult to inject the ebeanserver via name. Why not we just use the Ebeanby's name as the datasource name?
The text was updated successfully, but these errors were encountered: