i wrote a very simple client that tries to obtain the home interface of an entity, say "Name", as in:

NameUtil.getHome();

however, i'm getting the error, "javax.naming.NameNotFoundException: comp not bound" when i run the client.

here is the xdoclet-generated source for the NameUtil.getHome() method:


public static NameHome getHome() throws NamingException
{
// Obtain initial context
InitialContext initialContext = new InitialContext();
try {
java.lang.Object objRef = initialContext.lookup(NameHome.COMP_NAME);
return (NameHome) PortableRemoteObject.narrow(objRef, NameHome.class);
} finally {
initialContext.close();
}
}


in the NameHome class, COMP_NAME="java:comp/env/ejb/Name", which i thought was for in-jvm (internal/local) calls?

in my client program, if i do the following:

InitialContext initialContext = new InitialContext();
java.lang.Object objRef = initialContext.lookup(NameHome.JNDI_NAME);
NameHome home = (NameHome) PortableRemoteObject.narrow(objRef, NameHome.class);

it works.


should the NameUtil.getHome() method use:

java.lang.Object objRef = initialContext.lookup(NameHome.JNDI_NAME);

instead of

java.lang.Object objRef = initialContext.lookup(NameHome.COMP_NAME);


?

thank you.


-------------------------------------------------------
This SF.net email is sponsored by: Get the new Palm Tungsten T handheld. Power & Color in a compact size! http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0002en
_______________________________________________
Xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to