cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zissis Trabaris" <z.traba...@insysware.com>
Subject RE: Updating DataMap through ROP client
Date Thu, 19 Feb 2009 05:27:36 GMT
Thank you for taking the time to dig through the code. I will test it
out tomorrow and see if this fixes the issue.

Zissis Trabaris * Chief Technology Officer * INSYSWARE * 3235 West River
Road, Grand Island, New York, 14072, USA 
Mobile (716) 930-5654 * Office (518) 636-4118 * Fax (716) 625-1305 *
z.trabaris@insysware.com * www.insysware.com 

CONFIDENTIALITY: This email (including any attachments) may contain
confidential, proprietary and privileged information, and unauthorized
disclosure or use is prohibited. If you received this email in error,
please notify the sender and delete this email from your system. Thank
you. 


-----Original Message-----
From: Andrey Razumovsky [mailto:razumovsky.andrey@gmail.com] 
Sent: Tuesday, February 17, 2009 3:01 PM
To: user@cayenne.apache.org
Subject: Re: Updating DataMap through ROP client

Hi again,

I've done some surfing through the code. Probably this information will
be
useful for you:
Cayenne-Hessian classes do not have their own Configuration instance,
but
they do have their own EntityResolver instance, which is created using
EntityResolver.getClientEntityResolver(). This object is created once,
so I
assume you should modify it as well after you modified server
EntityResolver, e.g.

resolver.getClientEntityResolver().setDataMaps(new
ArrayList<DataMap>());
for (DataMap map : resolver.getDataMaps()) {
                    DataMap clientMap = map.getClientDataMap(resolver);

                        if (clientMap != null) {

resolver.getClientEntityResolver().addDataMap(clientMap);
                        }
                    }

Hope this helps!

2009/2/17 Zissis Trabaris <z.trabaris@insysware.com>

