Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Schema per Tenant issues
Schema per Tenant issues [message #1062321] Fri, 07 June 2013 04:00 Go to next message
Thomas Kratz is currently offline Thomas Kratz
Messages: 163
Registered: July 2009
Senior Member
Hi all, I have been playing around with schema per tenant, with little success.

First I couldn't make Inheritance structures with a underlying MappedSuperclass followed by "real" inheritance in the tree. I have seen that ClassDescriptor do not get initialized correctly leading to all over strange errors.

Then for heavens sake, I removed those structures and found that the vm crashes after a while with outofmemory, the heap dump telling me that 100's of Megs of RelationalDescriptors couldn't be collected.

Has anyone seen issues like this?
Re: Schema per Tenant issues [message #1062976 is a reply to message #1062321] Tue, 11 June 2013 11:01 Go to previous messageGo to next message
James Sutherland is currently offline James Sutherland
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

How have you been using schema per tenant, do you declare the tenant in your persistence.xml, or pass it when you create an EntityManagerFactory or an EntityManager?

Is your application holding onto the old EntityManagers, or EntityManagerFactories? Are you using a server or framework (WLS, Glassfish, Spring, OSGi, etc.)?

If you can isolate a specific test that recreates the inheritance issue, please log a bug.


James : Wiki : Book : Blog : Twitter
Re: Schema per Tenant issues [message #1063166 is a reply to message #1062321] Wed, 12 June 2013 10:09 Go to previous messageGo to next message
Thomas Kratz is currently offline Thomas Kratz
Messages: 163
Registered: July 2009
Senior Member


I pass the tenant_id on EM creation in a slightly modified spring transaction manager inside gemini blueprint/osgi.
Spring should be closing the ems after the transcaction.

Could it be that those problems are related to the bundle weaver from angelo zerr that I'm using?

What about including the tenant-id in the keys for the shared cache? Would make life great.

[Updated on: Thu, 13 June 2013 00:45]

Report message to a moderator

Re: Schema per Tenant issues [message #1063912 is a reply to message #1063166] Sat, 15 June 2013 02:36 Go to previous messageGo to next message
Thomas Kratz is currently offline Thomas Kratz
Messages: 163
Registered: July 2009
Senior Member
Hey James et al.

I was able to reproduce all of my issues in a simple setup using spring (so I could strip out the blueprint complexity)

I created some testcases
https://github.com/eiswind/eclipselink-schema-per-tenant

And filed a ticket for each of the problems.

Hope this helps.
Re: Schema per Tenant issues [message #1064286 is a reply to message #1063912] Tue, 18 June 2013 10:41 Go to previous messageGo to next message
James Sutherland is currently offline James Sutherland
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

Can you recreate the issue without Spring? It may be related to your Spring usage.

James : Wiki : Book : Blog : Twitter
Re: Schema per Tenant issues [message #1064290 is a reply to message #1064286] Tue, 18 June 2013 10:48 Go to previous messageGo to next message
Thomas Kratz is currently offline Thomas Kratz
Messages: 163
Registered: July 2009
Senior Member
Hey James,

The testcases I provided use spring only for the EMF and datasource creation.
I don't think this should be cross related as those issues dont appear when I use the discriminator approach. I already spent a day on reproducing with testcases, so I hope at least now someone will take a look at it.
Re: Schema per Tenant issues [message #1064312 is a reply to message #1064286] Tue, 18 June 2013 11:42 Go to previous messageGo to next message
Thomas Kratz is currently offline Thomas Kratz
Messages: 163
Registered: July 2009
Senior Member
Just to make sure I'm not going wrong I did remove the spring dependencies from the Testcases. Source is at github, issues still valid.
Re: Schema per Tenant issues [message #1211232 is a reply to message #1064312] Tue, 26 November 2013 05:27 Go to previous message
dirvan vargas is currently offline dirvan vargas
Messages: 1
Registered: November 2013
Junior Member
I got some success on this issue by clearing the values ​​of "session.descriptors", "ClassDescriptor.referencingClasses" and "ClassDescriptor.mappingsPostCalculateChanges" on the release of "ClienteSession", does this can cause me future problems? Any predictions correction, because the problem actually exists and is very serious.
Previous Topic:isLoaded NullPointerException
Next Topic:LAZY LOADING ONETOONE MANYTOONE
Goto Forum:
  


Current Time: Sun Aug 31 02:40:55 EDT 2014

Powered by FUDForum. Page generated in 0.01901 seconds