1 Reply Latest reply on Feb 19, 2009 4:33 AM by Frank Henry

    Components based application

    Etienne Lacombe Newbie

      Hello. I'm very new to EJB3 and JBoss but going over the materials, it seems like it is a solution to what I'm trying to accomplish.

      I have a very dynamic situation (who doesn't!) and I want to build the backend of the application in a "componentized" way.

      So I have Entity objects that can be persisted with Hibernate. I would like to use container managed persistence (not required but seems like it would be good to use that).

      I have various components:

      - Contacts and addresses maintenance
      - Invoicing
      - Inventory
      - etc

      Each component may need to use services from the other. Like invoicing needs data from inventory and contacts/addresses.

      But I want to be able to build/deploy each component on its own (assuming it does not need a more recent API from a component that hasn't been deployed).

      E.g.: I want to be able to add new features to the Invoicing component without having to deploy anything new from Contacts.

      Is EJB3 and JBoss the solution or part of the solution?

      I was looking at that and I thought that I would make a project for each and deploy each as their own EAR but then I'm not sure how to get data from Contact from the Invoicing code.

      Anybody could give me some pointers?


        • 1. Re: Components based application
          Frank Henry Novice

          Make your main project an ear and deploy your components as jars into the root.
          You will simply need to define your components in the META-INF/jboss.xml or application.xml

          Throw the whole thing into the deploy folder and you are good to go.

          For development you need not even package up the ear and just have the contents 'exploded' (unpacked) in the deploy folder.
          The folder just needs to be named [your project].ear

          Then you can update the jars quickly.
          But you need to touch the META-INF/application.xml file.
          Either with a linux touch or via text editor (add / remove a blank line to force saving the file).