• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

Best way to implement Multi-tenancy

 
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
any comments?
 
Rancher
Posts: 2759
32
Eclipse IDE Spring Tomcat Server
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Start at the beggining.
 
Rancher
Posts: 43028
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are any number of ways to do it; which one is best in your situation depends on the circumstances about which we know nothing. Maybe you can ask a more specific question.
 
Bharat Kasodariya
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually, I have developed ERP app in Vaadin+Hibernate. Now I want to put multitenancy support without major change in existing code.
Like for the authentication support people can use spring security kind of framework.So is there any api which I can plugin in to the app?
 
author
Posts: 23928
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bharat Kasodariya wrote:Actually, I have developed ERP app in Vaadin+Hibernate. Now I want to put multitenancy support without major change in existing code.
Like for the authentication support people can use spring security kind of framework.So is there any api which I can plugin in to the app?



Multitenancy is a feature of an application -- meaning it is at the application layer. Applications need to be designed, and then implemented / ported to be that way. You can't just take an application, configure a security feature and be done,

You *do* need to make sure that users are authenticated (as you mentioned)... but... You also need to make sure that these authenticated users don't see each other's data. You need to make sure that the users requests don't step on each other requests. And finally, you need to be able to monitor (and maintain) the response time SLAs.


As an analogy, it is like trying to convert a mansion into a hotel. You can't do it just by adding a security guard and a check-in desk.

Henry
 
Bharat Kasodariya
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Henrik,

I agreed its application layer related change. I just asked because I thought may be some one might have seen such type of api.
If it is available then can get some new thought but if it is not then we have to add by our own implementation.

you might have heard about Athena framework which really has this feature.
http://www.athenasource.org/java/multitenancy-tutorial.php?part=1
http://www.athenasource.org/java/videoguide/TutorialJavaEmpDir.htm
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bharat Kasodariya wrote:
you might have heard about Athena framework which really has this feature.


From their docs:

Athena Framework is a full fledged enterprise object-relational mapping (ORM) framework



So the question really is, do you use any ORM frameworks in your application? If yes, is it Athena?

Athena can only handle multi-tenancy at the ORM level. You just cant use Athena or any such framework randomly in your application and expect it to handle multi-tenancy. Your application will also have to be designed to handle multi-tenancy at various other levels in the application. So like Henry said, there's no magic API or solution to do that. Each layer of your application has to be designed to handle multi-tenancy.
 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
By the way, it's always good to be forthright about having asked the same question in some other forum https://community.jboss.org/message/746386#746386. That way, volunteers in either forum can decide whether its worth spending time on a possibly answered question.
 
Bharat Kasodariya
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks All.
I needed it at data level for viewing data as per user. I have used hibernate as an ORM. I tried it by using global filter feature of hibernate. It seems ok with it.
 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Bharat Kasodariya wrote:I have used hibernate as an ORM.



These articles and a webinar might help then:

http://in.relation.to/Bloggers/MultitenancyInHibernate
https://community.jboss.org/wiki/Multi-tenancyDesign
http://vimeo.com/20296211
 
Bharat Kasodariya
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Jaikiran
 
Bharat Kasodariya
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
implemented it by using hibernate filter.
 
You would be much easier to understand if you took that bucket off of your head. And that goes for the tiny ad too!
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic