Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] multiple EntityManagers in one process

What version of EclipseLink are you using?  This session-name property usage is only available post EclipseLink 1.1
--Gordon


David Parker wrote:
If you need two ServerSessions to co-exist, try using "eclipselink.session-name" property:
Map prop1 = new HashMap();
// populate prop1
prop1.put("eclipselink.session-name", "session1");
EntityManagerFactory factory1 = persistence.createEntityManagerFactory("MyPU", prop1);
Map prop2 = new HashMap();
// populate prop2
prop2.put("eclipselink.session-name", "session2");
EntityManagerFactory factory2 = persistence.createEntityManagerFactory("MyPU", prop2);
 
I believe that should work but couldn't find a test and haven't tried it myself.


Thanks for your reply. I tried putting this property in the map, but the resulting factory has a ServerSession with the first ServerSession's name. I.e., my first factory was created with eclipselink.session-name = "default", and the second with eclipselink.session-name = "newdb",but the second factory still has a ServerSession with the name "default".

Is there perhaps some other config that needs to be done? This got my hopes up!

Thanks again.

- DAP

=============================================
David Parker





_______________________________________________ eclipselink-users mailing list eclipselink-users@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/eclipselink-users

Back to the top