Hi Arkin,

I always believed that no matter what nice features a server has it should
really hold to the container-bean contract and call ejbStore. Do people
agree on this or would people like the container not to call ejbStore if it
determined that nothing had changed. My reason for questioning this is that
I am currently reading the Web Logic 5.1 documentation and came across the
following:

<web-logic-docs>

The EJB provider or EJB deployer then identifies the name of this method
using the is-modified-method-name element in weblogic-ejb-jar.xml. WebLogic
Server calls the specified method name when a transaction commits, and calls
ejbStore() only if the method returns "true.""

.....

read-only cache strategy

The read-only cache strategy can be used for entity EJBs that are never
modified by an EJB client, but may be updated periodically by an external
source. For example, a read-only entity EJB may be used to represent a stock
quote for a particular company, which is updated externally to the WebLogic
Server system.

WebLogic Server never calls ejbStore() for a read-only entity EJB. ejbLoad()
is called initially when the EJB is created; afterwards, WebLogic Server
calls ejbLoad() only at intervals defined by the read-timeout-seconds
deployment parameter.

</web-logic-docs>

Do people think that this is breaking the container contract, just working
around it, enhancing it? I need more time to consider what the implications
for these features are. I hope eventually that we can come up with a
standard way (specification ?.0) to address the real world needs that led to
these features being developed.

kind regards,

William Louth

> -----Original Message-----
> From: Assaf Arkin [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, April 10, 2000 1:12 AM
> To:   [EMAIL PROTECTED]
> Subject:      Re: Unneeded calls to ejbStore
>
> Exactly.
>
> ejbStore must be called at the end of the transaction, even for CMP. The
> CMP may not store anything to the database if it detected no changes,
> but must still make the method call to the bean.
>
> arkin
>
> Dan OConnor wrote:
> >
> > The method ejbStore is always going to be called at the end of a
> > transaction on a bean (and it may be called at other times as well).
> > This is necessary to comply to the specification. My earlier e-mail,
> > by the way, should have read that ejbStore happens typically, but
> > not EXCLUSIVELY, on transaction boundaries.  It will always be
> > called at the end of a transaction.  (See, for example, 9.1.1.0:
> > Commit options in the specification.)
> >
> > The relevant question is whether the ejbStore call is updating
> > resources.  An ejb container can determine that the bean's state
> > did not change during a transaction, and therefore not update the
> > resources, in the case of container-managed persistence.  The
> > bean programmer (or object-relational mapping vendor) is
> > responsible for making this determination in the case of bean-
> > managed persistence.
> >
> > The println should always be called in Dave's example.  If he is
> > using container-managed persistence and the database is being
> > written after using his "gentile" function, it seems to me there is an
> > opportunity for improvement--either by reconfiguring his existing
> > application server, or changing servers.  If he is using bean-
> > managed persistence, he probably wants to keep track of state
> > modifications in his bean so that ejbStore can behave intelligently.
> >
> > -Dan
> >
> > On 9 Apr 00, at 17:33, Charlie Alfred wrote:
> >
> > > Could be that the number of entity beans returned by the
> > > finder is larger than the cache size configured for your
> > > EJB Server.  As you iterate through the collection returned,
> > > your server may be passivating (swapping out) beans to make
> > > room.
> > >
> > > Charlie
> > >
> > > > -----Original Message-----
> > > > From: DaveFord [mailto:[EMAIL PROTECTED]]
> > > > Sent: Sunday, April 09, 2000 1:42 AM
> > > > Subject: Unneeded calls to ejbStore
> > > >
> > > >
> > > > The following block of code generates a customer pick list. It only
> READS
> > > > from the database and does NOT WRITE to the database. However, I
> have added
> > > > a println to CompanyBean's ejbStore method and it reports that
> ejbStore is
> > > > being called five times (once for each time through the while loop).
> Why is
> > > > ejbStore being called?
> > > >
> > > > Iterator it = companyHome.findByName("Wal").iterator();
> > > > while(it.hasNext()){
> > > >   Company comp = (Company)it.next();
> > > >   System.out.println( comp.gentile() );
> > > > }
> > > >
> > > > Thanks,
> > > >
> > > > Dave Ford
> > > >
> > >
> > >
> ==========================================================================
> =
> > > 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".
>
> ==========================================================================
> =
> 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".


***********************************************************************
Bear Stearns is not responsible for any recommendation, solicitation,
offer or agreement or any information about any transaction, customer
account or account activity contained in this communication.
***********************************************************************

===========================================================================
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".

Reply via email to