openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Linskey (JIRA)" <j...@apache.org>
Subject [jira] Commented: (OPENJPA-117) Collection of TransactionListeners registered to a Broker should be available as unmodifiable collection
Date Tue, 30 Jan 2007 18:11:33 GMT

    [ https://issues.apache.org/jira/browse/OPENJPA-117?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12468724
] 

Patrick Linskey commented on OPENJPA-117:
-----------------------------------------

So an alternate approach that would not expose any additional interfaces would be for the
code to call Broker.putUserObject() at the same time as it set up the listener, and then check
the user object beferehand:

OpenJPAEntityManager oem = OpenJPAPersistence.cast(em);
if (oem.getUserObject(MyListener.class) == null) {
    TransactionListener tl = new MyListener();
    oem.addTransactionListener(tl);
    oem.putUserObject(MyListener.class, tl);
}

> 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.


Mime
View raw message