tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marco Tedone" <mted...@jemos.org>
Subject Re: EJB in tomcat
Date Tue, 09 Sep 2003 00:36:49 GMT
Well, Tomcat needs to 'colloquiate' with an application server (where EJBs
are deployed). The answer is yes, it's possible; all your application needs
to do is to establish a context with an application server and then it can
use the component deployed on application server generally using a lookup.

Here follow a snippet from a code:

InitialContext context = null;
//getJbossContext() sets up the correct property file and returns a context
initialized to that property file
context = getJbossContext();
Object node = context.lookup(sessionName);
PeopleDbManagerHome home =
(PeopleDbManagerHome)PortableRemoteObject.narrow(node,
PeopleDbManagerHome.class);
bean = home.create();
} catch (RemoteException e) {
printRemoteExceptionMessage();
return null;
}
Hope it will help,

Marco

----- Original Message ----- 
From: "zeallousbigpond.net.au" <zeallous@bigpond.net.au>
To: <tomcat-user@jakarta.apache.org>
Sent: Tuesday, September 09, 2003 1:17 AM
Subject: EJB in tomcat


> hi,
>
>      I would like to ask, can Tomcat work with Enterprise
> Javabeans? 'cause I read from the Java site...it says that we need a
> BEA server? Is it necessary? Or tomcat it self already has those
> libraries.
>
> Anson
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>




Mime
View raw message