[
https://issues.apache.org/jira/browse/OPENJPA-305?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12517415
]
Pinaki Poddar commented on OPENJPA-305:
---------------------------------------
Dynamic (i.e. while EntityManagerFactory is alive) change of Configuration will
impact the pooling of BrokerFactory (which is the core implementation of which
EntityManagerFactory is a facade).
The pool maintains a Map of poolKey to BrokerFactory. A poolKey is effectively
the Configuration expressed as a Property. So dynamically changing
configuration properties must take into account the integrity of this pool
which is till now based on the assumption of constancy of Configuration.
Possibility of using IdentityHashMap and use the Configuration instance (not
its Property values) as key:
This is most likely *not* going to work. The idea of freezing the config at
the first place (perhaps) originated because callers who supply new copies of
Configuration (that are same by value but not by identity) expect to get the
same Factory.
> Dynamic configuration of EntityManagerFactory
> ---------------------------------------------
>
> Key: OPENJPA-305
> URL: https://issues.apache.org/jira/browse/OPENJPA-305
> Project: OpenJPA
> Issue Type: New Feature
> Reporter: Pinaki Poddar
>
> OpenJPA configures EntityManagerFactory at creation time via an instance of
> Configuartion object. Once EntityManagerFactory is created and a
> EntityManager is issued from it -- the Configuration is frozen by design.
> That is no further changes to Configuration is allowed as long as
> EntityManagerFactory lives.
> For certain configuration properties, it is desirable to change them during
> the lifetime of a EntityManagerFactory.
> This issue is raised to initiate a discussion on such a feature, the
> possibility and limitations of dynamic update and track the impact of such a
> change as frozen Configuration is an important assumption.
>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.