-
Notifications
You must be signed in to change notification settings - Fork 33
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
Multitenancy support #253
Comments
I see that this build step is "overrideable" in the extension:
... however I cannot find documentation or examples on how I could override an extension's build step, either in my app or in an "extension's extension"... any pointers? Thanks! |
Well, This |
Makes sense, are there any documentation or examples explaining how you can write an "extension's extension"? I did read Building my first extension and the Writing your own extension
Thanks! |
Yeah, please refer to the quarkus guides. We all start from there .
Yeah, and you need to add
Sure, see above comment.
Yeah, you are right. Please check
No, I don't think so. And if you like, I'm happy to add it as a part of |
I think it would make a lot of sense having an extension for just multitenancy, the approach is very well described for oidc and for hibernate, but I couldn’t find anything related to MyBatis. |
Sorry for the confusion and I just proposal to have |
That would make sense... however I looked into this today and I can't figure oI tried ut a proper design. I can use extensions to create my custom SqlSessionFactory, but I don't know how to obtain the current RoutingContext from inside openSession (short of using thread locals which doesn't seem great). I feel there is to much I don't know about Quarkus & CDI to design something solid, so hopefully someone more capable can look into this. |
You may refer to Quarkus CDI guide and also Feel free to share your thoughts and codes, I think we can find some experts from Quarkus community to help to figure it out. Aslo it would be a great opportunity to learn more details about Quarkus Extension development. Good luck! |
I'd love to see something like this, too. In my case, I'd like to adjust what user credentials are used to connect to the database, based on authentication details provided to quarkus. I'm new to mybatis, but I think outside of quarkus that would be supported by a custom |
@eggyknap Are you interesting to work on it? |
That's a reasonable question. I'll need to think about it. I'll mention it here if I feel I can contribute. I feel much like @franck102 : there's a lot about quarkus and CDI I don't know.
|
Hi,
Is there any recommended pattern for implementing multitenancy support using a schema-per-tenant approach using this extension?
The SQLSessionFactory.openSession method would be the perfect place to configure the connection for a tenant, however it looks like the build steps have hardcoded the use of
org.apache.ibatis.session.SqlSessionFactoryBuilder
which in turn will always resort toorg.apache.ibatis.session.defaults.DefaultSqlSessionFactory
.Is there any way to provide a custom session or factory to the extension?
The text was updated successfully, but these errors were encountered: