• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

about how to organize utility and model classes used by EJBs and WARs?

 
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm using BEA Weblogic8.1 and Borland JBuilder X.

I created some Stateless Session Beans and CMP Entity Beans. There're also some utility classes and data model classes. For each entity bean, there's a corresponding model class implementing serializable interface.

Web applications would interact with EJBs through utility classes and model classes. so utility and model classes are shared by EJBs and Web application.

my question is that how should I organize utility and model classes? Should I include the shared utility and model classes in both WARs and EJBs?

any help appreciated!!!
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Robert,
You definitely shouldn't have two copies of the utility/model classes. Your choices are too put them in the EJB project or in a separate project to be jar'ed up and referenced from the EJB and Web projects.

I favor putting them in the EJB project as they seem to be logically related to the EJB. The Web part already has access since it calls the EJB.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic