[infinispan-issues] [JBoss JIRA] (ISPN-2432) enhance distributed executor service with submit(Task, Address...)

Mircea Markus (JIRA) jira-events at lists.jboss.org
Wed Oct 31 08:44:18 EDT 2012


     [ https://issues.jboss.org/browse/ISPN-2432?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mircea Markus updated ISPN-2432:
--------------------------------

    Fix Version/s: 6.0.0.Final

    
> enhance distributed executor service with submit(Task, Address...)
> ------------------------------------------------------------------
>
>                 Key: ISPN-2432
>                 URL: https://issues.jboss.org/browse/ISPN-2432
>             Project: Infinispan
>          Issue Type: Feature Request
>          Components: Distributed Execution and Map/Reduce
>    Affects Versions: 5.2.0.Beta2
>            Reporter: Mathieu Lachance
>            Assignee: Vladimir Blagojevic
>             Fix For: 6.0.0.Final
>
>
> as discussed with vladimir on user forum it would be nice to add to the DistributedExecutorService interface (or Advanced interface) a capability to submit a task to a particular address(es).
> my use case was to propagate a cdi event to all other members to the cluster as the local dispatch was already ensured with @Observes. 
> basically I wanted to do the following :
> @Inject Event<MyEventThatIWantToPropagateThatExtendsBaseEvent> myEvent;
> myEvent.fire(new MyEvent());
> @Inject BeanManager beanManager;
> onBaseEvent(@Observes final BaseEvent event){
>   List<Address> addresses = getAllOtherNodes();
>   DistributedExecutorService.submit(new Callable<Void>({
>     public Void run() throws Exception{
>       beanManager.fireEvent(event);
>     }
>   }), addresses);
> }
> onMyEvent(@Observes final MyEvent event){
>   System.out.println("this will be executed locally and on all other members of the cluster");
> }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the infinispan-issues mailing list