- Posted by: Raja Subramaniam
- Posted on: January 11 2005 07:17 EST
I'm using a stateless session bean for the purpose of populating a value object.
I created an instance of a normal java class and delegate the mechanics of data pouplation from the bean to hear.
I feel by this way
1. the code will become more elegant and easy to maintain
2. the chances for reusability of this data population logic becomes high.
But some of my friends are against this type of delegation by putting issues related to Garbage Collection.
I left this issues for the memebers judgement.
Hi everybody,I'm using a stateless session bean for the purpose of populating a value object.
In my opinion, session beans should be applied to build more complex high level business logic. The invocation of a remote method usually is expensive for the JVM (it has an overhead in order to create the bean, send the parameters in network syntax, remove the bean, etc. ) so i think that it is much better to use session beans to build complex logic such as performCreditCardVerification(), addCustomer(), removeItemFromStore() and so on.
Jose Ramon Huerga