Very Urgent (Regarding general design of j2ee arch)

Discussions

EJB design: Very Urgent (Regarding general design of j2ee arch)

  1. Very Urgent (Regarding general design of j2ee arch) (3 messages)

    Hi,
      A stage has reached where I can create beans(ejb) of almost all types,but now deploying issues arises.What I had understood is that you create an ear file and take it to
     any application server(compatable with j2ee standards),your application works.
     Can any body tell me about the stages of creating the ear of my project(jsp,html,classes,ejbs) and then just by configuring the config files how I can start working with it.I have been working with the orion app server.Detailed
    solution or sources expected
    regards vicky
  2. You can't just deploy an EAR on *any* J2EE app. server and expect it to work.

    There are lots of vendor specific bits you'll need to change.

    As for Orion, it should all be in the documentation on how to generate and deploy the EAR.

    Cheers,
    Rick
  3. Create a build system (I always use Ant, and my app server is JBoss) that gives you the following:

    myapp.ear:

      META-INF/
      META-INF/application.xml
      myapp-web.war
      myapp-ejb.jar

    myapp-ejb.jar:

      META-INF/
      META-INF/ejb-jar.xml
      META-INF/jboss.xml (JBoss specific, usually not necessary)
      META-INF/jaws.xml (JBoss specific, usually not necessary)
      com/
      com/mycompany/
      com/mycompany/myapp/
      com/mycompany/myapp/mymodule/
      com/mycompany/myapp/mymodule/ejb
      com/mycompany/myapp/mymodule/ejb/SomeBean.class
      com/mycompany/myapp/mymodule/interfaces/
      com/mycompany/myapp/mymodule/interfaces/SomeBeanData.class
      com/mycompany/myapp/mymodule/interfaces/Some.class
      com/mycompany/myapp/mymodule/interfaces/SomeHome.class

    myapp-web.war:

      WEB-INF/
      WEB-INF/classes/
      WEB-INF/classes/com/
      WEB-INF/classes/com/mycompany/
      WEB-INF/classes/com/mycompany/myapp/
      WEB-INF/classes/com/mycompany/myapp/mymodule/
      WEB-INF/classes/com/mycompany/myapp/mymodule/interfaces/
      WEB-INF/classes/com/mycompany/myapp/mymodule/interfaces/SomeBeanData.class
      WEB-INF/classes/com/mycompany/myapp/mymodule/interfaces/Some.class
      WEB-INF/classes/com/mycompany/myapp/mymodule/interfaces/SomeHome.class
      WEB-INF/tlds/
      WEB-INF/tlds/application/
      WEB-INF/tlds/application/taglib1.tld
      WEB-INF/tlds/application/taglib2.tld
      WEB-INF/lib/
      WEB-INF/lib/lib1.jar
      WEB-INF/lib/lib2.jar
      WEB-INF/lib/lib3.jar
      WEB-INF/web.xml
      WEB-INF/jboss-web.xml (JBoss specific, usually not necessary)
      images/
      images/logo.png
      index.jsp
      page1.jsp
      page2.jsp

    My other build system is more complex since it handles multiple ejb and web modules as well as laying out some groundwork for Struts and such. After myapp.ear it's built, "cp myapp.ear /path/to/jboss/deploy" to deploy the application under JBoss. Building goes somthing like this, BTW:

       cd build
       ant build veryclean j2ee-jar

    Matt
  4. Hi Mathew,
      Thanks for the explaination,but I have never worked with
     the build.xml(hope talking abut the same).Any way I will try to do the same logic for my application,but certain doubts come in my mind.
     Once the components are deployed on the server,particularly the ejb components,the application-client.xml has to be built which will be used by the client container.
     Now consider the invocation being called from some different system ,do I have to copy the required classes
     in that system,or they are being downloaded dynamically
     once I access the jndi.Do I have to create a application-client.xml always?As of general i am facing the problem in
    using the jsp as a client for the EJB.
    regards vicky