Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Custom Sequence Generators with NON-JPA API?(Trying to implement a non-table based Sequence Generator with the old-style toplink-API (and not having much fun))
Custom Sequence Generators with NON-JPA API? [message #1677423] Sun, 15 March 2015 22:20
Thom Park is currently offline Thom ParkFriend
Messages: 12
Registered: June 2012
Junior Member
Hi Folks,

I'm still in non-JPA purgatory and struggling with trying to implement an equivalent of the steps described in:

http://wiki.eclipse.org/Category:EclipseLink/Example/JPA

That example is really good for JPA-based implementations but I'm stuck with the pre-JPA API implementation.
Does anyone have any idea if this is even possible outside of the JPA persistence context?

What I'm basically trying to do is produce a customized variant of the good old Sequence but every attempt I've made to craft one (and basically use a service call to fetch the next batch of sequence numbers instead of accessing a table) has failed with various weird NPEs due to my state being wrong.

The example quoted above referred to using a session customizer to handle the sequence generation but there doesn't appear to be a way to wire that approach into the pre-JPA eclipselink word (I'm actually using version 2.0.2 in one deployment and 2.2.0 in another - 2.5.2 proves to be a bit unstable for some of the fetch flows that work well in 2.0.2 so I cannot jump to that version)

I've tried the Sub-classing DefaultSequence (and Sequence) and assigning the new subclass and adding the sequnece to the login. Then referred to the sequence by name in my entity definition (that failed as the platform associated with the sequence was null)

I also tried overriding the sequence associated with the Class descriptor of the particular class I was trying to assign a service-based key generator for when loading my project (via the Java API).

That too ended badly.

So - can anyone remember far enough back in time to tell me if it's even possible to setup a custom sequence generator that's not based on the existing table scheme with eclipselink/toplink that isn't based on JPA?

Previous Topic:@MappedSuperClass with InheritanceType.JOINED nullPointerException
Next Topic:@AttributeOverride at class level for inhereted map attribute
Goto Forum:
  


Current Time: Tue Feb 27 06:35:15 GMT 2024

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

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

Back to the top