Announcement Announcement Module
No announcement yet.
App. with EJBs - package and class structure Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • App. with EJBs - package and class structure

    Is there any best advice how to structure packages and classes in J2EE application using EJBs, so that deployment (packing just necessary classes) is as easy as possible?

    Thanx, Ales :shock:

  • #2
    This is a pretty broad question. Can you elaborate at all? Are you separating EJB Container/Web Container/Client classes?

    Re: packing just necessary classes
    If you know which classes MUST be included you can download BCEL and use Ant's classfileset and root to include classes dependent on the ones you specify.

    <classfileset id="reqdClasses" dir="${classes.dir}">
    <root classname="" />
    <jar destfile="test.jar">
    <fileset refid="reqdClasses"/>


    • #3
      server / web client (container)

      I was just reading R. Johnson's book 'J2EE D&D' and looking at Ticket app.

      He somehow groups similar bussines and domain model objects. He separates type (EJB or no) by parent package (both client/server) from which two - ejb and support are made. But he then 'manualy' copies client dependant ejb classes. Ok, this is a small app., with just one ejb class, so it is easy to maintain. What about big stuff?

      Ok, this is usage (bussines) oriented. What about container dependent - having server, client, common packages? Or is previous approach better and this one hard to implement?

      Ok, I made some small EJB projects, where I really didn't care how the structure looked. But before moving to some bigger server/web client project, I would just like to know what the appropriate practice is. Just to be able to deploy as easy as possible (not just me, but anybody who contributes to the project - so that is point straight what to include in different container archive).

      Or is really from project to project?

      Thanx, Ales