Skip to content

Instantly share code, notes, and snippets.

@enesakar
Created April 5, 2012 07:07
Show Gist options
  • Save enesakar/2308679 to your computer and use it in GitHub Desktop.
Save enesakar/2308679 to your computer and use it in GitHub Desktop.
test hazelcast from spring context
package com.springhazelcast;
import com.hazelcast.core.IMap;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.GenericXmlApplicationContext;
public class Main {
public static void main(String[] args) {
ApplicationContext ctx = new GenericXmlApplicationContext("beans.xml");
TestBean testBean = (TestBean) ctx.getBean("springTestBean");
System.out.println(testBean.getResult());
IMap map = (IMap) ctx.getBean("usermap");
map.put("somekey","somevalue");
System.out.println(map.get("somekey"));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment