|Re: Changing schema of ClassDescriptor in Container [message #1085281 is a reply to message #1082389]
||Mon, 12 August 2013 17:55
| Gene Turner
Registered: September 2011
First, thanks for the help.|
But, I have some "severe" requirements, which are getting really ugly to handle in Eclipselink that should be relatively simple, I am just having loads of fun finding the "right" way to do this.
First, I am in a container using Stateless EJBs where the PersistenceContext/Unit is injected. I have to maintain transaction consistency with the container. Second, the schema (table qualifier) is not set on all entities, and I have to be able to set it "uniquely" for each user accessing the application.
What I tried to do with your code, is to set a ThreadLocal with the schema ID in the servlet, then connect to the Session bean and see the SchemaCustomizer fire and let me set the schema for THAT session. But as far as I can tell, the customizer is only firing once for eclipselink logging into the database. It never fires again until I reload the application! I am looking into the "Dynamic" classes, but I am limited to JPA1 in this container (WebLogic 10.3) so I have to be very careful that I don't grab JPA2 capabilities.
If anyone can provide some help, again, GREATLY APPRECIATED.
Powered by FUDForum
. Page generated in 0.04273 seconds