Thank you for answer, but this is usual rmi lookup that dosen't use any ejb handles. I mean HomeHandle/Handle- the objects for persistent rmi references. This objects works fine with JBosss2.4.6 but JBoss3 handles using local(Tomcat) JNDI context instead of remote that it came from.
Regards. ----- Original Message ----- From: "Jon Swinth" <[EMAIL PROTECTED]> To: "Andrew" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Friday, June 07, 2002 9:31 PM Subject: [JBoss-user] Re: (JBoss3)Handles problem in Tomcat standalone > Since nobody seems to have answered you. Here is what I use to connect standalone Tomcat to Jboss. > There is more here than you asked for, but you get the idea. > > private static final String contextFactory = "org.jnp.interfaces.NamingContextFactory" ; > private static final String urlPkgPrefixes = "org.jnp.interfaces" ; > private static final String providerUrl = "localhost:1099" ; > private static InitialContext jndiContext = null ; > > public static InitialContext getJndiContext() > throws NamingException { > return getJndiContext(false) ; > } //end getJndiContext() > > public static synchronized InitialContext getJndiContext( > boolean restart ) > throws NamingException { > if (jndiContext == null > || restart) { > Properties props = new Properties(); > props.setProperty(Context.INITIAL_CONTEXT_FACTORY, contextFactory); > props.setProperty(Context.URL_PKG_PREFIXES, urlPkgPrefixes); > props.setProperty(Context.PROVIDER_URL, providerUrl); > jndiContext = new InitialContext(props); > } //end if > return jndiContext ; > } //end getJndiContext() > > public static Object getRemoteHome( > String beanName, > Class remoteHomeClass ) > throws NamingException { > Object ref = null ; > try { > ref = getJndiContext().lookup(beanName); > } catch (Exception e) { > ref = getJndiContext(true).lookup(beanName) ; > } //end try > return PortableRemoteObject.narrow(ref, remoteHomeClass); > } //end getRemoteHome() > > > > From: "Andrew" <[EMAIL PROTECTED]> > > To: "JBossUser" <[EMAIL PROTECTED]> > > Date: Fri, 7 Jun 2002 18:46:02 +0400 > > Subject: [JBoss-user] (JBoss3)Handles problem in Tomcat standalone > > Reply-To: [EMAIL PROTECTED] > > > > EJB handles not properly work in Tomcat environment seems it's using > > Tomcat's JNDI Context for lookup... > > What could be wrong? > > > > Thanks. > > _______________________________________________________________ > > Don't miss the 2002 Sprint PCS Application Developer's Conference > August 25-28 in Las Vegas -- http://devcon.sprintpcs.com/adp/index.cfm > > _______________________________________________ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > > > _______________________________________________________________ Don't miss the 2002 Sprint PCS Application Developer's Conference August 25-28 in Las Vegas - http://devcon.sprintpcs.com/adp/index.cfm?source=osdntextlink _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user