You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by kveskimae <ve...@gmail.com> on 2017/09/08 13:42:34 UTC
Starting atomic sequence in Spring XML configuration
Hey,
Looking for a a way to start atomic sequences in Spring XML. My
configuration XML contains
<bean id="mycache"
class="org.apache.ignite.configuration.CacheConfiguration">
...
and
<bean id="mygrid"
class="org.apache.ignite.configuration.IgniteConfiguration">
...
I tried replacing both the cache and grid with a version that initializes
sequences like following
<bean id="mygrid" class="com.foo.SequencesInitializingIgniteConfiguration">
public class SequencesInitializingIgniteConfiguration implements
InitializingBean
{
@Override
public void afterPropertiesSet() throws Exception
{
final Ignite grid = Ignition.ignite("mygrid");
final IgniteAtomicSequence seq = grid.atomicSequence(...
}
}
but while building the properties the grid wasn't started yet... So I was
searching for sth in cache & ignite configuration or the schema XSD for a
way how can I add some atomic sequences to configuration, to no avail.
Any ideas how I might add some sequences to my Spring XML?
Kind regards,
Kristjan
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: Starting atomic sequence in Spring XML configuration
Posted by Mikhail <mi...@gmail.com>.
Hi,
Try to use lifecycleBeans:
https://apacheignite.readme.io/docs/ignite-life-cycle
after ignite starting you create a new sequence.
Thanks,
Mikhail.
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/