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

Ask Your Question
0

Associating templates with listeners in a polling container

The namespace configuration makes it simple to configure gigaspaces using Spring contexts, but I am confused by the following structure...

<os-events:polling-container id="translationContainer" giga-space="space" concurrent-consumers="4"> <os-core:template> <bean class="com.company.app.Task"> <property name="taskWorkflow" value="POST"/> </bean> </os-core:template> <os-events:listener> <os-events:method-adapter method-name="process"> <os-events:delegate ref="validator"/> </os-events:method-adapter> </os-events:listener> </os-events:polling-container>

I can see that the polling container will call the Validator.process method when a Task object in the space has a taskWorkflow property with a value of POST.

Now suppose that the taskWorkflow property can have many different values, and I have a separate listener for each of these states. How would I wire each of these properties to a specific listener?

{quote}This thread was imported from the previous forum. For your reference, the original is [available here|http://forum.openspaces.org/thread.jspa?threadID=2453]{quote}

asked 2008-07-13 12:39:10 -0500

oravecz gravatar image

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

jaissefsfex gravatar image
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

So is a polling container very lightweight? I mean, would there be a point where it is more efficient to use an adapter pattern for any state change versus a separate polling container for each state change?

Thanks...

answered 2008-07-15 05:37:15 -0500

oravecz gravatar image
edit flag offensive delete link more

Comments

You can check the code. There is nothing special over there. I don't see any problem having plenty of such. We should check the possibility to consolidate several polling containers using relevant template. Shay

Edited by: Shay Hassidim on Jul 15, 2008 8:41 AM

shay hassidim gravatar image shay hassidim  ( 2008-07-15 08:41:25 -0500 )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

Stats

Asked: 2008-07-13 12:39:10 -0500

Seen: 43 times

Last updated: Jul 15 '08