I'm using servlets on Tomcat that must access one of
four remote JBoss servers depending on the web user login.
Basically, you have to tell the client where the JBoss
server is running. Here's the java code from the servlet side...
Properties props = new Properties();
props.put("java.naming.factory.initial", "org.jnp.intervaces.NaingContextFactory");
props.put("java.naming.facotyr.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
props.put("java.naming.provider.url", "myjbosshost.mydomain.com");
InitialContext ic = new InitialContext(props);
... then proceed as normal
Note that you will need some jars (jboss-client.jar, jboss-j2ee.jar,
jnp-client.jar, jbosssx-client.jar) from the JBoss 'client' subdir
available to your tomcat installation. I put them in $TOMCAT_HOME/lib.
Your required jars may vary depending on what functions of JBoss you
are using. If you are using a port other than 1099 for JBoss, you will
need to use "myjbosshost.mydomain.com:myport" instead.
Jeff
----- Original Message -----
From: "Daniel Hinojosa" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Monday, March 25, 2002 10:37 AM
Subject: Re: JNDI/EJB: looking for some references
> I use Jboss all the time but I use it within the same server, so I never
> come across that. I highly recommend the JBoss forum at
> http://main.jboss.org
>
> Alberto Bolchini wrote:
>
> >Hi all.
> >
> >I'm trying to find some references on using an EJB from a remote J2EE
> >Container (JBoss).
> >I'v deployed the .war in my Tomcat 4.0.2 including JBoss's client jars
> >in WEB-INF/lib and have in my web.xml mentioned the <ejb-ref> as follows
> >
> ><ejb-ref>
> > <description>Nation</description>
> > <ejb-ref-name>ejb/Nation</ejb-ref-name>
> > <ejb-ref-type>Session</ejb-ref-type>
> > <home>NationHome</home>
> > <remote>Nation</remote>
> > <ejb-link>jnp:remoteIP/Nation</ejb-link>
> ></ejb-ref>
> >
> >All I get is a
> >Error initializing context: javax.naming.NameNotFoundException: Name
> >jnp:remoteIP is not bound in this Context
> >
> >Can anyone point me a source of infos on this (or show me where the
> >error is?)
> >
> >--
> >To unsubscribe: <mailto:[EMAIL PROTECTED]>
> >For additional commands: <mailto:[EMAIL PROTECTED]>
> >Troubles with the list: <mailto:[EMAIL PROTECTED]>
> >
> >
> >
>
> --
> Daniel Hinojosa
> Java & XML: Consultant | Developer | Instructor
> P.O. Box 4675
> Albuquerque, NM 87196-4675
> (505) 363-5832
>
>
>
>
>
>
> --
> To unsubscribe: <mailto:[EMAIL PROTECTED]>
> For additional commands: <mailto:[EMAIL PROTECTED]>
> Troubles with the list: <mailto:[EMAIL PROTECTED]>
--
To unsubscribe: <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>