This is about as simple an example as I can think of...
System.setSecurityManager(new RMISecurityManager());
this.login("localhost", "User", "Pass");
TopicHome myTopicHome = (TopicHome)context.lookup(TopicHome.THEJNDINAME);
Enumeration myResults = myTopicHome.findByName("teacher");
Topic myTopic = (Topic) myResults.nextElement();
....Topic is the EJB's remote interface, TopicHome is it's Home Interface and
TopicHome.THEJNDINAME is...
public static final String THEJNDINAME = "askit.topichome";
Which is the name that is specified in the EJBs properties file as
ejb.beanHomeName=askit.topichome
Robert Jacobs wrote:
>
> I am having trouble accessing an EJB through a servlet. I am using JRun
> 3.0. Could anyone give me a summary of steps required focusing mainly on
> the code within the servlet needed to access the bean.
>
> Thanks,
> Bob
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists