tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amit Prakash Singh <amit.prakashsi...@gmail.com>
Subject Issue tomcat and OpenEJB integration
Date Wed, 03 Feb 2010 07:51:05 GMT
Hi All,

I have integrated openEJB with tomcat 6 and now I wanted to perform a simple
"HelloWorld" test on my integration. I can see in the openejb.log that ejb
has been deployed successfully.

2010-02-03 13:08:57,559 - INFO  - Found ejb module EjbModule in war /scbcd
2010-02-03 13:08:57,699 - INFO  - Configuring enterprise application:
C:\tomcat\webapps\scbcd
2010-02-03 13:08:58,337 - INFO  - Enterprise application
"C:\tomcat\webapps\scbcd" loaded.
2010-02-03 13:08:58,337 - INFO  - Assembling app: C:\tomcat\webapps\scbcd
2010-02-03 13:08:58,353 - INFO  - Jndi(name=HelloUserBeanLocal) -->
Ejb(deployment-id=HelloUserBean)
2010-02-03 13:08:58,353 - INFO  - Created Ejb(deployment-id=HelloUserBean,
ejb-name=HelloUserBean, container=My Stateless Container)
2010-02-03 13:08:58,353 - INFO  - Deployed
Application(path=C:\tomcat\webapps\scbcd)

However, when I call this ejb in my client it doesn't seems to get hold of
the deployed bean. My client is a simple Struts action as shown below:

ejbAction.java

package com.scbcd.struts.actions;
import javax.ejb.EJB;
import org.apache.struts.action.*;
import javax.servlet.http.*;
import com.ejb.stateless.*;
public final class ejbAction extends Action
{
 @EJB
 private HelloUser helloUser;

 public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) throws Exception
 {
  String message = "Hello Guest!";
  if (helloUser!=null)
  message = helloUser.sayHello();
  request.setAttribute("message",message);
  return mapping.findForward("success");
 }

}


Also, please note that I have packaged the EJB in a separate jar file which
has been placed in the Struts app's lib folder.

Please assist me getting this resolved.

Thanks
Amit

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message