Here's a description of an implementation of the Observer pattern
for EJB.

http://www.theserverside.com/resources/ObserverPattern.jsp

An alternative is to implement your 'Change Events' as JMS messages, if
you are using 'Transacted JMS' messages are only 'published' when the
encompassing Tx is committed.

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, April 03, 2001 8:25 AM
> To: Orion-Interest
> Subject: EntityBean Events inside tx.
> 
> 
> We would like our entity beans to propagate events in the same
> fashion than regular java beans.
> Therefore we must, for example, send events notifying of property
> changes inside the bean.  The problem with this is that we don't know
> if this method was called inside a transaction that might be
> rolled back later on, and hence the property change event
> should not have been sent at all.
> Clearly, we want to propagate the events only when the transactions
> are commited.
> Is there a standard "pattern" to manage this sort of thing ?
> TIA
> 
> Ramiro Diaz Trepat
> Opetra
> 
> 

Reply via email to