Re: EntityProxy efficiency

2012-02-22 Thread Thomas Broyer
One .fire() equates one HTTP request. You can .append() request contexts, but then only one of them can be fire()d (you'll have an exception otherwise). Otherwise, yes, one session will have several transactions, possibly unrelated, but that's the whole point of "batching" things in a RequestC

Re: EntityProxy efficiency

2012-02-22 Thread JoseM
Thanks for the reply. I was thinking of doing something similar but the problem I can see is that the session could possible encapsulate several different unrelated transactions because of the way RequestFactory handles appending of different .fire() calls (at least from what I understand of t

Re: EntityProxy efficiency

2012-02-22 Thread Alex opn
See also: http://code.google.com/p/google-guice/wiki/JPA guice-persist supports the "open session in view" pattern, too -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To view this discussion on the web visit https://groups.google.com/d

Re: EntityProxy efficiency

2012-02-22 Thread Thomas Broyer
I never used JPA or JDO with RF, and I don't know those technologies that much, but I think what you need is the "open session in view" pattern [1] to maintain a single session for the whole HTTP request, and then use one transaction per service method. [1] see http://static.springsource.org/

Re: EntityProxy efficiency

2012-02-21 Thread JoseM
Is there a way for us to easily do this? In other words is there one method which I can mark which starts and ends the session for one request? -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To view this discussion on the web visit http

Re: EntityProxy efficiency

2011-05-09 Thread sheamus
Thanks Thomas, that's the solution I was looking for too. The 'solution' I am using now to prevent the lookup before returning each object was to populate an 'ephemeral' object. I simply create a duplicate object using the same EntityProxy class and it returns to the client without doing the looku

Re: EntityProxy efficiency

2011-05-09 Thread Thomas Broyer
RF processes "invocations" (method calls) without knowledge of what they do, and their can be several such invocations in the same request (RequestContext). Imagine I do: ctx.foo(entity).fire(...); RF will check whether 'entity' is still 'live', because it cannot know what 'foo' made of it: u

Re: EntityProxy efficiency

2011-05-09 Thread Jerome Thoma
Sorry, I don't exactly understand what you mean. Deleted by whom? Let's say there is a request for a list of objects which I retrieve from my web-service. Why does RF need to check if these objects have not been deleted even though my service has just delivered them as being valid? I feel like

Re: EntityProxy efficiency

2011-05-09 Thread Thomas Broyer
Note that it's not about "integrity check", the goal is only to detect a deleted entity and thus dispatch the appropriate EntityProxyChange event on the client-side. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group,

Re: EntityProxy efficiency

2011-05-09 Thread Jerome Thoma
Thanks a lot Thomas! You've just made my day. Currently we don't need the live check, because all integrity checks are already performed by the backend, so i'll just return true in isLive. Now I should be able to use a single proxy for crud and list operations in most cases. Have a nice day Jer

Re: EntityProxy efficiency

2011-05-09 Thread Thomas Broyer
Before sending the response back to the client, RF will ask each EntityProxy it has seen whether it's still "live"; and if it's not, it'll tell the client that the entity has been deleted (generating an EntityProxyChange(DELETED) event on the client-side). This is done by asking the entity's Lo

Re: EntityProxy efficiency

2011-05-09 Thread Jerome Thoma
I've been thinking some more about your remarks and all my solutions are dead-ends: - use EntityProxies for all objects. Not possible because I cannot execute a complete RF server call in a single Hibernate session (because Hibernate runs one a different server encapsulated by web services) - us

Re: EntityProxy efficiency

2011-05-04 Thread Jerome Thoma
Thanks a lot Colin, sounds logical to me, but unfortunately it does not fit at all into our system design. All our RF requests are piped through HttpInvoker beans to our Spring-powered backend (which is shared by many different applications, so I cannot touch it) which of course manages the Hibe

Re: EntityProxy efficiency

2011-05-03 Thread Colin Alworth
My understanding is that RF assumes you will be using the same persistence session for the duration of the request to prevent any perf issues here. Those find operations are done because RF considers the ID to be the only valid way to know that it has the latest copy of the object - every time i

Re: EntityProxy efficiency

2011-05-03 Thread Fidencio Velasquez
«Draculaboyman»* El may 3, 2011 2:02 a.m., "Jerome Thoma" escribió: > Hi everyone, > I have a question about EntityProxy vs. ValueProxy and efficiency issues. I > need to load a list of SubProxy objects using RF for display in a listbox > inside an editor for an encompassing SuperProxy type. No Su

Re: EntityProxy efficiency

2011-05-03 Thread Fidencio Velasquez
>From me «Draculaboyman»* El may 3, 2011 2:02 a.m., "Jerome Thoma" escribió: > Hi everyone, > I have a question about EntityProxy vs. ValueProxy and efficiency issues. I > need to load a list of SubProxy objects using RF for display in a listbox > inside an editor for an encompassing SuperProxy t

EntityProxy efficiency

2011-05-03 Thread Jerome Thoma
Hi everyone, I have a question about EntityProxy vs. ValueProxy and efficiency issues. I need to load a list of SubProxy objects using RF for display in a listbox inside an editor for an encompassing SuperProxy type. No SubProxy instance is modified by the editor, but because RF does not support