Class SpringBeanExample
- java.lang.Object
-
- org.apache.ignite.examples.misc.springbean.SpringBeanExample
-
public final class SpringBeanExample extends java.lang.ObjectDemonstrates 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.xmlfile 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
ExampleNodeStartupin another JVM which will start node withexamples/config/example-ignite.xmlconfiguration.
-
-
Constructor Summary
Constructors Constructor Description SpringBeanExample()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidmain(java.lang.String[] args)Executes example.
-