EJB3 web app packaging and deployment on JBoss 4 (Urgent!!)

Discussions

EJB programming & troubleshooting: EJB3 web app packaging and deployment on JBoss 4 (Urgent!!)

  1. Hello everyone, I'm a college student and I have to package a web application developed using EJB 3.0 and JSPs (as user front-end interface), which should be deployed on a JBoss 4 server. I'm having pretty serious problems understanding exactly how the application should be packaged. As far as I've understood, EJBs should be packaged in a JAR file, all the JSPs should be packaged in a WAR archive and then bundle everything in an EAR archive. Here go the questions: 1) Is the structure I've just written right? Should entity beans (along with the persistence.xml be archived separately from session and md beans? 2) What are the XML descriptors necessary in every archive (like application.xml, jboss-app.xml, etc)? 3)How do I physically build the packages? Presumably I should use Ant, but how do I instruct it to build the correct archives and bundle them together in an EAR? As you may have guessed the critical problem is understanding how Ant works... are there any easier tools for packaging around? I apologize for asking such beginners' (aka dumb) questions, but I am a beginner in this field... Thank you very much for your time! P.S.: If you can help me in any way please answer ASAP as this is a problem I should solve immediately! Thank you!
  2. see this tutorial:[ Go to top ]

    http://www.laliluna.de/ejb-3-tutorial-jboss.html
  3. 1. All the EJBs could be packed inside a single jar, along with their deployment descriptors and other related files such as persistence xml etc. 2. If you are not very conversant with Ant build script, use the command line tool available with jdk. jar cvfm ejb.jar *.* (contains the classes & metainf folder) jar cvfm app.war *.* (contains all the files from web) jar cvfm app.ear *.* (contains ejb.jar,app.war,meta-inf/application.xml) in application.xml you will specify your ejbs, war files, context root, library files etc.
  4. Thank you very much, both of you!!