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

Ask Your Question

Can 2 polling containers have same template ?

I'm planning to create 2 polling containers in 1 GSC. Can they both have same template ? If yes will it work ? I know obvious question will be why not then create just 1 polling container ? The reason is, my 1st polling container will listen to HIGH priority jobs and then when HIGH priority jobs will be unavailable, same container will start listening LOW priority jobs. ..... At the same time my 2nd polling container will listen to LOW priority jobs.....! In this situation both polling containers will be listening to LOW priority jobs.

asked 2014-03-21 14:53:28 -0500

Atul gravatar image
edit retag flag offensive close merge delete


How are you planning to have the first polling container switch from HIGH to LOW in your template?

Patrick gravatar imagePatrick ( 2014-03-22 16:55:11 -0500 )edit

I will use @DynamicEventTemplate method which will be called by polling container to receive jobs. In this method I will use parameterized query 'WHERE priority=?'

In same method I will query space to check if there are HIGH priority jobs available or not.

if(highPriorityJobs) priority='HIGH' else priority='LOW'

Atul gravatar imageAtul ( 2014-03-23 07:46:41 -0500 )edit

Why not having the first one using a template using :priority>0This will cover both high and low priority.and the other one :priority = 2This will cover only high.U can also have priority = 1 or priority =2 with the first one.I'm not sure why u need the DynamicEventTemplate.Shay-------- Original message --------From: forum@ask.gigaspaces.org

shay hassidim gravatar imageshay hassidim ( 2014-03-23 13:31:15 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

Should work.

answered 2014-03-21 19:04:19 -0500

shay hassidim gravatar image
edit flag offensive delete link more

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: 2014-03-21 14:53:28 -0500

Seen: 54 times

Last updated: Mar 21 '14