On 10/03/2007, at 10:13 AM, Tore Halset wrote:
> Hello.
>
> I am a lifecycle callbacks newbie trying to understand http://
> cwiki.apache.org/CAYDOC/lifecycle-callbacks.html in a ROP context.
>
> Can the callback methods be defined in the client PersistentObject
> or only in the server CayenneDataObject?
I believe that they will only operate on the server side. At least
that's how we've been able to use them.
> Can a ROP client perform non-lifecycle callbacks on the server? If
> not, are there any other standard way for a ROP client to call a
> method on the server not related to the persistence lifecycle?
We use Jetty as the transport for Hessian between client/server ROP.
So we can define special servlet calls as we need in order to perform
code on the server or return values. For instance, when a client logs
into the server we wanted the server to maintain a list of client
sessions. So, because we aren't committing an object through Cayenne
to the server we couldn't use a lifecycle event and we wrote a
special servlet call which is used instead.
> Or perhaps it is possible to have custom event types not related to
> the lifecycle?
I think the lifecycle calls are intrinsically tied into the concept
of committing one or more objects.
We are looking into writing a more advanced messaging scheme between
the client and server (and through the server to other clients) -
this is something we hope to work on soon. We want this to create
distributed cache invalidation systems and for other reasons (for
example, the server admin might want to log out all users gracefully
in order to shut down the system). I think the implementation will be
connectionless (in the sense that it will not wait for a return
value). Is this the sort of thing you are after?
Cheers
Ari Maniatis
-------------------------->
Aristedes Maniatis
phone +61 2 9660 9700
PGP fingerprint 08 57 20 4B 80 69 59 E2 A9 BF 2D 48 C2 20 0C C8
This archive was generated by hypermail 2.0.0 : Fri Mar 09 2007 - 19:16:26 EST