[appengine-java] Re: why dont my two longs equal each other?
Just use StoredID.equals(ID) These are objects in Java, so you need to use equals (or StoreID.longValue==ID.longValue) Cheers Nicolas On Oct 21, 12:39 pm, John V Denley wrote: > OK so Im sending in an ID number (Long) and Im doing a query on the > datastore, getting all the "contacts" in the database, using the > "getID" function to get the "StoredID" and comparing the ID's. > > However for some reason the boolean "test" below never becomes true, > despite after stepping through the program there are times when > StoredID=16 and ID=16, but yet (StoredID==ID) does not evaluate to > "true" > > anyone got any ideas? > > public String updateContact(Long AdminID, Long ID, String > Name,String Phone, String KnownAs, String Notes) throws > NotLoggedInException { > > Contact ContactToUpdate=null; > Long StoredID; > > PersistenceManager pm = PMF.get().getPersistenceManager(); > try { > Query q = pm.newQuery(Contact.class, "AdminID == AID"); > q.declareParameters("Long AID"); > List Contacts = (List) q.execute(AdminID); > for (Contact contact : Contacts) > { > > StoredID=contact.getID(); > boolean test=(StoredID==ID); > if (test) > { > ContactToUpdate=contact; > } > else > { > ContactToUpdate=null; > } > } > } > finally > { > pm.close(); > } > } --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Removing jsessionid from URLs
> Ok, I have learned something new today :) > > You will only have this problem if you are creating a user session for > each and every request. If you are a bit more conservative for > creating user sessions (for example, storing data in cookies for the > anonymous user) maybe this issue would disappear. Yes, I agree, but in my case I could find anywhere in my code where I was creating a Session (maybe it was done in another layer, I am using the Stripes as a framework - which I really recomment.) But I would have expected that disabling the session in app engine would also remove the jsessionid from the url. However that was not the case. And same thing with the jetty configuration parameters. So a filter to wrap the response was the only solution I found. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-java@googlegroups.com To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en -~--~~~~--~~--~--~---
[appengine-java] Re: Fast MVC Framework for GAE?
> I know stripes is a very slow framework on server startup time, and > apparently it needs to start up after being idle for a few minutes on > GAE. Before I go down the patch of switching MVCs, I would be > interested in I am using Stripes and I think the startup is not really that slow, I usually get it in 6-7 secs. Obviously it's very depending on how many actions you have but, but maybe the startup time might not be only stripes fault? I also did try yesterday to activate the precompilation and the results were really encouraging (down to 3-4 secs). I have another webapp with a single servlet and I think it does 1-2 sec startup time (without precompilation). I don't believe you'll find any java framework that would improve significantly on Stripes. Cheers Nicolas -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.