How to use Edition Based Redefinition with Apex
I've been experimenting with Edition Based Redefinition (EBR), and wanted to see how this would work with an Apex frontend. I made 2 versions of my application, which in Apex are 2 applications, say v1 and v2. What I'm trying to achieve now is that a user is working in v1 against edition ed1, while another user is working in the new edition ed2 using the application v2.
I've tried setting the edition in the aplpication properties, tab security, in the initialization pl/sql that can be entered there. However, this doesn't work. I've used dbms_session.set_edition_deferred, and I can see that it get's called on every post I do from the apex applications, but (due to connection pooling?) sometimes the post from application v1 gets handled by a session using ed2, so errors occur.