I have an instance request defined in my public interface ApplicationRequestFactory extends RequestFactory { ......... @ServiceName("com.mydomain.server.domain.ApplicationUser") public interface ApplicationUserRequest extends RequestContext { *InstanceRequest<ApplicationUserProxy, Void> persist();* } ApplicationUserRequest applicationUserRequest(); ......... }
I am calling this instance request from my activity : @Override public void saveApiKey(String apiKey) { ApplicationUserRequest request = requestFactory.applicationUserRequest(); ApplicationUserProxy applicationUser = request.edit(clientFactory.getApplicationUser()); applicationUser.setSolve360ApiKey(apiKey); request.persist().using(applicationUser); request.fire(new Receiver<Void>() { @Override *public void onSuccess(Void response) {* * Logger.getLogger(Solve360ApiKeyActivity.class.getName()).log(Level.INFO, "success saving API key");* * }* }); onSuccess is being called but the implementation is never executed. I put a breakpoint in the persist method and this point is never reached !! The applicationUser is never persisted, no changes on my persistent storage !! Still, onSuccess ??? The Instance request validates OK, here's the implementation : @PersistenceCapable(identityType = IdentityType.APPLICATION, detachable = "true") @Version(strategy = VersionStrategy.VERSION_NUMBER, column = "version") public class ApplicationUser { public ApplicationUser() { } ............. public static ApplicationUser findApplicationUser(String id) { ............... } *void persist()* { PersistenceManager pm = null; try { pm = PMF.getPersistenceManager(); pm.makePersistent(this); } finally { pm.close(); } } } I can debug the call down to the RequestFactoryServlet where I find the following payload : {"I":[{"O":"com.mydomain.shared.request.ApplicationRequestFactory$ApplicationUserRequest::persist","P":[{"S":"ImtvZW5Aa29tYS5iZSI=","T":"com.mydomain.shared.request.ApplicationUserProxy"}]}],"O":[{"O":"UPDATE","S":"ImtvZW5Aa29tYS5iZSI=","T":"com.mydomain.shared.request.ApplicationUserProxy","V":"Mg==","P":{"solve360ApiKey":"dlaskjlskdjfsl;dkfjsdf"}}]} Stepping/debugging deeper I end up in the class com.google.gwt.requestfactory.server.SimpleRequestProcessor where the operation is processed : {Invocations=[{Parameters=[{"T":"com.mydomain.shared.request.ApplicationUserProxy","S":"ImtvZW5Aa29tYS5iZSI="}], Operation=com.mydomain.shared.request.ApplicationRequestFactory$ApplicationUserRequest::persist}], Operations=[{PropertyMap={solve360ApiKey=djksahfgksdajhgdf}, ServerId=ImtvZW5Aa29tYS5iZSI=, Operation=UPDATE, Version=Mg==, TypeToken=com.mydomain.shared.request.ApplicationUserProxy}]} The implementation for processing the operation uses an AutoBean visitor, and but I don't see a reference to my persist() method from that point on... Stuck :-/ -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.