| Author |
Not able to locate jndi via sar file ...continuation..
|
Amee Dabo
Ranch Hand
Joined: Dec 22, 2001
Posts: 74
|
|
Hi, I am still trying to access JNDI through start() method of my MBean as follows: I have written rebind() method (referred documentation): private void rebind() throws NamingException { private String jndiName = "ejb/Results1Bean"; InitialContext rootCtx = new InitialContext(); // Get the parent context into which we are to bind Name fullName = rootCtx.getNameParser("").parse(jndiName); System.out.println("fullName="+fullName); Name parentName = fullName; if( fullName.size() > 1 ) parentName = fullName.getPrefix(fullName.size()-1); else System.out.append("fullName Size is not greater than 1 -----> "); Context parentCtx = createContext(rootCtx, parentName); Name atomName = fullName.getSuffix(fullName.size()-1); String atom = atomName.get(0); NonSerializableFactory.rebind(parentCtx, atom, contextMap); } Now Results1Bean is getting bound to JNDI tree correctly. In my client I have following code: InitialContext context = new javax.naming.InitialContext(); //Line 1 Results1RemoteHome results1RemoteHome = (Results1RemoteHome)context.lookup("ejb/Results1Bean"); //Line 2 At Line 2 I am getting error as Exception in thread "Thread-4" java.lang.ClassCastException: java.util.HashMap Can anybody please guide me what should I do to solve this ? I have searched all dcumentation available on JBoss but was of no use. Please help me I am with no clue left ;( Thanks in advance, Ameeta
|
Thanks..
|
 |
 |
|
|
subject: Not able to locate jndi via sar file ...continuation..
|
|
|