On Mar 10, 2007, at 2:15 AM, Aristedes Maniatis wrote:
>
> 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.
True. Let's put it this way - no decision has been made on the client
callbacks yet.
>> 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.
IIRC, Tore mentioned this before, that it would be nice to define
some arbitrary RPC-like calls to the server-side peer objects, kind
of like EOF does. So that you can do clientObject.doX() and it will
proxy the call to the serverObject.doX(). I'd say this can be a new
feature in 3.0, and it would be nice if somebody volunteers to do it.
Andrus
This archive was generated by hypermail 2.0.0 : Sat Mar 10 2007 - 10:43:28 EST