Bugs item #762045, was opened at 2003-06-27 12:12 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=762045&group_id=22866
Category: JBossServer Group: v3.0 Rabbit Hole Status: Open Resolution: None Priority: 5 Submitted By: Dan Ciarniello (dciarnie) Assigned to: Nobody/Anonymous (nobody) Summary: Cannot get EJB Home interface from Remote interface Initial Comment: One cannot get an EJB home interface from a remote interface (using getEJBHome()) when the JNDI connection properties are not set in the System property space. The following code fragment illustrates the problem: ============================== Properties props = new Properties(); props.setProperty(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory"); // host must be remote, not local props.setProperty(Context.PROVIDER_URL,"remotehost:1099"); props.setProperty(Context.URL_PKG_PREFIXES,"org.jboss.naming"); InitialContext ctx = new InitialContext(props); FooHome foohome = (FooHome)ctx.lookup("ejb/foohome"); Foo foo = foo.findByPrimaryKey(id); EJBHome home = foo.getEJBHome(); ============================== The last line will fail with a java.lang.reflect.UndeclaredThrowableException caused by a java.net.SocketTimeoutException. I have traced the problem to org.jboss.proxy.ejb.GenericEJBInterceptor.getEJBHome(Invocation). which has the line InitialContext iniCtx = new InitialContext(); and therein lies the problem. This assumes that the JNDI connection properties have been set in the System property space which is not the case in the above example. The remote interface must have explicit access to the JNDI properties used to retrieve it in the first place. It cannot assume that these properties have been set in the System property space. Note that this problem also exists in v3.2. It does not exist in 2.4.x. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376685&aid=762045&group_id=22866 ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01 _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development