Use a session bean that returns a "value" object by collecting up all the
getters from the entity bean. It could also be the return value from one of
the entity beans methods.
Richard Monson calls these "Bulk Accessors" and the idea is documented on
his web site.
<vendor>
BMP entity bean generated by Cocobase generate get/set bulk accessor methods
on entity beans by default.
</vendor>
-Chris.
> -----Original Message-----
> From: Volkmann, Mark [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, October 01, 1999 3:28 PM
> To: [EMAIL PROTECTED]
> Subject: avoiding database query by container before each method
> invocatio n
>
> Is there any provision in the EJB spec. for allowing the developer of a
> container managed entity bean to state that particular methods do not
> require syncing EVERY mapped field with the database?
>
> I have a case where I'm display ten fields from such an EJB in a GUI. I
> find the EJB and then invoke ten get methods to get the data to display.
> This results in ten complete syncs with the database. I'd like to be able
> to sync just once and then get the values OR have each get method only
> incur
> a sync of the field it is returning.
>
> I know that a potential solution would be to write one method that returns
> a
> non-EJB object containing all the values. That approach isn't very
> attractive.
>
> --
> __ __
> / \/ \ Object Computing, Inc.
> \ / ark (314)589-1617 pager
> \ / (314)955-8123 A.G.Edwards
> \ / olkmann (314)579-0066 OCI
> \/ [EMAIL PROTECTED]
>
> ==========================================================================
> =
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> of the message "signoff EJB-INTEREST". For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".