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

Ask Your Question

FIFO mode template question

I have a question regarding FIFO mode.

If I turn on FIFO mode via IJSpace.setFifo(true), do I need to do anything special to new entries or new templates (I use entries, not POJOs) ???

I tried using this mode and was swamped with exception about templates not being in FIFO mode (despite having cleaned out the space and restarted GS) -- so I was wondering if there was a step that I'm missing.

Also, are there any limitations to using FIFO mode in a cluster situation where there is a backup space running?

I read http://www.gigaspaces.com/wiki/displa... already, but it was not clear from this.



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

asked 2009-01-12 09:54:35 -0500

jazzbutcher gravatar image

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

jaissefsfex gravatar image
edit retag flag offensive close merge delete

3 Answers

Sort by » oldest newest most voted

7.0 includes better Ffio validations. Some scenarios in previous versions were not supported, but instead of throwing a validation exception the system proceeded to perform the operation without Fifo, which can be very misleading. For example, subscribing to notifications with fifo=true in the config and/or proxy with a template which is entry but not MetadataEntry is not supported, but does not throw an exception.

To make things clear:

  • Pojo is the main path for Using GigaSpaces, and offers the best fifo support (in terms of friendly API).
  • Using IJSpace.setFifo(true) is supported for backwards compatibility, but is deprecated and not recommended. This feature can be very confusing.
  • The same goes for specifying fifo=true in the url.
  • The only way to use Fifo with Entry is using IMetadataEntry/MetadataEntry. The first instance introduced to the space must be set with fifo=true to ensure the space knows to maintain fifo ordering for that type. After that, read/take/notify operations can be either fifo or non-fifo, as explained in the wiki.

Hope this make things more clear,


answered 2009-08-27 04:08:17 -0500

niv gravatar image
edit flag offensive delete link more


Thanks Niv,

This matches the info you posted in the Support system for the case I filed. Posting it here on the forum may help people avoid making the mistake I did!



jazzbutcher gravatar imagejazzbutcher ( 2009-08-27 14:20:15 -0500 )edit

I am now running with GS 7.0 XAP (we are using Entries, not POJOs).

I've read http://www.gigaspaces.com/wiki/displa...

We have enabled FIFO mode when listening for events via EventSessionConfig, however, we still receive InvalidFifoTemplateExceptions.

How do we avoid this?

Should we be using IJSpace.setFifo(true) ? Or should we be extending MetaDataEntry? Previous versions of GS discuss this here:


What is the best way to handle this in GS7.0 in an Entry-based (non-POJO) environment?



answered 2009-08-25 15:23:01 -0500

jazzbutcher gravatar image
edit flag offensive delete link more


If you want all the space activities (Take and notify) to be in FIFO mode – you should enable FIFO at the proxy level (IJSpace.setFifo(true).

If you would like to have FIFO only for notifications you should have the setFifo(true) for the template (which its class need to extend MetaDataEntry) and also have the fifo parameter used with the EventSessionConfig.


shay hassidim gravatar imageshay hassidim ( 2009-08-25 16:35:13 -0500 )edit

So, if we DO NOT use MetaDataEntry, we should be able to set IJSpace.setFifo(true) and we will get fifo behavior ok?

Perhaps I'm doing something wrong, but I'm not seeing this happen now.

GS7.0 doc says IJSpace.setFifo() is deprecated.

Is it better (or any different) to use the option on the space URL ?fifo ???

It seems like something is different about the behavior of FIFO from 6.6 to 7.0... previously we had no uses of MetaDataEntry and no use of IJSpace.setFifo() -- we just called setFifo on the EventSessionConfig for notifications and all was well. That doesn't seem to work now, as I described above.



jazzbutcher gravatar imagejazzbutcher ( 2009-08-26 10:23:15 -0500 )edit

Do you need FIFO support for take operations or for Notify Operations? There is no FIFO support across different partitions - only at the partition level.

In general you need to use the IJSpace.setFifo(true) or jini:////mySpace?fifo=true to enable FIFO for all classes.


answered 2009-01-12 10:04:49 -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: 2009-01-12 09:54:35 -0500

Seen: 114 times

Last updated: Aug 27 '09