> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Bill
> Burke
> Sent: Sunday, June 17, 2001 10:23 AM
>
> 1. Change JBoss to expose a flush method.
>
> A.setAddress(newAddress)
> ((ImaginaryJBossEntityProxy)A).flush(); // Causes an ejbStore()/Update.
> oldAddress.remove();
This might be the best solution ... as it minimizes the 'smoke and mirrors'
factor that solution #2 presents ... (if people need to sync with the
database, let them do it explicitly ... don't do it implictly ... )
>
> 2. Or, as I think somebody else suggested:
>
> A.setAddress(newAddress)
> AHome.findByPrimaryKey(new APK(A.getId())); // causes a ejbStore/Update.
> oldAddress.remove();
This should be a fine solution too ... I tried this just to make sure that
it didn't already work ... sadly, it doesn't cause any data to get written
out ... Ideally, it should do a read from the DB too ... just to make sure
that no data has been modified by other processes (yes, i use commit B)
since the start of the transaction ...
>
> 3. Even better, have all your entity beans implement flush(), just in case
> the ejb spec or jboss comes up with a better solution you can
> easily change
> it.
>
> // CMP
> class YourBean implements EntityBean
> public void flush() throws RemoteException
> {
> home.findByPrimaryKey(new MyPK(this.getId());
> }
>
> // BMP: Is this a good solution?
>
> class YourBean implements EntityBean
> public void flush() throws RemoteException
> {
> this.ejbStore(); // Will this work?
> }
>
I think that for BMP, that will actually work ... since you're calling a
method with implementation from within the same object, it should work just
fine.
Ok, so now the million dollar question ... :) ... is there any chance that
this can get stuck into 2.3/2.4? or is this a big deal that can't be
implemented in time? ... We are coming up against a launch date for our
project and this is really important ...
Should I add this to the "bug database" (even though it's not a bug, per
say) ?...
-Dave
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development