Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Parameterized SessionCustomizer with spring (or without)
Parameterized SessionCustomizer with spring (or without) [message #1002069] Thu, 17 January 2013 21:45 Go to next message
Alexander Bätz is currently offline Alexander BätzFriend
Messages: 6
Registered: August 2012
Junior Member
I want to use the snowflake id generator created by twitter. to do this i have to configure the snowflake sequence in my sessioncustomizer with certain parameters (datacenterid, serverid, ...).

what is the best (cleanest) way to give these values to my customizers?

I allready figured out that there is no way for me to supply an actual customizer instance to eclipselink (like i can do with datasources).

I'm using spring and spring-orm to configure my persistence context, maybe this helps.


Re: Parameterized SessionCustomizer with spring (or without) [message #1002240 is a reply to message #1002069] Fri, 18 January 2013 08:30 Go to previous message
Jorg Heymans is currently offline Jorg HeymansFriend
Messages: 26
Registered: July 2009
Location: Belgium
Junior Member
We use @Configurable for this

// because this class is instantiated by EclipseLink
public class EclipseLinkSessionCustomizer implements SessionCustomizer {

    private WebLogicJtaTransactionManager jtaTransactionManager;

    public void customize(Session session) throws Exception {
Previous Topic:JPQL ignores OrderBy annotation when using JOIN FETCH
Next Topic:Multi-threaded overwrites
Goto Forum:

Current Time: Tue Jun 19 16:34:59 GMT 2018

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

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

Back to the top