I want to cluster a User object among all server. I know HAJNDI can do that but how to define the user object inside cluster wide context and get it back from jndi lookup?
I just saw the following code in the documentation. How about define it?
Properties p = new Properties();
p.put(Context.PROVIDER_URL, "localhost:1100"); // HA-JNDI port.
return new InitialContext(p);
Just like any ejb in jboss: Annotate the service pojo com.my.Thing with @Service and @Remote(ThingRemote.class), and a (ThingRemote) can be found in that jndi under the name "Thing/remote".