• Post Reply Bookmark Topic Watch Topic
  • New Topic

design issue in terms of J2EE

 
trupti nigam
Ranch Hand
Posts: 627
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
my question is related more to design aspect with J2EE.
if i have got many classes in my design then what os the best practice...?
to create a separate bean for each class or to wrapp all the classes in the same bean? i am not considering entity beans..
this is regarding only the session beans?
what is a good practice in terms of performance ? & why?
trupti

 
Marcos Maia
Ranch Hand
Posts: 977
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, you can find lots of information on it at the design patterns catalog from sun: http://java.sun.com/j2ee/blueprints/design_patterns/index.html
rgds.
 
trupti nigam
Ranch Hand
Posts: 627
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
that doen't answer my question..
i am using weblogic server.Can any body tell me the effects of using different beans for different classes..
thanks,
pradnya
 
Jun Hong
Ranch Hand
Posts: 181
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is a design pattern called Facade. You have a ejb tier you don't want to expose every bean on ejb tier to Web tier or Java application. Facade is an interface to ejb tier. It could be stateless or stateful depends on where you want to cache states. Stateless bean provides better scalability. For each method call different instance of bean could used. So, you can have a pool. It really helps. I have been working for ejb for two years. I didn't find entity bean very useful. It really hurts performance. In most cases, you can avoid using entity beans.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!