This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds and have James Denton on-line!
See this thread for details.
Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

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

 
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?
 
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 ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!