[appengine-java] Re: Crons Optimization
It may require a bit of typing (one time), but may I suggest just explicitly scheduling each of the 14 cron jobs, staggered appropriately. Use the following variety of syntax to specify the schedule: every N (hours|mins|minutes) [from (time) to (time)] (from http://code.google.com/appengine/docs/java/config/cron.html#The_Schedule_Format) E.g., ?xml version=1.0 encoding=UTF-8? cronentries cron url/foo/task1/url scheduleevery 30 minutes from 00:00 to 23:29/schedule /cron cron url/foo/task2/url scheduleevery 30 minutes from 00:02 to 23:31/schedule /cron cron url/foo/task3/url scheduleevery 30 minutes from 00:04 to 23:33/schedule /cron !-- tasks 4 thru 13 go here -- cron url/foo/task14/url scheduleevery 30 minutes from 00:28 to 23:57/schedule /cron /cronentries On Oct 12, 5:27 am, Hakim rhani2...@gmail.com wrote: Hi everybody, I've an application that runs 14 crons that have the same schedule configuration: every 30 mins synchronized I'm looking for a technique to desynchronise the execution of these crons, I don't want them to execute at the same time in order to reduce the number of instances used to serve them each 30 minutes Thanks -- 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] Is it possible to make a BATCH GET with JDO?
Hi, Did anyone know if batch gets work with JDO, I'm trying desperately to do that using the code presented here http://gae-java-persistence.blogspot.com/2009/10/executing-batch-gets.html @PersistenceCapable(identityType = IdentityType.APPLICATION) public class Book { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) @GeneratedValue(strategy=GenerationType.IDENTITY) private Key key; } public List getById(List keys) { Query q = pm.newQuery(select from + Book.class.getName() + where key == :keys); return (List) q.execute(keys); } but I still see several datastore_v3.Get in the appstats of my application I've tried also: ListKey keys = ...; 1/ Query q = pm.newQuery(Book.class,:keys.contains(key)); return (List) q.execute(keys); 2/pm.getObjectsById(keys) But none of them does a batch GET :( what I'm doing wrong? -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/ZASnFtvAo6MJ. 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.
Re: [appengine-java] Re: Facebook Login integration with java appengine
Hi Jeff. I did that but it does not work if domains are not part / related to the Site Url. I guess that I will have to register two FB apps: - Aggenda (already created) -- just for allowing users going to www.aggenda.com to login via FB - Aggenda (to be created) -- just for users that want to use the app inside FB Thanks for your help. Marco. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/fG2ZZ48q5doJ. 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] Upgraded app engine to 1.5.5 in eclipse - local datastore now empty ?!
Hi, i did some my tests with my app locally today, everything worked (had 1.5.4). Then i got notified in eclipse, that new updates were available (google eclipse plugin, app engine, gwt). Installed the updates, restarted everything, started my app again, local datastore admin shows me nothing anymore, although local_db.bin is still present with ca. 25 KBytes. Unfortunately i don't know, how big it was before. Has anybody experienced something similar? -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/3Qs5apDyEEYJ. 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: Upgraded app engine to 1.5.5 in eclipse - local datastore now empty ?!
looking into the local_db.bin reveals, the data seems to be still there, but i cannot access it through the local datastore admin and my application neither. I have not changed my app id, as has been the case in another post. -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/jaSD9gUHW-AJ. 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: Wicket NonCachingImage not showing image
Open the source URL of the image in your browser (http://.../page?8- IResourceListener-frmForm- imgImageamp;antiCache=1318502670796). Then see what your browser tells you about that resource. On Oct 13, 4:13 pm, Ian Marshall ianmarshall...@gmail.com wrote: Hello everyone, I use Apache Wicket's NonCachingImage component to show an image in a form. The image shows correctly when using the GAE/J development application server but fails to show when the code is running on GAE proper. I believe that this may be due to the image's src tag not being interpreted by GAE's cloud, whereas it is rendered properly by the dev app server. Has anyone had this happening to them? Can anyone think of a solution or suggestion? Regards, Ian HTML img wicket:id=imgImage alt=[None] width=100% height=100%/ Java code - // ImageModel extends LoadableDetachableModelItemImageResource // ItemImageResource extends DynamicImageResource ImageModel imodImage = new ImageModel(pidmModel); NonCachingImage imgImage = new NonCachingImage(imgImage, imodImage); frmForm.add(imgImage); Sample HTML output -- !-- This output shows an image with the dev app server, but [None] when served by a GAE/J production server. -- img wicket:id=imgImage alt=[None] width=100% height=100% src=page?8-IResourceListener-frmForm- imgImageamp;antiCache=1318502670796/ -- 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] Correct way to keep track of the number of Entities of one kind.
Hello, I use Java with JDO for the datastore access on google app engine. I need the number of rows for the calculation of the number of pages in a cell table. This number can be very high so I don't want to calculate it when i query the data and implemented a class which holds the number of Entities: import javax.jdo.annotations.PersistenceCapable; import javax.jdo.annotations.Persistent; import javax.jdo.annotations.PrimaryKey; @PersistenceCapable public class Aggregate { @PrimaryKey @Persistent private String name; @Persistent private int count; public Aggregate(String name) { this.name = name; this.count = 0; } public String getName() { return this.name; } public void setName(String name) { this.name = name; } public int getCount() { return this.count; } public void setCount(int count) { this.count = count; } } To update the count value I do something like that. @PersistenceCapable public class SomeEntity { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key key; .. public SomeEntity() { // increment the count PersistenceManager pm = PMF.get().getPersistenceManager(); try { Aggregate aggregate = (Aggregate) pm.getObjectById(Aggregate.class, SomeEntity.class.getSimpleName()); int count = aggregate.getCount(); count++; aggregate.setCount(count); pm.makePersistent(aggregate); } catch (JDOObjectNotFoundException jonfe) { // the first someEntity ever Aggregate aggregate = new Aggregate(Player.class.getSimpleName()); aggregate.setCount(1); pm.makePersistent(aggregate); } finally { pm.close(); } } . So far, this works, but I really don't like the way how it's done. Are there any implemented tools in google app engine to handle something like that? Or is this the correct way to keep track of the number of entities? -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/lK9o1_SMdygJ. 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] Does JDO auto remove indexes that now have unindexed properties?
Basically I have gone through my datastore persist-able classes and have annotated properties that I never need to query on like this: @Extension(vendorName=datanucleus, key=gae.unindexed, value=true) private Long random; I needed to test whether or not JDO removed the index when I changed the POJO by annotating a property as unindexed. So I created a simple test to read in an existing entity, updated it (with properties holding the exact same values as before), then finally queried on it using the now unindexed property random. I woud have expected for it to not appear again once updated (because the property is now unindexed), which would have suggested that JDO was handling the index deletion correctly, but it appears not. Are there any settings that I may need to change in order to allow JDO to delete the now un-needed single property indexes? Is there a way I can remove / vacuum these single property indexes (that I don't need anymore) myself? Thanks, Mark -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/whSOGsiNGrUJ. 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: Upgraded app engine to 1.5.5 in eclipse - local datastore now empty ?!
Yes, I saw exactly the same. I tried to post exception log on GAE group but for some reason my post didn't pass moderator. I don't have the stack trace anymore, but the issue was with incompatible serialization (InvalidCastException) when reading a local datastore. And on a second run the datastore was empty. Sounds like a breaking change to me. -- 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] GAE and Visualization API
Hi All, I'm developing an app using GAE and the google visualization api in Java. I've deployed a csv underneath war to act as a datasource. The app runs on my local development server but fails with errors like the following after uploading: ESEDataSourceServlet generateDataTable: Couldn't read from url: http://localhost:8080/gv/11032010_trends_daily_p.csv java.io.IOException: Could not fetch URL: http://localhost:8080/gv/11032010_trends_daily_p.csv at com.google.appengine.api.urlfetch.URLFetchServiceImpl.convertApplicationException(URLFetchServiceImpl.java: 115) at com.google.appengine.api.urlfetch.URLFetchServiceImpl.fetch(URLFetchServiceImpl.java: 42) at com.google.apphosting.utils.security.urlfetch.URLFetchServiceStreamHandler $Connection.fetchResponse(URLFetchServiceStreamHandler.java:418) at com.google.apphosting.utils.security.urlfetch.URLFetchServiceStreamHandler $Connection.getInputStream(URLFetchServiceStreamHandler.java:297) at java.net.URL.openStream(URL.java:1029) at ESEDataSourceServlet.generateDataTable(ESEDataSourceServlet.java: 110) at com.google.visualization.datasource.DataSourceHelper.executeDataSourceServletFlow(Unknown Source) at com.google.visualization.datasource.DataSourceServlet.doGet(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java: 511) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1166) at com.google.apphosting.utils.servlet.ParseBlobUploadFilter.doFilter(ParseBlobUploadFilter.java: 97) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java: 35) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java: 43) at org.mortbay.jetty.servlet.ServletHandler $CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java: 388) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java: 216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java: 182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java: 765) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java: 418) at com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java: 249) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java: 152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java: 542) at org.mortbay.jetty.HttpConnection $RequestHandler.headerComplete(HttpConnection.java:923) at com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java: 76) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404) at com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java: 135) at com.google.apphosting.runtime.JavaRuntime $RequestRunnable.run(JavaRuntime.java:393) at com.google.tracing.TraceContext $TraceContextRunnable.runInContext(TraceContext.java:449) at com.google.tracing.TraceContext$TraceContextRunnable $1.run(TraceContext.java:455) at com.google.tracing.TraceContext.runInContext(TraceContext.java: 695) at com.google.tracing.TraceContext $AbstractTraceContextCallback.runInInheritedContextNoUnref(TraceContext.java: 333) at com.google.tracing.TraceContext $AbstractTraceContextCallback.runInInheritedContext(TraceContext.java: 325) at com.google.tracing.TraceContext $TraceContextRunnable.run(TraceContext.java:453) at com.google.apphosting.runtime.ThreadGroupPool $PoolEntry.run(ThreadGroupPool.java:160) at java.lang.Thread.run(Thread.java:679) I'm building/accessing pages like the following: !DOCTYPE html html head titleESE Pct./title !--Load the AJAX API-- script type=text/javascript src=http://www.google.com/jsapi;/ script script type=text/javascript // Load the Visualization API and the ready-made Google table visualization. //google.load('visualization', '1', {'packages': ['table,annotatedtimeline']}); google.load(visualization, 1, {packages: ['corechart,table,annotatedtimeline']}); // Set a callback to run when the API is loaded. google.setOnLoadCallback(init); // Send the queries to the data sources. function init() { query1 = new google.visualization.Query('ese?url=http://localhost:
[appengine-java] Re: Wicket NonCachingImage not showing image
I had already tried that and got an error message which I cannot remember. Thanks for the idea, though. I have now solved my problem by using a class that descends from ByteArrayResource and which overrides getData(IResource.Attributes). I supply an instance of this class to my NonCachingImage instead of a model. On Oct 14, 5:01 pm, gk goran.kar...@googlemail.com wrote: Open the source URL of the image in your browser (http://.../page?8- IResourceListener-frmForm- imgImageamp;antiCache=1318502670796). Then see what your browser tells you about that resource. On Oct 13, 4:13 pm, Ian Marshall ianmarshall...@gmail.com wrote: Hello everyone, I use Apache Wicket's NonCachingImage component to show an image in a form. The image shows correctly when using the GAE/J development application server but fails to show when the code is running on GAE proper. I believe that this may be due to the image's src tag not being interpreted by GAE's cloud, whereas it is rendered properly by the dev app server. Has anyone had this happening to them? Can anyone think of a solution or suggestion? Regards, Ian HTML img wicket:id=imgImage alt=[None] width=100% height=100%/ Java code - // ImageModel extends LoadableDetachableModelItemImageResource // ItemImageResource extends DynamicImageResource ImageModel imodImage = new ImageModel(pidmModel); NonCachingImage imgImage = new NonCachingImage(imgImage, imodImage); frmForm.add(imgImage); Sample HTML output -- !-- This output shows an image with the dev app server, but [None] when served by a GAE/J production server. -- img wicket:id=imgImage alt=[None] width=100% height=100% src=page?8-IResourceListener-frmForm- imgImageamp;antiCache=1318502670796/ -- 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: Upgraded app engine to 1.5.5 in eclipse - local datastore now empty ?!
The discussion at http://groups.google.com/group/google-appengine-java/browse_thread/thread/b3e33070ab8c9ddb/5a85084fc1a5dd9e?lnk=gstq=Local+datastore+empty#5a85084fc1a5dd9e might be relevant. On Oct 14, 1:07 pm, Michael P mp31...@gmail.com wrote: Yes, I saw exactly the same. I tried to post exception log on GAE group but for some reason my post didn't pass moderator. I don't have the stack trace anymore, but the issue was with incompatible serialization (InvalidCastException) when reading a local datastore. And on a second run the datastore was empty. Sounds like a breaking change to me. -- 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.
Re: [appengine-java] Correct way to keep track of the number of Entities of one kind.
So I hate to make this more complicated but ... Yes, this is roughly the right approach. However, if you are creating entities at a rate higher than 1/s, this pattern will break. You'll need to use the sharded counter property: http://code.google.com/appengine/articles/sharding_counters.html The example is in Python, but hopefully you understand what's happening there. -- Ikai Lan Developer Programs Engineer, Google App Engine plus.ikailan.com | twitter.com/ikai On Fri, Oct 14, 2011 at 9:44 AM, Phil philippbsee...@googlemail.com wrote: Hello, I use Java with JDO for the datastore access on google app engine. I need the number of rows for the calculation of the number of pages in a cell table. This number can be very high so I don't want to calculate it when i query the data and implemented a class which holds the number of Entities: import javax.jdo.annotations.PersistenceCapable; import javax.jdo.annotations.Persistent; import javax.jdo.annotations.PrimaryKey; @PersistenceCapable public class Aggregate { @PrimaryKey @Persistent private String name; @Persistent private int count; public Aggregate(String name) { this.name = name; this.count = 0; } public String getName() { return this.name; } public void setName(String name) { this.name = name; } public int getCount() { return this.count; } public void setCount(int count) { this.count = count; } } To update the count value I do something like that. @PersistenceCapable public class SomeEntity { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key key; .. public SomeEntity() { // increment the count PersistenceManager pm = PMF.get().getPersistenceManager(); try { Aggregate aggregate = (Aggregate) pm.getObjectById(Aggregate.class, SomeEntity.class.getSimpleName()); int count = aggregate.getCount(); count++; aggregate.setCount(count); pm.makePersistent(aggregate); } catch (JDOObjectNotFoundException jonfe) { // the first someEntity ever Aggregate aggregate = new Aggregate(Player.class.getSimpleName()); aggregate.setCount(1); pm.makePersistent(aggregate); } finally { pm.close(); } } . So far, this works, but I really don't like the way how it's done. Are there any implemented tools in google app engine to handle something like that? Or is this the correct way to keep track of the number of entities? -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/lK9o1_SMdygJ. 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. -- 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.
Re: [appengine-java] Does JDO auto remove indexes that now have unindexed properties?
Mark, Interesting that it does this. One thing you might try: 1. Run a mapper job 2. Read all the entities using the low level API 3. Explicitly set properties using the low level API's setProperty() and setUnindexedProperty() methods 4. Save entities back to the datastore This definitely should remove the indexes. -- Ikai Lan Developer Programs Engineer, Google App Engine plus.ikailan.com | twitter.com/ikai On Thu, Oct 13, 2011 at 6:23 AM, markabrucey markabru...@gmail.com wrote: Basically I have gone through my datastore persist-able classes and have annotated properties that I never need to query on like this: @Extension(vendorName=datanucleus, key=gae.unindexed, value=true) private Long random; I needed to test whether or not JDO removed the index when I changed the POJO by annotating a property as unindexed. So I created a simple test to read in an existing entity, updated it (with properties holding the exact same values as before), then finally queried on it using the now unindexed property random. I woud have expected for it to not appear again once updated (because the property is now unindexed), which would have suggested that JDO was handling the index deletion correctly, but it appears not. Are there any settings that I may need to change in order to allow JDO to delete the now un-needed single property indexes? Is there a way I can remove / vacuum these single property indexes (that I don't need anymore) myself? Thanks, Mark -- You received this message because you are subscribed to the Google Groups Google App Engine for Java group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/whSOGsiNGrUJ. 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. -- 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] BindingProviderProperties undefined
I'm trying to set properties in my JAX-WS call but BindingProviderProperties seems to not be included in the classes that ship along with App Engine. Is this perhaps a bug? Can anyone from the App Engine team comment? Thanks -- 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.