[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ojb-user
Subject:    Re: client/server Object Caching [Very Urgent]
From:       gfaerman () fys ! com ! ar
Date:       2004-04-29 17:10:04
Message-ID: OFAE093D7B.9FEDBC27-ON03256E85.005CE088-03256E85.005E4E48 () fys ! com ! ar
[Download RAW message or body]

Amol,

I think you face and underlying problem related to the architecture of 
your application.
I do not know if you are familiar with the MVC pattern, but it seems 
considering applying it to your project might be of help.
The basic idea is to let the Controller in the server "talk" to the Model 
(your business objects) and to the View (your client app, where you might 
have another MVC pattern in place to handle the client stuff). In your 
client you should handle (present to the user or send to the server) just 
values (or ValueObjects if you prefer but no "business objects" or direct 
access to the database).
I´m trying to say the client app should not know anything about OJB, it´s 
just the server app the only one that actually talks to the DB using OJB 
framework in this case.

Once the controller receive from the client some data and some commands or 
actions, it should dispatch an "action", letting  your "actions", take 
care of situation like the one you are presenting (dirty objects).
We´ve done several developments applying this pattern  to Swing based 
clients app in client/server scenarios with very good results (we ´ve 
implemented in swing based solutions tons of good ideas "borrowed" from 
Apache Struts among other implementations of the MVC pattern).

Regards,
Gustavo.



Amol Pophale <amolrasika@yahoo.com> wrote on 29/04/2004 06:30:58 a.m.:

> Hi All,
> I just learned OJB.
> I have written one application in OJB. 
> My application is client-server application in which 
> client and server are on different machines and using
> same databse which may be on third machine.
> Right now i have one query.
> server stores some java object in databse using
> PersistaceBroker APIs. Client retrives these object
> on its machine using same i.e. OJB
> Now if any object is updated by server which is in
> client object cache How can we update client object
> cache when server updates the object in database.
> Because I think server cache and client cache are
> different.
> I need this very urgent.
> 
> Thanks in advance
> Amol Pophale.
> 
> 
> 
> 
> 
> 
> ____________________________________________________________
> Yahoo! Messenger - Communicate instantly..."Ping" 
> your friends today! Download Messenger Now 
> http://uk.messenger.yahoo.com/download/index.html
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-user-help@db.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-user-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-user-help@db.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic