Hi!

Darius Davidavicius wrote:

> /**
> Function for getting homes
> @param String name = EMailApplicationHome
> @param Class type = EMailApplicationHome.class
> */
> private Object getHome(String name,Class type)
> throws NamingException
> {
> System.setProperty("java.naming.factory.initial",
> "org.jnp.interfaces.NamingContextFactory");
> System.setProperty("java.naming.provider.url",
> "localhost:1099");

I hope this is in the client. You're not allowed to do this in the
server. In any case I would recommend using the jndi.properties file
instead. Hardcoded values aren't nice.

> InitialContext ctx = new InitialContext();
> System.out.println("Got context");
> 
> try {
> System.out.println("getHome:1");
> Object home = ctx.lookup(name); // <-- Exception here
> System.out.println("getHome:2");
> return (Object) PortableRemoteObject.narrow(home, type);
> }
> catch (NamingException ne) {
> String aText = "The client was unable to lookup the EJBHome. Please
> make sure "
> + "that you have deployed the ejb with the JNDI name "
> + name
> + " on the Application server at "
> + url;
> log( aText );
> throw ne;
> }

So, what is the NamingException you get?

/Rickard

-- 
Rickard �berg

Email: [EMAIL PROTECTED]
http://www.telkel.com
http://www.jboss.org
http://www.dreambean.com



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to