• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Spring and multitenancy

 
Bartender
Posts: 1357
39
IBM DB2 Netbeans IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've developed a conceptual proof of a Spring Boot application with support for multitenancy. In a nutshell, my project consists of some API services (defined with interfaces), each with different implementations, and more than a single JPA entity manager to work with.
Both actual service implementation and JPA Entity manager are selected based upon a tenant-id that it's sent via API request.

I have to confess that realizing a multitenant-aware spring boot project, in which non only EMs , but also services injection are dependent on a request token was a really tricky work, mainly because Spring boot doesn't support multitenancy easily out of the box.
Now, despite my self-satisfaction for being able to solve an architectural puzzle, I wonder if nowadays is still important to develop a multitenant architecture, or such approach isn't anything more than a vestigia of  pre-container times. I mean, with spring it would be a lot easier to use profiles to separate tenant and deploy different instances with docker (for example). An hint that multitenancy should be avoid if not strictly necessary may be the very same fact that Spring doesn't support it 'natively'.

What do you think about ?

 
reply
    Bookmark Topic Watch Topic
  • New Topic