> The ROP server is controlled by an instance of HessianServlet. I have
> tried to run Configuration.getSharedConfiguration() to get the map
from
> the server and then clear the EntityResolver that way but it seems
like
> the HessianServlet has its own version of the Configuration instance
> therefore its EntityResolver does not get cleared. The reason I must
> modify the Maps from the ROP client is that our application is
> distributed over the Web and has an MDA modeling component that allows
> our business users to modify the application at runtime. By doing so,
> they can create new tables or modify existing tables. Once they have
> finished modeling, they need the capability to synchronize Cayenne
with
> the new models right from their ROP client in order for everyone else
to
> use the changes. The client application must work through firewalls
and
> HTTP proxies so I am forced to code everything in the ROP client
layer.
> If I knew how to get access to HessianServlet's instance of the
> Configuration instance on the server side I could clear the
> EntityResolver and everything would work perfectly.
>
> Zissis Trabaris * Chief Technology Officer * INSYSWARE * 3235 West
River
> Road, Grand Island, New York, 14072, USA
> Mobile (716) 930-5654 * Office (518) 636-4118 * Fax (716) 625-1305 *
> z.trabaris@insysware.com * www.insysware.com
>
> CONFIDENTIALITY: This email (including any attachments) may contain
> confidential, proprietary and privileged information, and unauthorized
> disclosure or use is prohibited. If you received this email in error,
> please notify the sender and delete this email from your system. Thank
> you.
>
>
> -----Original Message-----
> From: Andrey Razumovsky [mailto:razumovsky.andrey@gmail.com]
> Sent: Tuesday, February 17, 2009 12:21 PM
> To: user@cayenne.apache.org
> Subject: Re: Updating DataMap through ROP client
>
> The most common case to fetch Configuration instance in server is via
> Configuration.getSharedConfiguration(). But I still don't understand
why
> you
> don't want to apply all changes on server side. This way, in theory,
no
> reloading will be required on server (except cache cleaning).
>
> 2009/2/17 Zissis Trabaris <z.trabaris@insysware.com>
>
> > I can clear the EntityResolver on the client side but since I don't
> know
> > how to get to the Configuration instance on the server side I can't
> > re-load the maps. Without re-loading the maps on the server side, I
> will
> > always get an entity not found exception when I try to use a newly
> added
> > ObjEntity.
> >
> > Zissis Trabaris * Chief Technology Officer * INSYSWARE * 3235 West
> River
> > Road, Grand Island, New York, 14072, USA
> > Mobile (716) 930-5654 * Office (518) 636-4118 * Fax (716) 625-1305 *
> > z.trabaris@insysware.com * www.insysware.com
> >
> > CONFIDENTIALITY: This email (including any attachments) may contain
> > confidential, proprietary and privileged information, and
unauthorized
> > disclosure or use is prohibited. If you received this email in
error,
> > please notify the sender and delete this email from your system.
Thank
> > you.
> >
> >
> > -----Original Message-----
> > From: Andrey Razumovsky [mailto:razumovsky.andrey@gmail.com]
> > Sent: Monday, February 16, 2009 3:15 PM
> > To: user@cayenne.apache.org
> > Subject: Re: Updating DataMap through ROP client
> >
> > I don't know details of Hessian, but I don't think HessianServlet
> caches
> > any
> > data. Have you tried simply clearing client context's cache?
> >
> > 2009/2/16 Zissis Trabaris <z.trabaris@insysware.com>
> >
> > > I have solved the DataMap problem with the following: I have
created
> > an
> > > HTTP back-channel that send the map xmls to the client. The client
> > then
> > > creates a new Configuration instance, modifies the data maps,
> > serializes
> > > the results to XML, sends them to the server and the server saves
> them
> > > to disk. The remaining problems to solve are the following:
> > >
> > > 1) I need to somehow refresh the configuration instances that are
in
> > > memory for the HessianServlet.
> > > 2) Once refreshed, I need to somehow clear the object caches of
the
> > > HessianServlet.
> > >
> > > All of this without dropping any connections that the
HessianServlet
> > is
> > > servicing.
> > >
> > > Zissis Trabaris * Chief Technology Officer * INSYSWARE * 3235 West
> > River
> > > Road, Grand Island, New York, 14072, USA
> > > Mobile (716) 930-5654 * Office (518) 636-4118 * Fax (716) 625-1305
*
> > > z.trabaris@insysware.com * www.insysware.com
> > >
> > > CONFIDENTIALITY: This email (including any attachments) may
contain
> > > confidential, proprietary and privileged information, and
> unauthorized
> > > disclosure or use is prohibited. If you received this email in
> error,
> > > please notify the sender and delete this email from your system.
> Thank
> > > you.
> > >
> > >
> > > -----Original Message-----
> > > From: Andrey Razumovsky [mailto:razumovsky.andrey@gmail.com]
> > > Sent: Sunday, February 15, 2009 1:10 PM
> > > To: user@cayenne.apache.org
> > > Subject: Re: Updating DataMap through ROP client
> > >
> > > Hi Zissis,
> > >
> > > DbEntities are not being sent to client (and DataMap is sent
> trimmed).
> > > So I
> > > don't think you can perform DataMap changes from client. What I
> would
> > > try to
> > > do is to write a custom query which performs your operations and
the
> > > fire it
> > > from the client. I'm not sure this will work though.
> > >
> > > Regards,
> > > Andrey
> > >
> > > 2009/2/15 Zissis Trabaris <z.trabaris@insysware.com>
> > >
> > > > We have an ROP client that acts as a modeler for our runtime
> > > > application. Is there any way to modify a DataMap via an ROP
> client
> > > > layer, synchronize the DB schema like I would do using
> > > > ExecutingMergerContext at the server layer and then clear the
> server
> > > and
> > > > client object caches without dropping the ROP connection?
> > > >
> > > >
> > > >
> > > > Zissis Trabaris * Chief Technology Officer * INSYSWARE * 3235
West
> > > River
> > > > Road, Grand Island, New York, 14072, USA
> > > > Mobile (716) 930-5654 * Office (518) 636-4118 * Fax (716)
625-1305
> *
> > > > z.trabaris@insysware.com
> > >
<mailto:%20%20z.trabaris@insysware.com<20%2520z.trabaris@insysware.com>
> <20%2520z.trabaris@insysware.com <20%252520z.trabaris@insysware.com>>
> > <20%2520z.trabaris@insysware.com <20%252520z.trabaris@insysware.com>
<
> 20%252520z.trabaris@insysware.com
<20%25252520z.trabaris@insysware.com>>><
> > > 20%2520z.trabaris@insysware.com
<20%252520z.trabaris@insysware.com> <
> 20%252520z.trabaris@insysware.com
<20%25252520z.trabaris@insysware.com>>
> <
> > 20%252520z.trabaris@insysware.com
<20%25252520z.trabaris@insysware.com>
>
<20%25252520z.trabaris@insysware.com<20%2525252520z.trabaris@insysware.c
om>
> >>>>
> > > >  *
> > > > www.insysware.com <http://www.insysware.com/>
> > > >
> > > > ________________________________
> > > >
> > > > CONFIDENTIALITY: This email (including any attachments) may
> contain
> > > > confidential, proprietary and privileged information, and
> > unauthorized
> > > > disclosure or use is prohibited. If you received this email in
> > error,
> > > > please notify the sender and delete this email from your system.
> > Thank
> > > > you.
> > > >
> > > >
> > > >
> > > >
> > >
> >
>

Mime
View raw message