[
https://issues.apache.org/jira/browse/OPENJPA-117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12469093
]
Pinaki Poddar commented on OPENJPA-117:
---------------------------------------
> Adding listeners should generally either be done as an initialization step
Of course. The use case that prompted the request is the code that registers
listeners do not initialize Persistence/EntityManagers. At least that is what I
gathered from the users' input. Did not feel 'strongly' about the use case
either which reflects in the 'minor' priority of the request.
As an alternative, one may consider a listener mechanism attached to the
BrokerFactory itself that will notify creation/closure of managed Brokers. Then
a user code that does not explictly control Broker may get a hook during broker
initialization/closure.
Exposing list of listeners does raise the concern about one user removing
others listeners -- but isn't one of the prevailing themes of OpenJPA
architecture thrieves upon the users having deep visibility and customization
of its myriad internal features?
> Collection of TransactionListeners registered to a Broker should be available
> as unmodifiable collection
> --------------------------------------------------------------------------------------------------------
>
> Key: OPENJPA-117
> URL: https://issues.apache.org/jira/browse/OPENJPA-117
> Project: OpenJPA
> Issue Type: Improvement
> Components: kernel
> Reporter: Pinaki Poddar
> Assigned To: Pinaki Poddar
> Priority: Minor
>
> Currently TransactionListeners can be added/removed to a broker but the list
> of transaction listeners registered to a particular broker is not available.
> Such a collection can be made available in read-only mode so a caller can
> determine whether to add a new listener or not, or whether a particular
> listener is already registered.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.