Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how packaging components of different tier/layer?

 
giuseppe fanuzzi
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys!
I think that someone did already this question but i'm not able to find an answer.
Normally i have a slsb 'aSessionBean' that calls 'aDao', and a slsb 'bSessionBean' that calls 'bDao'.
Originally:
aSessionBean and aDao are in the a.jar
bSessionBean and bDao are in the b.jar
Now aDao have to use bDao.

Is the best choice to extrapolate aDao and bDao and create a dao.jar? or is better that aSessionBean calls bSessionBean? and what about value object? will i have to package it in a dto.jar?

i think that i will include web tier components in the war file, and every other layer in a different jar. For example in the dto.jar (that i will include in the war too) i will insert all value objects, business object as session beans so they will have their own jar, all classes of dao layer will go in the dao.jar.

What do you think?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34973
379
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Something sounds backwards. Usually a jar is for a logical group of things. If one DAO calls the other, maybe they are really one logical entity?
 
giuseppe fanuzzi
Ranch Hand
Posts: 99
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jeanne
thanks for reply.
I dont understand if your is a question or an affermation. you say that if a dao 'a' calls another dao 'b' could be that 'a' and 'b' coulb be only one Dao Entity?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34973
379
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was wondering. It's either that they are one entity (and belong in the same jar) or a design problem (and they shouldn't be calling each other.)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic