Hi, All:
Tried following code in a cluster env.
HAPartition bobPartition = (HAPartition)ctx.lookup("/HAPartition/DefaultPartition");
The call resulted in following exception:
Exception in thread "main" java.lang.ClassCastException: javax.naming.Reference
at com.intuit.sds.om.prototype.rmi.BOBServer.startInHAMode(BOBServer.java:66)
at com.intuit.sds.om.prototype.rmi.BOBServer.start(BOBServer.java:41)
at com.intuit.sds.om.prototype.rmi.BOBServer.main(BOBServer.java:101)
==
another call to code
ctx.list("/HAPartition")
produced result:
DefaultPartition - org.jboss.ha.framework.server.HAPartitionImpl
Class of ref is : javax.naming.Reference
Can someone help?
Thanks
Sorry, I figured out the reason.
The "/HAPartition/DefaultPartition" registered with JNDI is a local object, and I was trying to access it remotely.