I have a java bean in a JSP page on a Tomcat Server that is trying to talk to a EJB on an Orion Server.

The connection hangs trying to establish initialContext with the remote server. No error message appears, and the connection never times out.

Note: The Orion Server also has a client that talks to the EJB locally and this works.

If I sit on the console of the Tomcat server, and "telnet OrionServer 23971" then type some crap, I get:

"illegal ORMI request or request performed" proving the Orion Server is listening on the port.

Client Code:

// Our Main Query

public String getResults(String UserName) {

try {

System.out.println("Start GetResults");

SecurityHome secHome = lookupSecurityHome();

Security secObject = secHome.create();

System.out.println("After Create secObject");

} catch (javax.naming.NamingException ne) {

System.out.println("lookupHome, NamingException: "+ne.getMessage());

}

catch (java.rmi.RemoteException re) {

System.out.println("lookupHome, RemoteException: "+re.getMessage());

}

catch (javax.ejb.CreateException ce) {

System.out.println("lookupHome, CreateException: "+ce.getMessage());

} // End Try/Catch

return UserName;

} // getResults

 

public SecurityHome lookupSecurityHome()

throws NamingException {

try {

System.out.println("Entering lookupSecurityHome");

Context ctx = getInitialContext();

System.out.println("End of getInitialContext");

Object home = (SecurityHome) ctx.lookup("ejb/SecurityHome");

System.out.println("After Lookup");

return (SecurityHome) PortableRemoteObject.narrow(home, SecurityHome.class);

} catch (NamingException ne) {

System.out.println("[DPSFacade] lookupHome, NamingException: "+ne.getMessage());

throw ne;

} // End try/catch

} // Lookup Security Home

/**

*

* Using a Properties object will work on JDK 1.1.x and Java2

* clients

*/

public Context getInitialContext() throws NamingException {

try {

// Get an InitialContext

Properties h = new Properties();

h.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.ApplicationClientInitialContextFactory");

h.put(Context.PROVIDER_URL, "ormi://itut42.inettest.det.nsw.edu.au:23791/ejb");

return new InitialContext(h); // **** Never get past here *****

// return new InitialContext();

} catch (NamingException ne) {

throw ne;

} // end try catch

} //getInitialContext

} // End Class

Does anybody have any ideas??

Thanks,

Roger

Roger Robins
Middle Ware Support
[EMAIL PROTECTED]
9942 9715

 

Reply via email to