[appengine-java] Re: Possible to Add Child to Owned One to Many Relationship Without Loading All Children?
You hit the nail on the head. As far as I know there is nothing like sequence in Google App Engine. Either you need to have another entity with a counter and increase it in transactional way. Or you can use memcache. http://code.google.com/intl/pl/appengine/docs/java/javadoc/com/google/appengine/api/memcache/MemcacheService.html There is a method: java.lang.Long increment(java.lang.Object key, long delta) Atomically fetches, increments, and stores a given integral value. --- Pay attention to atomically. May be this can be used for generating sequential and avoid bottleneck in the case of datastore entity and additional transaction. But because of the risk of memcache expiring this method needs some more elaboration. --~--~-~--~~~---~--~~ 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: Servelts versus JSPS
JSP is nothing more than servlet code woven with html and some tags to make generating html pages more easy. Almost everything you can do in sevlet code you can do also in JSP page. So it is a design decision what logic should be kept in JSP and what logic should tackled in a classic servlet code. I think that what you have written is very sound and follow MVC approach. JSP should be responsible only for user interface (view part) and be separated from any persistent logic, and servlet code should keep model and control part and be separated from any interface code. Servlet code should also be the only to communicate with the persistence layer. But why use pure JSP and servlet ? There are a lot of good frameworks at hand. There are successful stories with JSF 2.0 and Spring MVC running gently with Google App Engine. http://groups.google.com/group/google-appengine-java/web/will-it-play-in-app-engine?pli=1 Also GWT is running very nicely - I'm personally very fond of it. But GWT is completely different, Ajax-style, approach. --~--~-~--~~~---~--~~ 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: Can fliter the child class based on parent class's property?
It is not possible, your query filter should contain only 'direct attributes of the class. if you want to run query based on class number you need to have to duplicate this property from Classroom to Student. But I don't understand your problem. If you have 'one to 'many' relationship and want to run query on children based on parent attributes than every time you will get all children connected with that parent. So why not run query on parent class and collect all the children. --~--~-~--~~~---~--~~ 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: why dont my two longs equal each other?
AHHH, that actually explains a lot of other problems I have been seeing with Long that i wasnt expecting so why would anyone use Long rather than long? Im guessing that long is actually a basic datatype I suppose I can go look that up myself though! Thanks for your help and input... I wish id figured that out at about midnight last night, I could have gone to bed 4 hours earlier!!! LOL On Oct 21, 3:44 am, nclemeur nclem...@gmail.com wrote: 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 VDenleyjohnvden...@googlemail.com 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); ListContact Contacts = (ListContact) 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: why dont my two longs equal each other?
persistence layer will try to set a null if one field has not been initialized, which leads to an exception. So you shall not try to persist a primitive type use Comparable.compare(Comparable o) instead, as nclemeur suggested. On Wed, Oct 21, 2009 at 6:20 PM, John V Denley johnvden...@googlemail.comwrote: AHHH, that actually explains a lot of other problems I have been seeing with Long that i wasnt expecting so why would anyone use Long rather than long? Im guessing that long is actually a basic datatype I suppose I can go look that up myself though! Thanks for your help and input... I wish id figured that out at about midnight last night, I could have gone to bed 4 hours earlier!!! LOL On Oct 21, 3:44 am, nclemeur nclem...@gmail.com wrote: 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 VDenleyjohnvden...@googlemail.com 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); ListContact Contacts = (ListContact) 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: JDO/JPA Snippets That Work: Change of venue!
Thanks for the lead Jason! I didn't know that page was there. Jorge Gonzalez On Oct 20, 12:25 pm, Jason (Google) apija...@google.com wrote: Hi Jorge. Have you seen the App Engine Cookbook? Users are free to post and search for code snippets:http://appengine-cookbook.appspot.com/ - Jason On Sat, Oct 17, 2009 at 5:26 AM, Jorge athenas...@gmail.com wrote: Thanks Max for sharing your experience and conclusions about this *important* topic. I wish there were more places where to find how-to examples about GAE! Jorge Gonzalez On Oct 16, 6:22 pm, Max Ross maxr+appeng...@google.commaxr%2bappeng...@google.com wrote: Hi everybody, I've been writing JDO/JPA Snippets That Work for 5 weeks now. I'm enjoying the writing and I'm pleased with the discussion that has taken place around the weekly topics, so I intend to keep going. However, while the Google Group is certainly a great place for you, our customers, to reach out to us and to help one another, I'm not convinced it's the best place for me to be publishing something like Snippets That Work. It's not documentation, but it's _almost_ documentation. So, in the interest of consolidating these posts in one place I've decided to establish a GAE/J persistence blog: http://gae-java-persistence.blogspot.com/ You'll notice I've already cross-posted the first 5 Snippets That Work to this blog, and starting next week I'll be posting the new entries there. If you find Snippets That Work valuable I'd recommend subscribing using your favorite feed reader, but I'll still send out a link on this message board whenever there is a new post. Thanks for reading! Max --~--~-~--~~~---~--~~ 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: Possible to Add Child to Owned One to Many Relationship Without Loading All Children?
Maybe what you are looking for is DatastoreService.allocateIds(). On Oct 21, 9:35 am, leszek leszek.ptokar...@gmail.com wrote: You hit the nail on the head. As far as I know there is nothing like sequence in Google App Engine. Either you need to have another entity with a counter and increase it in transactional way. Or you can use memcache. http://code.google.com/intl/pl/appengine/docs/java/javadoc/com/google... There is a method: java.lang.Long increment(java.lang.Object key, long delta) Atomically fetches, increments, and stores a given integral value. --- Pay attention to atomically. May be this can be used for generating sequential and avoid bottleneck in the case of datastore entity and additional transaction. But because of the risk of memcache expiring this method needs some more elaboration. --~--~-~--~~~---~--~~ 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
This is indeed the case if Jetty can check that cookies are properly handled by the client. But on the first access, Jetty has no way to check that cookies are accepted by the client so it will add the jsessionid automatically. This is why search engines suffer from this problem. If you use a tool such as Webmaster (from Google) you'll see that a lot of indexed urls come with the jsessionid and they might end up in the search results displayed to users (altough I believe this is not any more the case). 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. --~--~-~--~~~---~--~~ 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: having problems with JDO query serialization to memcache...
cheers ... makes sense! On Oct 20, 2:05 pm, Jason (Google) apija...@google.com wrote: No. The StreamingQueryResult class, which is a List used by DataNucleus to store query results, does not implement Serializable which is required for all objects stored in memcache. But you can create another List, i.e. an ArrayList, copy the (serializable) results into it, and cache this. You'll also need to do this if you want to send query results over the wire to a GWT-based application, for example. - Jason On Mon, Oct 19, 2009 at 2:03 PM, Larry Cable larry.ca...@gmail.com wrote: quick question: should I be able to directly serialize (Cache.put (...)) results of JDO queries into Memcache? It appears not ... I have the following class(es): @PersistenceCapable(identityType=IdentityType.APPLICATION, objectIdClass=CityState.CityStateKey.class, cacheable=true, detachable=true) public class CityState implements Serializable { public static class CityStateKey implements Serializable { �...@notpersistent private static Pattern p = Pattern.compile(^(.*),\\s?([A-Za-z]{2}) $); public CityStateKey() { } public CityStateKey(String keyValue) { final Matcher m = p.matcher(keyValue.trim()); if (m.matches()) { city = m.group(1); state = State.valueOf((m.group(2))).name(); } else throw new IllegalArgumentException(keyValue); } /* (non-Javadoc) * @see java.lang.Object#hashCode() */ �...@override public int hashCode() { // elided ... } /* (non-Javadoc) * @see java.lang.Object#equals(java.lang.Object) */ �...@override public boolean equals(Object obj) { // elided... } public String toString() { return (city + Address.COMMASPACE + state); } public String state; public String city; } public CityState(final String city, final String state) { this.city = city.trim(); this.state = state; } �...@override public String getCity() { return city; } �...@override public String getState() { return state; } /* (non-Javadoc) * @see java.lang.Object#hashCode() */ �...@override public int hashCode() { // elided... } /* (non-Javadoc) * @see java.lang.Object#equals(java.lang.Object) */ �...@override public boolean equals(Object obj) { // elided... } �...@override public String toString() { return city + Address.COMMASPACE + state; } �...@persistent(primaryKey=true) public String state; // should be State GAE/JDO does not support... �...@persistent(primaryKey=true) public String city; } when I query select from CityState via JDO I get a StreamingQueryResult ... if I attempt to put that as a value into memcache I get the typical NotSerializableException indicating that an object in the graph is not serializable ... any thoughts/suggestions, clearly the (simple) app domain objects are (both) serializable as are the internal fields ... Thanks- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ 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] LIKE query workaround for the Low Level API
Hi, what is the suggested way to emulate an SQL LIKE 'prefix%' query using the low level Datastore API? thanks, George. --~--~-~--~~~---~--~~ 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: Unicode problems
FYI, I fixed the problem with a little patch in narwhal (the commonjs implementation used by Jack): narwhal/engines/rhino/lib/binary-engine.js exports.B_DECODE_DEFAULT = function(bytes, offset, length) { return String(new Packages.java.lang.String(bytes, offset, length, UTF-8)); } exports.B_ENCODE_DEFAULT = function(string) { return new Packages.java.lang.String(string).getBytes(UTF-8); } regards, George. On Oct 14, 9:25 pm, Jason (Google) apija...@google.com wrote: Hi Prashant. I'm still waiting on a .html or .txt file to test with using Helma NG/Jack in particular. If you're seeing something similar in a different environment, please post a new thread with more details. I do recall that there was a known issue with XMPP character encoding in version 1.2.5 -- can you check if this is fixed with yesterday's 1.2.6 release? - Jason On Sun, Oct 11, 2009 at 11:40 AM, Prashant antsh...@gmail.com wrote: is this issue solved? i am having similar problem when i store some message, received via xmpp, to datastore. --~--~-~--~~~---~--~~ 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: AccessControlException on OutputStream#write(byte b[], int off, int len)
Can you send your app-id? (privately if you wish) On Wed, Oct 21, 2009 at 1:46 AM, Thomas Wiradikusuma wiradikus...@gmail.com wrote: Hi, The following Groovy snippet throws exception: byte[] responseData = byteOut.toByteArray() response.setContentLength(responseData.length) response.setContentType(application/octet-stream) response.outputStream.write(responseData, 0, responseData.length) -- this one The exception is: java.security.AccessControlException: access denied (java.lang.RuntimePermission getClassLoader) at com.google.appengine.runtime.Request.process-e40a07dff3b6f2fc (Request.java) at org.codehaus.groovy.reflection.ClassLoaderForClassArtifacts.init (ClassLoaderForClassArtifacts.java:22) at org.codehaus.groovy.runtime.callsite.CallSiteClassLoader.init (CallSiteClassLoader.java:40) at org.codehaus.groovy.reflection.CachedClass$5$1.run (CachedClass.java:144) at org.codehaus.groovy.reflection.CachedClass$5$1.run (CachedClass.java:143) at java.security.AccessController.doPrivileged(AccessController.java: 34) at org.codehaus.groovy.reflection.CachedClass$5.initValue (CachedClass.java:141) at org.codehaus.groovy.reflection.CachedClass$5.initValue (CachedClass.java:140) at org.codehaus.groovy.util.LazyReference.getLocked (LazyReference.java:33) at org.codehaus.groovy.util.LazyReference.get(LazyReference.java:20) at org.codehaus.groovy.reflection.CachedClass.getCallSiteLoader (CachedClass.java:472) at org.codehaus.groovy.runtime.callsite.CallSiteGenerator.compilePojoMethod (CallSiteGenerator.java:222) at org.codehaus.groovy.reflection.CachedMethod.createPojoMetaMethodSite (CachedMethod.java:240) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.createCachedMethodSite (PojoMetaMethodSite.java:158) at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.createPojoMetaMethodSite (PojoMetaMethodSite.java:147) at groovy.lang.MetaClassImpl.createPojoCallSite(MetaClassImpl.java: 2978) at org.codehaus.groovy.runtime.callsite.CallSiteArray.createPojoSite (CallSiteArray.java:114) at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallSite (CallSiteArray.java:148) at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall (CallSiteArray.java:40) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call (AbstractCallSite.java:117) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call (AbstractCallSite.java:133) Any idea why it happened and how to fix it? --~--~-~--~~~---~--~~ 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] JDO/JPA Snippets That Work - Optimistic Locking With @Version
http://gae-java-persistence.blogspot.com/2009/10/optimistic-locking-with-version.html --~--~-~--~~~---~--~~ 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: local datastore cleanup
Hi Nikolay. What are your application IDs? - Jason On Tue, Oct 20, 2009 at 12:34 AM, Nikolay Gorylenko n0...@jug.ua wrote: This problem lasts for 3 weeks on Google AppEngine console. I switched to another applicationId, and everything was good for few moments - i was able to see my data. But now again - Server error and no way to see my data via admin console. --~--~-~--~~~---~--~~ 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: Java vs. Python X-AppEngine-Estimated-CPM-US-Dollars
Aside from keeping steady HTTP traffic to your site, I'm afraid not. But as I wrote in my last post, we're making updates over the next few releases to drive this startup time lower. - Jason On Tue, Oct 20, 2009 at 2:06 AM, Marcel Overdijk marceloverd...@gmail.comwrote: Is there any other way to keep an instance warm? Startup of instance just takes to much time to have an effective GAE/J application... On 19 okt, 22:58, Jason (Google) apija...@google.com wrote: To answer your question, no, having a cron job run every minute to keep an instance warm will not work. If all application instances have spun down, then a fresh HTTP request will require a new instance to be created, which will incur the startup costs. - Jason On Fri, Oct 16, 2009 at 6:45 AM, Toby tobias.ro...@sunnymail.mobi wrote: That is an interesting thread. I was asking myself the same question. My problem is, that I have some expensive initialization that is done when the webapp is initialized. I recognized that the very first request (after a longer time of idle) takes a lot of time. And as you say is expensive. I wonder if it would make sense to have a cron job that runs every minute to prevent this? On Oct 15, 10:52 pm, Timwillhack timwillh...@gmail.com wrote: I should probably point out that when I say 'Timed out' I really mean, clean start after waiting say 10 minutes to refresh a page, its not a 30 second endless while loop or anything, its actually just outputting one character from a string array. On Oct 15, 2:46 pm, Timwillhack timwillh...@gmail.com wrote: I was just curious if the initialization of the Java VM is actually charged a client? Here are some sample headers from Java vs. Python after letting the server timeout: VERY EXPENSIVE JAVA (timed out - guessing restarting VM): X-AppEngine-Estimated-CPM-US-Dollars: $0.149171 X-AppEngine-Resource-Usage: ms=4152 cpu_ms=6440 api_cpu_ms=0 X-AppEngine-Estimated-CPM-US-Dollars: $0.145377 X-AppEngine-Resource-Usage: ms=3890 cpu_ms=6276 api_cpu_ms=0 Cheap JAVA (quick refresh): X-AppEngine-Estimated-CPM-US-Dollars: $0.000168 X-AppEngine-Resource-Usage: ms=41 cpu_ms=3 api_cpu_ms=0 X-AppEngine-Estimated-CPM-US-Dollars: $0.000189 X-AppEngine-Resource-Usage: ms=19 cpu_ms=4 api_cpu_ms=0 CHEAP PYTHON FRESH START (waited about 10 mins before connecting): X-AppEngine-Estimated-CPM-US-Dollars: $0.002778 X-AppEngine-Resource-Usage: ms=103 cpu_ms=116 api_cpu_ms=0 X-AppEngine-Estimated-CPM-US-Dollars: $0.002778 X-AppEngine-Resource-Usage: ms=106 cpu_ms=116 api_cpu_ms=0 PYTHON RECONNECT QUICKLY: X-AppEngine-Estimated-CPM-US-Dollars: $0.000231 X-AppEngine-Resource-Usage: ms=7 cpu_ms=6 api_cpu_ms=0 Python is reporting very very very cheaper pricing per 1000. Is this the case or does google not really charge for the initialization for java? I sat here refreshing a page with a friend doing the same, out of the 40 or so requests about 4 were skyrocketed in price. This makes me very wary about making something that is hit excessively, since it seems like each instance is only taking 10 requests each per minute or whatver Yuck, are my numbers flawed or something? Or is Python just so much more efficient to use on app engine? --~--~-~--~~~---~--~~ 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: Spring MVC + Sitemesh problem
Thanks for this post, i thought i was going insane. I have deployed and redeployed dozens of times and see the same isssue -- empty site, no logs. Everything works fine in local eclipse environment. The deplyment to the app engine works with no errors. But when I access the application, there is an empty site and no logs on the server. On Oct 20, 5:35 am, Shponter shpon...@gmail.com wrote: Hi everybody! I'm using Spring MVC (3.0.0.RC1) with Sitemesh (2.4.2). Locally it works fine - generated jsp is decorated by sitemesh. When I deploy application on AppEngine I get empty site. There is also no exceptions or log messages... I don't have any ideas how to solve this... Cheers --~--~-~--~~~---~--~~ 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: having problems with JDO query serialization to memcache...
thanks jason for clarifying this. just to be sure since Larry's class carries the detachable=true annotation: keep detachable memcached objects their ability to be re-attached later on? thanks, andr On 21 Okt., 18:22, Larry Cable larry.ca...@gmail.com wrote: cheers ... makes sense! On Oct 20, 2:05 pm, Jason (Google) apija...@google.com wrote: No. The StreamingQueryResult class, which is a List used by DataNucleus to store query results, does not implement Serializable which is required for all objects stored in memcache. But you can create another List, i.e. an ArrayList, copy the (serializable) results into it, and cache this. You'll also need to do this if you want to send query results over the wire to a GWT-based application, for example. - Jason On Mon, Oct 19, 2009 at 2:03 PM, Larry Cable larry.ca...@gmail.com wrote: quick question: should I be able to directly serialize (Cache.put (...)) results of JDO queries into Memcache? It appears not ... I have the following class(es): @PersistenceCapable(identityType=IdentityType.APPLICATION, objectIdClass=CityState.CityStateKey.class, cacheable=true, detachable=true) public class CityState implements Serializable { public static class CityStateKey implements Serializable { �...@notpersistent private static Pattern p = Pattern.compile(^(.*),\\s?([A-Za-z]{2}) $); public CityStateKey() { } public CityStateKey(String keyValue) { final Matcher m = p.matcher(keyValue.trim()); if (m.matches()) { city = m.group(1); state = State.valueOf((m.group(2))).name(); } else throw new IllegalArgumentException(keyValue); } /* (non-Javadoc) * @see java.lang.Object#hashCode() */ �...@override public int hashCode() { // elided ... } /* (non-Javadoc) * @see java.lang.Object#equals(java.lang.Object) */ �...@override public boolean equals(Object obj) { // elided... } public String toString() { return (city + Address.COMMASPACE + state); } public String state; public String city; } public CityState(final String city, final String state) { this.city = city.trim(); this.state = state; } �...@override public String getCity() { return city; } �...@override public String getState() { return state; } /* (non-Javadoc) * @see java.lang.Object#hashCode() */ �...@override public int hashCode() { // elided... } /* (non-Javadoc) * @see java.lang.Object#equals(java.lang.Object) */ �...@override public boolean equals(Object obj) { // elided... } �...@override public String toString() { return city + Address.COMMASPACE + state; } �...@persistent(primaryKey=true) public String state; // should be State GAE/JDO does not support... �...@persistent(primaryKey=true) public String city; } when I query select from CityState via JDO I get a StreamingQueryResult ... if I attempt to put that as a value into memcache I get the typical NotSerializableException indicating that an object in the graph is not serializable ... any thoughts/suggestions, clearly the (simple) app domain objects are (both) serializable as are the internal fields ... Thanks- Hide quoted text - - Show quoted text -- Zitierten Text ausblenden - - Zitierten Text anzeigen - --~--~-~--~~~---~--~~ 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: having problems with JDO query serialization to memcache...
Just to mention, JDO (and DataNucleus) supports a Level2 cache, and can use javax.cache (GAE/J memcached) and is a single PMF property to turn it on. That way you don't need to play around putting objects into the L2 cache and getting them out yourself, its done for you. --~--~-~--~~~---~--~~ 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: Spring MVC + Sitemesh problem
Have you tried increasing the log levels ? -- Abhinav -Original Message- From: appenginetester jsand...@zerofeelistings.com Sent: 21 October 2009 23:46 To: Google App Engine for Java google-appengine-java@googlegroups.com Subject: [appengine-java] Re: Spring MVC + Sitemesh problem Thanks for this post, i thought i was going insane. I have deployed and redeployed dozens of times and see the same isssue -- empty site, no logs. Everything works fine in local eclipse environment. The deplyment to the app engine works with no errors. But when I access the application, there is an empty site and no logs on the server. On Oct 20, 5:35 am, Shponter shpon...@gmail.com wrote: Hi everybody! I'm using Spring MVC (3.0.0.RC1) with Sitemesh (2.4.2). Locally it works fine - generated jsp is decorated by sitemesh. When I deploy application on AppEngine I get empty site. There is also no exceptions or log messages... I don't have any ideas how to solve this... Cheers --~--~-~--~~~---~--~~ 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: Paging through large data sets
There is probably some way to integrate the statistics API into a general purpose paging library, but I don't think it's necessary. Perhaps this could be useful to determine how many pages of data are available, but if you're using the paging techniques described in http://code.google.com/appengine/articles/paging.html, you only need to be able to know if there are more results remaining, which you can do by fetching one more than needed. - Jason On Tue, Oct 20, 2009 at 4:47 AM, robinc robinchester...@googlemail.comwrote: Could the new Datastore Stats API be used for paging? To return information about numbers of entities in the datastore? Or is it not really meant to be used for this? Apart from anything else, I can't get statistics to work, but that's a separate problem... On Oct 8, 8:29 pm, Mouseclicker jens.h...@googlemail.com wrote: Hearing that cursoring is being supported in one of the next releases is excellent news! Thanks for this update. However one decision that I really do not understand: Why is the bigtable timestamp not exposed in the Java API? One way to limit query results and to exactly page through the result set would be based on time stamps. This information would be available in the store but cannot be accessed in the Java API. It would be useful for other use cases as well, e.g. detect concurrent modifications of an entity. Why do I have to duplicate this information in my own property which would be available from the system. Can anyone tell why Google made that decision? --~--~-~--~~~---~--~~ 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: AccessControlException (SerializablePermission enableSubclassImplementation) - Wicket on GAE
Hi there: We've been running a wicket app on gae since last month, but without the need of implement memcache-based implementation of Wicket's IPageStore. Why are you doing that? (our wicket version is 1.3.7) Regards, Esteban a.maza escribió: Hi, I am trying to get Apache Wicket running properly on GAE. Therefore, I am adapting some Wicket behavior (i.e., I am trying to implement a Memcache-based implementation of Wicket's IPageStore). Anyway, I am getting a java.security.AccessControlException: access denied (java.io.SerializablePermission enableSubclassImplementation) error when running my code on the dev server. It seems to me that the use of java.io.ObjectOutputStream causes some problems although the class is found on the JRE whitelist. Below you find the (shortened) stacktrace: snip java.security.AccessControlException: access denied (java.io.SerializablePermission enableSubclassImplementation) at java.security.AccessControlContext.checkPermission(Unknown Source) at java.security.AccessController.checkPermission(Unknown Source) at java.lang.SecurityManager.checkPermission(Unknown Source) at com.google.appengine.tools.development.DevAppServerFactory $CustomSecurityManager.checkPermission(DevAppServerFactory.java:139) at java.io.ObjectOutputStream.init(Unknown Source) at org.apache.wicket.util.io.IObjectStreamFactory $DefaultObjectStreamFactory$2.init(IObjectStreamFactory.java:150) at org.apache.wicket.util.io.IObjectStreamFactory $DefaultObjectStreamFactory.newObjectOutputStream (IObjectStreamFactory.java:114) at org.apache.wicket.util.lang.Objects.objectToByteArray(Objects.java: ) at org.apache.wicket.protocol.http.pagestore.AbstractPageStore.serializePage (AbstractPageStore.java:203) /snip Any help would be highly appreciated ;-) thanks, andr --~--~-~--~~~---~--~~ 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: about missing values
No. If an entity does not have a value set for a particular property (null IS a value, different from missing), then it won't appear in any query results involving that property. You'll need to continue sifting through every entity to see if a value is set, and if not, setting it directly. - Jason On Mon, Oct 19, 2009 at 6:09 AM, Prashant antsh...@gmail.com wrote: hi, i added a new column to my data table, as it is newly added it is showing missing as column values in datastore. now i want to initialize those missing values to some value, say 0. how do i do that programmatically? i tried using column == null as filter but that doesn't work. --~--~-~--~~~---~--~~ 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: having problems with JDO query serialization to memcache...
Thanks!. Although it wouldn't be a distributed cache, right? datanucleus escribió: Just to mention, JDO (and DataNucleus) supports a Level2 cache, and can use javax.cache (GAE/J memcached) and is a single PMF property to turn it on. That way you don't need to play around putting objects into the L2 cache and getting them out yourself, its done for you. --~--~-~--~~~---~--~~ 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: having problems with JDO query serialization to memcache...
Thanks!. Although it wouldn't be a distributed cache, right? Why? It will be exactly the same cache as what Google provide ... since DataNucleus puts things into it and gets them out, saving you the job of doing it. Nothing else is different --~--~-~--~~~---~--~~ 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: having problems with JDO query serialization to memcache...
You're right, I just misunderstood your comment. Thanks, Esteban datanucleus escribió: Thanks!. Although it wouldn't be a distributed cache, right? Why? It will be exactly the same cache as what Google provide ... since DataNucleus puts things into it and gets them out, saving you the job of doing it. Nothing else is different --~--~-~--~~~---~--~~ 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: select count(*) ?
The query restrictions are an artifact of the way App Engine's datastore is constructed, which makes certain operations (e.g. queries and reads) very fast and scalable but does limit the types of queries you can make, though you can typically get around these restrictions by re-thinking your model a bit. We are working on adding built-in cursor support for easier paging through entities and have just added a datastore statistics API for, among other things, getting the total entity count, even if it exceeds 1,000. More details here: http://code.google.com/appengine/docs/java/datastore/stats.html And we also have a data export utility included with the SDK to make it easier for you to back up or even move off of App Engine should you choose to, and we're continuing to look at ways of making App Engine, particularly the datastore component, easier to use. http://code.google.com/appengine/docs/python/tools/uploadingdata.html#Downloading_Data_from_App_Engine - Jason On Mon, Oct 19, 2009 at 1:53 PM, vetch oldpete...@gmail.com wrote: On 6 Paź, 10:03, Jason (Google) apija...@google.com wrote: * Because App Engine queries can only return up to 1,000 results, count(this) will never return above 1,000, even if you have more than 1,000 entities, so bear this in mind. I'm deeply shocked. This works like some black hole. You put your data there simply, but can't get them back that simply. In connection with restricions (inequality property filter), it is even harder to get anything more complex. BiGAppEngine disappointment. --~--~-~--~~~---~--~~ 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: Help me in Guestbook googlecode.
If you don't want to modify the JDOQL query, then you should be able to filter using a conditional in the loop. Something like: if (g.getAuthor().getEmail().equals(user.getEmail())) { // ... } Does this work? Is this what you're trying to do? - Jason On Tue, Oct 20, 2009 at 4:07 AM, Jefferson wkeffer...@gmail.com wrote: Hello everybody I am using the example that is in the Guestbook googlecode, I'm trying to get him to catch all the messages that are in the name of the User logged in, I could not do this with an if and not modifying the sql file in guestbook.jsp Any solution? --~--~-~--~~~---~--~~ 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: Servelts versus JSPS
Thanks both for the quick responses. Leszek you are right with the MVC. I'm not great at writing web applications since i am fairly new to the whole situation but all of my web applications have been written with ASP.NET MVC. It seems then so far the way i have been writting my applications is correct. I do have a few more questions that still have to do with Servlets/JSP design and functionality. I'm having a hard time finding a way to get back from the servlet to the JSP. I have a path that gets called to /results.jsp. I have a resultsServlet that has a doGet method for the JSP results in which the servlet gets and compiles all the information needed for the results i want to display. However, i cant seem to find out how to get back to the JSP code. All the doGet method should be doing is doing a datastore call and getting a bunch of information and compiling it into a Listobjects. and then my JSP function is suppose to be taking list and displaying it. I cant seem to get out of this doGet method though. When i hit link it just displays a blank page since my doGet method does no displays. I saw in other forums that they ask how many JSP files and Servlet files they have. Dont you need to have a Servlet file for every JSP file? It seems to be that GAE is working more with a Model View archicture. Lastly, in ASP.NET MVC there is a site.master page that holds the style template that all the pages will be using. Does GAE have something similar to this? Thanks. On Oct 21, 3:59 am, leszek leszek.ptokar...@gmail.com wrote: JSP is nothing more than servlet code woven with html and some tags to make generating html pages more easy. Almost everything you can do in sevlet code you can do also in JSP page. So it is a design decision what logic should be kept in JSP and what logic should tackled in a classic servlet code. I think that what you have written is very sound and follow MVC approach. JSP should be responsible only for user interface (view part) and be separated from any persistent logic, and servlet code should keep model and control part and be separated from any interface code. Servlet code should also be the only to communicate with the persistence layer. But why use pure JSP and servlet ? There are a lot of good frameworks at hand. There are successful stories with JSF 2.0 and Spring MVC running gently with Google App Engine. http://groups.google.com/group/google-appengine-java/web/will-it-play... Also GWT is running very nicely - I'm personally very fond of it. But GWT is completely different, Ajax-style, approach. --~--~-~--~~~---~--~~ 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: AccessControlException (SerializablePermission enableSubclassImplementation) - Wicket on GAE
a.maza: That's correct, I'm using HTTPSessionStore because of the filesystem writing restriction. However, I'm interested in the implementation you are trying to do, so if you decide to share it with the community when it's done, I'll be happy to give it a try ;). Moreover, we have a fileupload gae-like implementation that uses the datastore instead of the file system to store temporary recently uploaded files (shared by a developer in the wicket users list), so I'd be interested in merging our code and your code into some wicket-gae.jar extension, so everything its located at one place and can be reused by others. For the record, we haven't experienced any issues related to the back/foward button behavior (although I must tell that our app is still a small one and maybe that has something to do with it). Regards, Esteban a.maza escribió: On 21 Okt., 20:26, Esteban Masoero emaso...@getsense.com.ar wrote: Hi there: We've been running a wicket app on gae since last month, but without the need of implement memcache-based implementation of Wicket's IPageStore. Why are you doing that? (our wicket version is 1.3.7) Wicket is very powerful in maintaining application/session state. This enables for example a nice usage of back/forward buttons. In a typical scenario, this is backed by the DiskPageStore implementation. On GAE you can't use the DiskPageStore since it relies on writing to the filesystem. Thus, I assume that you use the HTTPSessionStore as proposed in some blog entries (and not the SecondLevelCacheStore). I did some research on the web and several users reported problems using the HTTPSessionStore - especially regarding the back/forward button behavior. Thus, I am currently trying to implement a Memcache- backed IPagestore for GAE. On the Wicket mailinglist I was provided with a HTTP session based implementation of IPageStore (done in the Terracotta project) to have a starting point (http://www.nabble.com/ Google-App-Engine-and-Wicket-to23001592.html) --~--~-~--~~~---~--~~ 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] using contains(Key) in JDO query
Can anyone help me to figure out how to write a query to do contains (Key) in JDO? Here is my scriplet: select from + master.class.getName() + where detailKeySet.contains(' + detail.getKey().toString() + ') where detailKeySet is a SetKey collection holding all the keys of the details for the master. I ran it in GAE and it doesn't return anything even though I do have the deailKeySet populated with detail.getKey(). Please help, thanks a lot in advance. --~--~-~--~~~---~--~~ 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: Possible to Add Child to Owned One to Many Relationship Without Loading All Children?
Thanks Nacho. I asked the same question in google appengine chat irc and got the same answer. Will have to use the allocate id feature in low level api. Len On Oct 21, 7:41 am, Nacho Coloma icol...@gmail.com wrote: Maybe what you are looking for is DatastoreService.allocateIds(). On Oct 21, 9:35 am, leszek leszek.ptokar...@gmail.com wrote: You hit the nail on the head. As far as I know there is nothing like sequence in Google App Engine. Either you need to have another entity with a counter and increase it in transactional way. Or you can use memcache. http://code.google.com/intl/pl/appengine/docs/java/javadoc/com/google... There is a method: java.lang.Long increment(java.lang.Object key, long delta) Atomically fetches, increments, and stores a given integral value. --- Pay attention to atomically. May be this can be used for generating sequential and avoid bottleneck in the case of datastore entity and additional transaction. But because of the risk of memcache expiring this method needs some more elaboration.- Hide quoted text - - Show quoted text - --~--~-~--~~~---~--~~ 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: Java vs. Python X-AppEngine-Estimated-CPM-US-Dollars
Keeping steady HTTP traffic does not work either. I have a script which 'http pings' my application every 30 seconds. Yet my app-engine instance experienced 70 spin downs yesterday alone! I am REALLY looking to this update - until then I'd highly recommend staying away from Spring! On Oct 21, 6:59 pm, Jason (Google) apija...@google.com wrote: Aside from keeping steady HTTP traffic to your site, I'm afraid not. But as I wrote in my last post, we're making updates over the next few releases to drive this startup time lower. - Jason On Tue, Oct 20, 2009 at 2:06 AM, Marcel Overdijk marceloverd...@gmail.comwrote: Is there any other way to keep an instance warm? Startup of instance just takes to much time to have an effective GAE/J application... On 19 okt, 22:58, Jason (Google) apija...@google.com wrote: To answer your question, no, having a cron job run every minute to keep an instance warm will not work. If all application instances have spun down, then a fresh HTTP request will require a new instance to be created, which will incur the startup costs. - Jason On Fri, Oct 16, 2009 at 6:45 AM, Toby tobias.ro...@sunnymail.mobi wrote: That is an interesting thread. I was asking myself the same question. My problem is, that I have some expensive initialization that is done when the webapp is initialized. I recognized that the very first request (after a longer time of idle) takes a lot of time. And as you say is expensive. I wonder if it would make sense to have a cron job that runs every minute to prevent this? On Oct 15, 10:52 pm, Timwillhack timwillh...@gmail.com wrote: I should probably point out that when I say 'Timed out' I really mean, clean start after waiting say 10 minutes to refresh a page, its not a 30 second endless while loop or anything, its actually just outputting one character from a string array. On Oct 15, 2:46 pm, Timwillhack timwillh...@gmail.com wrote: I was just curious if the initialization of the Java VM is actually charged a client? Here are some sample headers from Java vs. Python after letting the server timeout: VERY EXPENSIVE JAVA (timed out - guessing restarting VM): X-AppEngine-Estimated-CPM-US-Dollars: $0.149171 X-AppEngine-Resource-Usage: ms=4152 cpu_ms=6440 api_cpu_ms=0 X-AppEngine-Estimated-CPM-US-Dollars: $0.145377 X-AppEngine-Resource-Usage: ms=3890 cpu_ms=6276 api_cpu_ms=0 Cheap JAVA (quick refresh): X-AppEngine-Estimated-CPM-US-Dollars: $0.000168 X-AppEngine-Resource-Usage: ms=41 cpu_ms=3 api_cpu_ms=0 X-AppEngine-Estimated-CPM-US-Dollars: $0.000189 X-AppEngine-Resource-Usage: ms=19 cpu_ms=4 api_cpu_ms=0 CHEAP PYTHON FRESH START (waited about 10 mins before connecting): X-AppEngine-Estimated-CPM-US-Dollars: $0.002778 X-AppEngine-Resource-Usage: ms=103 cpu_ms=116 api_cpu_ms=0 X-AppEngine-Estimated-CPM-US-Dollars: $0.002778 X-AppEngine-Resource-Usage: ms=106 cpu_ms=116 api_cpu_ms=0 PYTHON RECONNECT QUICKLY: X-AppEngine-Estimated-CPM-US-Dollars: $0.000231 X-AppEngine-Resource-Usage: ms=7 cpu_ms=6 api_cpu_ms=0 Python is reporting very very very cheaper pricing per 1000. Is this the case or does google not really charge for the initialization for java? I sat here refreshing a page with a friend doing the same, out of the 40 or so requests about 4 were skyrocketed in price. This makes me very wary about making something that is hit excessively, since it seems like each instance is only taking 10 requests each per minute or whatver Yuck, are my numbers flawed or something? Or is Python just so much more efficient to use on app engine? --~--~-~--~~~---~--~~ 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: Discussion on will-it-play-in-app-engine
Its worth mentioning that Apache Click 2.1.0 ships with an in-memory FileItemFactory implementation for Apache FileUpload. Meaning Click's file upload component works out of the box. Click uses OGNL for certain operations which clashes with GAE security manager. The solution, as mentioned in earlier discussions, is to set the OGNL security manager to null. In Click this is done by specifying GoogleAppEngineListener in web.xml: web-app ... listener listener- classorg.apache.click.extras.gae.GoogleAppEngineListener/listener- class /listener ... /web-app Click maps request to the *.htm extension by default so *.htm resources must be excluded from being served statically by GAE. This is done by specifying the following in appengine-web.xml: appengine-web-app !-- Optionally enable HttpSession usage -- !-- sessions-enabledtrue/sessions-enabled -- !-- Exclude .htm files from being server statically by GAE. -- static-files exclude path=**.htm / /static-files /appengine-web-app On Sep 22, 9:17 pm, adrian a.adrian.t...@googlemail.com wrote: Apache Click Framework:http://incubator.apache.org/click/ Version: 2.1.0 Status: Compatible Demo application sources:http://code.google.com/p/click-jpa-demo/ Demo application live:http://click-jpa.appspot.com/ Apache Click has support for GAE/J in the package org.apache.click.extras.gae.*, see the sources:http://svn.apache.org/repos/asf/incubator/click/trunk/click/extras/sr... --~--~-~--~~~---~--~~ 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: having problems with JDO query serialization to memcache...
excellent! On Oct 21, 11:20 am, datanucleus andy_jeffer...@yahoo.com wrote: Just to mention, JDO (and DataNucleus) supports a Level2 cache, and can use javax.cache (GAE/J memcached) and is a single PMF property to turn it on. That way you don't need to play around putting objects into the L2 cache and getting them out yourself, its done for you. --~--~-~--~~~---~--~~ 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: java.lang.NoClassDefFoundError: com/google/appengine/api/datastore/CompositeIndexManager
Hi, I got the same error, can you try adding the following jars to your classpath appengine-api-stubs.jar appengine-api.jar appengine-local-runtime.jar HTH Dominik On Oct 20, 7:21 am, stanlick stanl...@gmail.com wrote: I have configured my test environment according to the notes found here. http://code.google.com/appengine/docs/java/howto/unittesting.html However, when I run my unit test, I am receiving java.lang.NoClassDefFoundError: com/google/appengine/api/datastore/ CompositeIndexManager. Is there possibly another jar I need on my path? Peace, Scott --~--~-~--~~~---~--~~ 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: LIKE query workaround for the Low Level API
Answered in this thread http://groups.google.com/group/google-appengine-java/browse_thread/thread/958851cc674d0c70/7403586fae9ffe20?lnk=gstq=startswith#7403586fae9ffe20 On Wed, Oct 21, 2009 at 6:34 PM, George Moschovitis george.moschovi...@gmail.com wrote: Hi, what is the suggested way to emulate an SQL LIKE 'prefix%' query using the low level Datastore API? thanks, George. --~--~-~--~~~---~--~~ 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: using contains(Key) in JDO query
Hi king, On Thu, Oct 22, 2009 at 6:19 AM, king kingalpha...@gmail.com wrote: Can anyone help me to figure out how to write a query to do contains (Key) in JDO? Here is my scriplet: select from + master.class.getName() + where detailKeySet.contains(' + detail.getKey().toString() + ') PersistenceManager pm = PMF.get().getPersistenceManager(); Query query = pm.newQuery(Master.class); query.setFilter(detailKeySet.contains(:key)); ListMaster list = (ListMaster) query.execute(detail.getKey()); Hope this helps, Yasuo Higa --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---