JBOSS:Contacting EJB from a JavaBean
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Sanjit_Singh
Posted On:   Thursday, November 1, 2001 05:04 AM

Hi All, My question might sound silly, but I am new to JBOSS and EJB. I am using JBOSS as the EJB container and tomcat for the web server. I am using the latest Tomcat embedded Jboss.(JBoss-2.4.3_Tomcat-3.2.3). I would like to know what all I am supposed to do so that I can create an instance of the home interface of the EJB in my JavaBean. I have the following in my javabean: InitialContext ctx = new InitialContext(); Object objref = ctx.lookup("TraderController"); TraderControllerHome home = (TraderControllerHome)PortableRemoteObject.narrow(objref, TraderControllerHome.class); TraderController instance = home.create();    More>>

Hi All,


My question might sound silly, but I am new to JBOSS and EJB. I am using JBOSS as the EJB container and tomcat for the web server.
I am using the latest Tomcat embedded Jboss.(JBoss-2.4.3_Tomcat-3.2.3).


I would like to know what all I am supposed to do so that I can create an instance of the home interface of the EJB in my JavaBean.

I have the following in my javabean:



InitialContext ctx = new InitialContext();
Object objref = ctx.lookup("TraderController");
TraderControllerHome home =
(TraderControllerHome)PortableRemoteObject.narrow(objref,
TraderControllerHome.class);
TraderController instance = home.create();


The above doesnt work. I guess it has something to do with the JNDI naming or something else. The error that I get on my JSP page(that accesses this Javabean) is as follows:


Root exception is java.lang.ClassNotFoundException


If somebody could guide me and tell me all the steps involved for the above to work properly in Jboss, then I would be grateful.
Regards,Sanjit

   <<Less
About | Sitemap | Contact