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
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.
Jun Hong<br />SCJP, SCJD, SCWCD, SCEA<br />IBM Certified Systems Expert(V4.0)