Welcome to the new Gigaspaces XAP forum. To recover your account, please follow these instructions.

Ask Your Question

Is it possible to have two event listeners

I have a polling container with a template and event listener. When the template is received, the listener starts, proceeds the template bean and saves it into space. Everything works.
Now I have to add another listener which should process the same bean but selected by different criteria.
Something like this:

<os-events:polling-container id="dataProcessorPollingEventContainer" giga-space="gigaSpace">
        <os-events:tx-support tx-manager="transactionManager"/>
            <bean class="my.template.Bean">
                <property name="prop" value="EMPTY"/>
            <os-events:annotation-adapter write-lease="1000">
                <os-events:delegate ref="simpleListener1"/>


This is the second listener, I have to add:
            <bean class="my.template.Bean">
                <property name="anotherProp" value="false"/>
            <os-events:annotation-adapter update-or-write="false" update-timeout="1000" write-lease="1000">
                <os-events:delegate ref="simpleListener2"/>


Is that possible? Can you provide me some links with information?
I'm using XAP Community 7.1.1 with space:
 <os-core:space id="space"
            url="/./processorSpace" schema="persistent"


This thread was imported from the previous forum.
For your reference, the original is available here

asked 2010-12-06 10:12:13 -0600

jeni_m gravatar image

updated 2013-08-08 09:52:00 -0600

jaissefsfex gravatar image
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted


A polling container or notify container could have only one template. If you need multiple event handlers you will need to create another polling container or notify container. If you use multiple polling containers make sure the different templates does not overlap each other.


answered 2010-12-06 10:23:47 -0600

shay hassidim gravatar image
edit flag offensive delete link more


Thanks, Shay

jeni_m gravatar image jeni_m  ( 2010-12-06 10:43:54 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2010-12-06 10:12:13 -0600

Seen: 243 times

Last updated: Dec 06 '10