Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Using Spring's AbstractRoutingDataSource with EL

Hi Andreas,

I am not familiar with AbstractRoutingDataSource but if it solves multitenancy then this may be of your interest: https://wiki.eclipse.org/EclipseLink/Examples/JPA/Multitenant

Peter

________________________________________
From: eclipselink-users <eclipselink-users-bounces@xxxxxxxxxxx> on behalf of Andreas Joseph Krogh <andreas@xxxxxxxxxx>
Sent: 04 May 2021 17:37
To: eclipselink-users@xxxxxxxxxxx
Subject: [eclipselink-users] Using Spring's AbstractRoutingDataSource with EL

Hi all.

We are using Spring's AbstractRoutingDataSource successfully to proxy some services to different databases (with the same schema, only different data/customers).

Does EL provide a similar way to use the same @Entity-mapped model against different DataSources? I'm not interested in named PUs as the routing should be done at runtime, dynamically, based on some ThreadLocal the application controls (ie. sets/removes at the start/end of a HTTP-request).

--
Andreas Joseph Krogh
CTO / Partner - Visena AS
Mobile: +47 909 56 963
andreas@xxxxxxxxxx<mailto:andreas@xxxxxxxxxx>
www.visena.com<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.visena.com%2F&data=04%7C01%7Cpeter.ondruska%40kaibo.eu%7C2de801e0d5a34d6c7dc608d90f12833c%7C971fa002c3a649c18191cb7e49d9cb77%7C0%7C0%7C637557394455656418%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=u6Bz46lPFPI%2FBgeU1Ss%2BFGysw%2FRK94x3FH4R8miHuNo%3D&reserved=0>
[cid:part_F93786913246752FHTI]<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.visena.com%2F&data=04%7C01%7Cpeter.ondruska%40kaibo.eu%7C2de801e0d5a34d6c7dc608d90f12833c%7C971fa002c3a649c18191cb7e49d9cb77%7C0%7C0%7C637557394455661407%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=EwlcKQIOgblHmijq5l39GDtIezBH1Oedhvq3WivlXc0%3D&reserved=0>


Back to the top