Forums Register Login

Can we use value-object with session beans????

+Pie Number of slices to send: Send
Hi,

I am developing EJB CMP2.0 Application. I have Created Sesion Facade for my Entity beans which persists data inti database. At my client side i m accessing Session bean & inside session beans I m passing field values for my Entity beans. But this requires accessing all getters n setters inside Session Bean for passing values to Entity Bean. But I don't want to use each getter n setter of all fields bcoz this results in n/w overhead. So my question is can we use a ValueObject class for Sesion Beans for Data Transfer from Client to Server??

If yes/no why???

Please help me.
Thanx in advance.
Prash
+Pie Number of slices to send: Send
Yes. How are you currently doing this?
+Pie Number of slices to send: Send
Hi,

I am currently Accesisng Entity bean with local interface inside session bean. & then I am accessing that sesion bean with remote interface into my client file. But now I am not using any value Objects for passing data from client to session bean. I am just passing values by accessing each filed inside my sesion bean on Client side & then assigning value to it through sesion beans remote interface. But As I m accessing sesion bean with remote interface I think this way will create n/w overhead. So Can i use hare Value Object for passing values betn Client n Sesion Bean???

Thanx

Prash
+Pie Number of slices to send: Send
Not only can you, but you should. Updating a record one field at a time with a round-trip from the client to the database and back again via an EJB is not a sensible way to do this.
[ February 24, 2006: Message edited by: Paul Sturrock ]
I can't renounce my name. It's on all my stationery! And hinted in this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 615 times.
Similar Threads
Implenting Data Access Object (DAO)
session bean versus entity bean
merging session and entity
Session & Entity Beans
CMP and data retrieval
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 07:37:42.