Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
Robert Strong
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • 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!!!
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 36426
454
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!