1 Reply Latest reply on Sep 19, 2002 9:21 PM by emdevlin

    Basic packaging/deploying of a Web/entity bean app

    dwightsmith

      Hi,
      I need some help with, or to be pointed to some good documentation, on the basic packaging and deployment of a web/entity bean app.

      I have a small test web application that involves an entity bean, html, jsps and access to an Oracle database.

      Some of my confusion deals with which xml files need to be included in the deployment package and where do they go? I have modified the jaws, jboss-web, oracle-service, web, and application xml files. Other than putting the ejb-jar and jboss xml files in the bean jar, which of these other xml files need to be included in the war/ear files? The bean jar and war files need to be in the ear, but are there others? Are there other files, like login-conf.xml perhaps, that need to modified and put in the server area but not included in the ear? Where do the html and jsp pages need to be? What are the steps to associate the bean with a datasource?

      Also I put classes12.jar in the server\default\lib directory and changed the "DriverClass" in the oracle-service.xml file to: oracle.jdbc.pool.OracleConnectionPoolDataSource. Is this valid or do I have to use another class?

      Any help would be greatly appreciated. Is there some sort of step by step guide to this process? I figure there must be some good documentation out there because no one seems to be asking these kinds of questions and everyone on this forum seems to know some much more than I do. They must have learned it somewhere, does anyone know where or what documentation this is?

      Thanks from an obvious newbie (don't flame me to hard),

      Dwight.

        • 1. Re: Basic packaging/deploying of a Web/entity bean app
          emdevlin

          Hey,
          The volunteer docs got me started. http://www.jboss.org/online-manual/HTML/ and are still applicable if you using version 2 and can give you a lot of insight as to how the code became version 3.

          If you're not using ant, start. It's got two great targets called ejbjar and ear which will build the elements of the same name.

          The ear target requires an application.xml and and ejb-jar & war files. For the layout of the application.xml check out $JBOSS_HOME/doc/dtd/web-app_2_2.dtd. Version 3 JBoss. It's simple layout. Don't be put off by all the legal mumbo jumbo at the top. The fun starts at line 80 or so.

          The ejb-jar target requires class files and jboss.xml, jaws.xml, & ejb-jar.xml file, If your're using $JBOSS_HOME/doc/dtd/ejb-jar.dtd I haven't made it to 2.0 stuff yet, but I'm sure the requirements are laid out in
          $JBOSS_HOME/doc/dtd/ejb-jar_2_0.dtd

          I configured my own target to build my war, but its pretty much the same old format
          ../Web-Inf
          ../Meta-Inf
          ../classes
          ../lib
          The web.xml and jboss-web.xml will need to go in the web-inf directory. Compile your classes to classes. Put your libs in lib. Jar the whole shooting match with a war extension and you're ready to go. Call ejbjar target as many times as needed. Call the ear target. Voila one ear ready to deploy. You mileage may vary.

          Hope it helps
          Eric