Skip to main content



      Home
Home » Eclipse Projects » EclipseLink » setTableQualifier(schema) without transaction
setTableQualifier(schema) without transaction [message #900899] Wed, 08 August 2012 17:37 Go to next message
Eclipse UserFriend
For one of our persistence units, we have a requirement to switch the schema prefix based on context at various times during a session.

We found this call:
session.getLogin().setTableQualifier(schema);

...however the problem is to get the session, you need to be in a transaction. At this time, most of our services are not @Transactional.

Any thoughts on alternative ways to switch the schema prefix would be appreciated.

Thanks!
-Ed

EL/JPA: 2.3.0, Database: Oracle 11g
Re: setTableQualifier(schema) without transaction [message #905044 is a reply to message #900899] Wed, 29 August 2012 11:31 Go to previous message
Eclipse UserFriend
You cannot switch the schema at runtime.

You need either a different persistence unit, or EntityManagerFactory per schema, or change the schema based on the user and pass the user when creating the EntityManager.
Previous Topic:Anyone using EclipseLink-EIS
Next Topic:Copygroup
Goto Forum:
  


Current Time: Fri Jul 25 03:55:28 EDT 2025

Powered by FUDForum. Page generated in 0.03164 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top