# Multi-tenancy for Bahmni Lite (and OpenMRS)

**URL:** <https://talk.openmrs.org/t/multi-tenancy-for-bahmni-lite-and-openmrs/37927>\
**Category:** Bahmni\
**Tags:** multi-tenancy, openmrs\
**Created:** [November 15, 2022, 5:36am UTC](https://talk.openmrs.org/t/multi-tenancy-for-bahmni-lite-and-openmrs/37927 "2022-11-15T05:36:01Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [November 16, 2022, 9:59pm UTC](https://talk.openmrs.org/t/multi-tenancy-for-bahmni-lite-and-openmrs/37927/3 "2022-11-16T21:59:21Z")

</div>

> [@ramashish](#):
>
> Has OpenMRS team explored Hibernate 5 interfaces - [MultiTenantConnectionProvider](https://docs.jboss.org/hibernate/devguide/en-US/html/ch16.html#d5e4644) and [CurrentTenantIdentifierResolver](https://docs.jboss.org/hibernate/devguide/en-US/html/ch16.html#d5e4669)?

This is the closest attempt, that i have seen, in that direction:

> [@Multi-tenant architecture / feedback](https://talk.openmrs.org/t/multi-tenant-architecture-feedback/23416):
>
> I started working on a multi-tenant branch and was interested in feedback, but I’m not sure it’s ready for a pull-request. You can see the diff at [on Github](https://github.com/openmrs/openmrs-core/compare/master...ATLCTO:feature/multi-tenant?expand=1), but it’s mostly just integrating Hibernate Multi-tenancy. It’s able to route the correct database by using the requested hostname; so for example if your domain is [hospital.com](http://hospital.com) and you point [clinic1.hospital.com](http://clinic1.hospital.com) and [clinic2.hospital.com](http://clinic2.hospital.com) to the same openmrs server, then the requests would be routed to the same mysql server, but use clinic1…

---

_[View the full topic](https://talk.openmrs.org/t/multi-tenancy-for-bahmni-lite-and-openmrs/37927)._
