Class SpringBeanExample


  • public final class SpringBeanExample
    extends java.lang.Object
    Demonstrates a simple use of Ignite configured with Spring.

    String "Hello World." is printed out by Callable passed into the executor service provided by Ignite. This statement could be printed out on any node in the cluster.

    The major point of this example is to show ignite injection by Spring framework. Ignite bean is described in spring-bean.xml file and instantiated by Spring context. Once application completed its execution Spring will apply ignite bean destructor and stop the ignite.

    Remote nodes should always be started with special configuration file which enables P2P class loading: 'ignite.{sh|bat} examples/config/example-ignite.xml'.

    Alternatively you can run ExampleNodeStartup in another JVM which will start node with examples/config/example-ignite.xml configuration.

    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void main​(java.lang.String[] args)
      Executes example.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SpringBeanExample

        public SpringBeanExample()
    • Method Detail

      • main

        public static void main​(java.lang.String[] args)
                         throws java.lang.Exception
        Executes example.
        Parameters:
        args - Command line arguments, none required.
        Throws:
        java.lang.Exception - If example execution failed.