[ 
https://issues.apache.org/jira/browse/CAY-871?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrus Adamchik closed CAY-871.
-------------------------------

    Resolution: Won't Fix

As of 3.1 DataDomain is initialized via DI, so this should not be an issue. 
Moreover, implicitly creating a new EventManager is probably a bad idea as it 
starts some threads that need to be shutdown. So the current DI approach is 
probably the best way we can handle it.
                
> DataDomain instantiates with null EventManager
> ----------------------------------------------
>
>                 Key: CAY-871
>                 URL: https://issues.apache.org/jira/browse/CAY-871
>             Project: Cayenne
>          Issue Type: Bug
>          Components: Core Library
>    Affects Versions: 2.0 branch
>         Environment: MacOSX 10.4, Java5, Cayenne 2.0.2
>            Reporter: Emilian Bold
>            Assignee: Andrus Adamchik
>
> DataDomain instantiates with an empty event manager which later leads to a 
> NPE in DataRowStore.sendUpdateNotification.
> This makes the bug look as if it's a serialization issue (see 
> https://issues.apache.org/cayenne/browse/CAY-796) but actually all DataDomain 
> expects is something like:
> dataDomain.setEventManager(EventManager.getDefaultManager());
> This seems quite confusing for an API client as, unless you actually listen 
> for events, you don't care about the EventManager and expect it to be set 
> beforehand.
> Initializing DataDomain with the default manager which may be replaced at 
> will via setEventManager seems like a better approach.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to