Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Help with creating basic Session Beans (Struts + JBoss 3.2.3)  RSS feed

 
Karl Beowulph
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy.

I'm having quite a bit of difficulty creating EJB's within my Struts application. I'm hoping that by posting here what I'm doing someone can tell me what I'm doing wrong.

1. I create a session bean (TestSessionBean) using the JBOSS-IDE EJB components

2. I run XDoclet.
- XDoclet creates the following classes: TestSession, TestSessionHome, TestSessionUtil.
- I've think I've got my XDoclet configuration correct so I won't post it just yet (to save space) unless someone tells me that the problem is potentially in my configuration.

3. In a standard java class I have the following:


On a JSP page I have the following:


ejb-jar.xml:


jboss.xml


When I deploy my .ear file (cpb) to the server I get the following:


Contents of the jmx-console after being deployed:


When I attempt to run my application though, I get the following error message in the console: "[STDOUT] ejb not bound".

What is likely that am I doing wrong?
 
Saulius Sinkunas
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It looks like that your EJBs hadn't been deployed. In jboss logs I see that WAR was deployed, but not EAR. Be sure you copied EAR to jboss/server/default/deploy directory.

As you now, EAR consists mainly of WAR and JARS. In WAR is your web application, and in JARS are your EJBs.
 
Karl Beowulph
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've changed my packaging configuration to put the EJBs and their XML's in a jar file, the Struts stuff in a war file, and them both into the ear file.

It is now working, thank you.
[ May 31, 2005: Message edited by: Karl Beowulph ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!