This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Hands On Software Engineering with Python and have Brian Allbey on-line!
See this thread for details.
Win a copy of Hands On Software Engineering with Python this week in the Jython/Python 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

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 ]
 
This parrot is no more. It has ceased to be. Now it's a tiny ad:
Programmatically Create PDF Using Free Spire.PDF with Java
https://coderanch.com/wiki/703735/Programmatically-Create-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!