I think Replacing Entity with Session beans should be done where it is needed :)
I'll give simle example from real project.

We have GUI (swing) and into it we load list box of the ID, Name, Surname.

using of the entiries:
1. EntityBean::findBy(...)  = gets 10 PK 
2. loop throw 10 entities 
2.1. 10 calls into server+10 DB access for loading of the entity  (if was not loaded 
before into container ) 
2.2  10 calls of getId() (client -server calls)
2.3  10 calls of the getName() (client -server calls)
2.3  10 calls of the getSurname() (client -server calls)

Now we have thougths to use session bean instead

Info[] SessionBean::getInfo(...)

whre info:
class info
{
String ID
String name
String surmane
}

>From the client view we call session bean getInfo and we get all needed information 
>for GUI. ()
It is just one client-server call with 1 db SELECT statment.
and loop throw the array of the 10 items (3*10 local calls in this case)

About this way I think:
1. Using Session Beans like this is much more faster. Performance should be better at 
least 5 time.
2. Using Session Beans like this is i have much more coding.


D&D




--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
List Help?:          [EMAIL PROTECTED]

Reply via email to