[appengine-java] GAE/J with Flex Session
first request: login by username and pwd, and create the session _session = new FbdanciSession(); _session.setUser(user); FlexContext.getFlexSession().setAttribute("client", _session); second request: update the _session _session = FlexContext.getFlexSession().getAttribute("client"); _session.setName("I am not null"); third request: print the name _session = FlexContext.getFlexSession().getAttribute("client"); System.out.println(_session.getUser());// the reuslt is not null; System.out.println(_session.getName());// the reuslt is null; I don't know what happened , could anyone help me out; advance 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-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=.
[appengine-java] Re: XMPP getPresence response not valid?
Hi. Though it is likely already to have tried. If the state is [is not available] please invite it from GMailchat or GTalk to XMPP Addresses ([app...@appspot.com] or [anyth...@app-id.appspotchat.com],etc.) Please confirm Gtalk display that XMPP Addresses ([app...@appspot.com] or [anyth...@app-id.appspotchat.com],etc.) is online and confirm presence status on the GppEngine side. Please refer to the following links for details of XMPP Addresses. http://code.google.com/intl/us/appengine/docs/java/xmpp/overview.html Thanks. On 11月18日, 午前1:52, timzon wrote: > Is anybody having problem with xmpp.getPresence not providing valid > presence information for GTalk clients? > > Using very simple function to check the availability of a GTalk > client: > > XMPPService xmpp = XMPPServiceFactory.getXMPPService(); > if (xmpp.getPresence(agentJid).isAvailable()) { > log.info(agentJid.toString() + " is available (added to > list)");} else { > > log.info(agentJid.toString() + " is not available"); > > } > > getPresence always returns the same presence status for a user > regardless of the user real status. > > I've tried this with GTalk clients on both GMail and Apps domains. The > result is exactly the same. > > This is extremely blocking for our application as we need to validate > the presence of a group of GTalk clients to determine what to do with > a request. > > Thanks in advance for your help, > Jerome. -- 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=.
Re: [appengine-java] Re: Concurrency In Transaction
I think my try/catch is missing a catch at the end: catch (final Throwable ex) { exception = ex; break; // fail } Rusty Wright wrote: > Ah, thanks. So if I knew how many servers my cloud is made of then I > should use that number for my MAX_RETRIES. ;-) > > I'm curious about how others are handling the exceptions. The > JDOCanRetryException is subclassed by other exceptions that don't seem > like things I'd want to retry, but perhaps I don't understand the > subtleties. Here's what I'm doing; it's an AOP gizmo, courtesy of > Spring. The pjp.proceed() is where my transaction wrapped method is > called. Looks clunky to me, given that it's not readily apparent why > it's doing what it does. > >public Object retry(final ProceedingJoinPoint pjp) throws Throwable { >this.log.debug("called"); > >JDOException exception = new JDOException("oops; too many retries"); > >int retryCount = 0; > >while (retryCount++ < this.maxRetries) { >try { >return (pjp.proceed()); >} >catch (final JDOUserException ex) { >exception = ex; > >break; // fail >} >catch (final JDOCanRetryException ex) { >exception = ex; > >// retry >} >catch (final JDOException ex) { >exception = ex; > >/** > * to quote Google's documentation: If any action > * fails due to the requested entity group being in > * use by another process, JDO throws a > * JDODataStoreException or a JDOException, caused by a > * java.util.ConcurrentModificationException. > */ >if (!(ex.getCause() instanceof > ConcurrentModificationException)) >break; // fail > >// retry >} > >this.log.debug("retryCount: {}, exception: {}", >Integer.valueOf(retryCount), >ExceptionUtils.getFullStackTrace(exception)); >} > >throw (exception); >} > > > ted stockwell wrote: >> >> On Nov 17, 2:59 pm, Rusty Wright wrote: >>> Is there some way to pause before retrying the database transaction? >>> If you don't, then it seems to me that the processes that are banging >>> into each other are going to keep failing. I'd like to add a pause >>> for a random amount of time in the catch block. >>> >> >> It is not necessary to pause before retrying because if a transaction >> fails with a 'RetryException' it is only because some other >> transaction was committed and that other transaction made some changes >> that are incompatible with the failed transactions changes. >> >> So... suppose you kick off 10 transactions at once. >> At *most* only 9 of those transactions will fail with a >> RetryException. >> If you retry those 9 then at *most* 8 will fail, and so on >> >> >> -- >> >> 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=. >> >> -- 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=.
[appengine-java] Re: Configuring JSF 2.0 to run on Google App Engine
I think i had this error Take a look at this site http://javadocs.wordpress.com/2009/10/17/mojarra-jsf-2-0-rc2-and-google-app-engine-sdk-1-2-6/ and download this file http://code.google.com/p/joshjcarrier/source/browse/trunk/Sun%20JSF%20GAE/jsf-impl-gae.jar click "View raw file" to download it and rename it to jsf-impl.jar that should solve it... The problem that i got into was that i had to add private static final long serialVersionUID... cause it gave me some error msg about couldn't serialize... and later on it gave me some error with "void" (although it worked perfectly on local gae server) I left it on this point... anyway if u'll be able to create a running project using JSF + GAE , plz let me know... Daniel. On Nov 17, 9:24 am, Denden Gajudo wrote: > I'm attempting to configure JSF 2.0 to run on Google App Engine using > the following setup: > > Apache Xalan-J 2.9.0 > Google AppEngine for Java SDK v1.2.5 > Sun Java ServerFaces 2.0 FCS > Unified Expression Language 1.1 API (el-api-1.1.jar) and > Implementation (el-impl-1.1jar) > > I followed the procedure indicated > inhttp://java.wildstartech.com/Java-Platform-Enterpr...to-run-on-the-go... > > However, I am getting the following errors on startup. I was wondering > if anyone has experienced this problem. > > WARNING: Failed startup of context > com.google.apphosting.utils.jetty.devappenginewebappcont...@14b081b > {/,C:\workspace\JSFTemplate\war} > com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! > null > at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java: > 354) > at com.sun.faces.config.ConfigureListener.contextInitialized > (ConfigureListener.java:219) > at org.mortbay.jetty.handler.ContextHandler.startContext > (ContextHandler.java:530) > at org.mortbay.jetty.servlet.Context.startContext(Context.java:135) > at org.mortbay.jetty.webapp.WebAppContext.startContext > (WebAppContext.java:1218) > at org.mortbay.jetty.handler.ContextHandler.doStart > (ContextHandler.java:500) > at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java: > 448) > at org.mortbay.component.AbstractLifeCycle.start > (AbstractLifeCycle.java:40) > at org.mortbay.jetty.handler.HandlerWrapper.doStart > (HandlerWrapper.java:117) > at org.mortbay.component.AbstractLifeCycle.start > (AbstractLifeCycle.java:40) > at org.mortbay.jetty.handler.HandlerWrapper.doStart > (HandlerWrapper.java:117) > at org.mortbay.jetty.Server.doStart(Server.java:217) > at org.mortbay.component.AbstractLifeCycle.start > (AbstractLifeCycle.java:40) > at > com.google.appengine.tools.development.JettyContainerService.startContainer > (JettyContainerService.java:152) > at > com.google.appengine.tools.development.AbstractContainerService.startup > (AbstractContainerService.java:116) > at com.google.appengine.tools.development.DevAppServerImpl.start > (DevAppServerImpl.java:218) > at com.google.appengine.tools.development.DevAppServerMain > $StartAction.apply(DevAppServerMain.java:162) > at com.google.appengine.tools.util.Parser$ParseResult.applyArgs > (Parser.java:48) > at com.google.appengine.tools.development.DevAppServerMain. > (DevAppServerMain.java:113) > at com.google.appengine.tools.development.DevAppServerMain.main > (DevAppServerMain.java:89) > Caused by: java.lang.NullPointerException > at com.sun.faces.util.Util.loadClass(Util.java:200) > at com.sun.faces.config.processor.AbstractConfigProcessor.loadClass > (AbstractConfigProcessor.java:312) > at > com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processHandlerClass > (FaceletTaglibConfigProcessor.java:416) > at > com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processTags > (FaceletTaglibConfigProcessor.java:370) > at > com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processTagLibrary > (FaceletTaglibConfigProcessor.java:313) > at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.process > (FaceletTaglibConfigProcessor.java:262) > at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java: > 337) > ... 19 more > > Any assistance is much appreciated. 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-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=.
Re: [appengine-java] How to resize images with high quality?
Can you convert its format with the images service? Gif is 8 bits per pixel so if it's resizing it in that format I can understand why it would end up ugly (when it's merging pixels it's choosing the result color from the existing limited 256 color palette). If you can convert its format, try converting it to tiff (24 bits, not 8), resize it, then convert it back to gif. If you can't specify 24 bits for the tiff then it may be a waste of time because it may do it in 8 bit mode. sea wrote: > I resized images(.gif format) with App Engine for Java, > ImagesService . Make them smaller. But I found the quality of resized > image was much worse than I expected. Text on images was not clear. I > alse resized them with PhotoShop. The quality of images which resized > by PhotoShop are much better than images which resized by App Engine > for Java. It it a big problem for my. Could you help me? 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-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=. > > -- 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=.
Re: [appengine-java] Re: Concurrency In Transaction
Ah, thanks. So if I knew how many servers my cloud is made of then I should use that number for my MAX_RETRIES. ;-) I'm curious about how others are handling the exceptions. The JDOCanRetryException is subclassed by other exceptions that don't seem like things I'd want to retry, but perhaps I don't understand the subtleties. Here's what I'm doing; it's an AOP gizmo, courtesy of Spring. The pjp.proceed() is where my transaction wrapped method is called. Looks clunky to me, given that it's not readily apparent why it's doing what it does. public Object retry(final ProceedingJoinPoint pjp) throws Throwable { this.log.debug("called"); JDOException exception = new JDOException("oops; too many retries"); int retryCount = 0; while (retryCount++ < this.maxRetries) { try { return (pjp.proceed()); } catch (final JDOUserException ex) { exception = ex; break; // fail } catch (final JDOCanRetryException ex) { exception = ex; // retry } catch (final JDOException ex) { exception = ex; /** * to quote Google's documentation: If any action * fails due to the requested entity group being in * use by another process, JDO throws a * JDODataStoreException or a JDOException, caused by a * java.util.ConcurrentModificationException. */ if (!(ex.getCause() instanceof ConcurrentModificationException)) break; // fail // retry } this.log.debug("retryCount: {}, exception: {}", Integer.valueOf(retryCount), ExceptionUtils.getFullStackTrace(exception)); } throw (exception); } ted stockwell wrote: > > On Nov 17, 2:59 pm, Rusty Wright wrote: >> Is there some way to pause before retrying the database transaction? If you >> don't, then it seems to me that the processes that are banging into each >> other are going to keep failing. I'd like to add a pause for a random >> amount of time in the catch block. >> > > It is not necessary to pause before retrying because if a transaction > fails with a 'RetryException' it is only because some other > transaction was committed and that other transaction made some changes > that are incompatible with the failed transactions changes. > > So... suppose you kick off 10 transactions at once. > At *most* only 9 of those transactions will fail with a > RetryException. > If you retry those 9 then at *most* 8 will fail, and so on > > > -- > > 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=. > > -- 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=.
Re: [appengine-java] Re: case sensitivity
Hi. I agree with Kris in that this feature is absolutely necessary. However, maybe this feature will be included in this other more general issue http://code.google.com/p/googleappengine/issues/detail?id=217 . Maybe someone from Google can tell us what's the best way to do it, or whether we can expect it soon by being included in some other issue. Regards, Esteban On Tue, Nov 17, 2009 at 5:19 PM, Rusty Wright wrote: > Resistance is futile. > > Kris wrote: > > Thanks Rusty, I've already searched there and have seen the > > suggestions. I have been having a hard time believing that there is no > > way to do this when using google app engine but am more or less > > convinced at this point. > > > > > > On Nov 16, 6:06 pm, Rusty Wright wrote: > >> http://groups.google.com/group/google-appengine-java/search?group=goo. > .. > >> > >> > >> > >> Kris wrote: > >>> I'm more concerned about the proper way to do this generically. I > >>> can't realistically store duplicates of every string based field that > >>> I may want to search for. > >>> On Nov 16, 11:36 am, Rusty Wright wrote: > The recommended approach is to store the userName in all lower case, > as an additional field/column, and then do the toLowerCase on the incoming > parameter user name when you do the query and use that field/column that was > stored in lower case. > Kris wrote: > > Is there any way to perform a JDO query on google app engine using a > > case insensitive string comparison? e.g. > > For example, > >Query query = pm.newQuery(User.class, > "userName.toLowerCase() == > > user && password == pass"); > >query.declareParameters("String user, String pass"); > >query.setUnique(true); > >User user = (User) query.execute(userName.toLowerCase(), > password); > > Of course GAE does not support the usage of toLowerCase() in the > > filter string. > > There's probably a terribly simple way to do this that I'm just not > > aware of. > > -- > > 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 athttp:// > groups.google.com/group/google-appengine-java?hl=. > >>> -- > >>> 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 athttp:// > groups.google.com/group/google-appengine-java?hl=. > > > > -- > > > > 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=. > > > > > > -- > > 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=. > > > -- 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=.
[appengine-java] How to resize images with high quality?
I resized images(.gif format) with App Engine for Java, ImagesService . Make them smaller. But I found the quality of resized image was much worse than I expected. Text on images was not clear. I alse resized them with PhotoShop. The quality of images which resized by PhotoShop are much better than images which resized by App Engine for Java. It it a big problem for my. Could you help me? 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-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=.
[appengine-java] Re: Concurrency In Transaction
On Nov 17, 2:59 pm, Rusty Wright wrote: > Is there some way to pause before retrying the database transaction? If you > don't, then it seems to me that the processes that are banging into each > other are going to keep failing. I'd like to add a pause for a random amount > of time in the catch block. > It is not necessary to pause before retrying because if a transaction fails with a 'RetryException' it is only because some other transaction was committed and that other transaction made some changes that are incompatible with the failed transactions changes. So... suppose you kick off 10 transactions at once. At *most* only 9 of those transactions will fail with a RetryException. If you retry those 9 then at *most* 8 will fail, and so on -- 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=.
[appengine-java] Re: Is AppEngine down? My site is super-slow, static resources not loading
I have more information on this now. If I navigate to the active version from the App Engine control panel, it loads up super fast and works great. But the domain support from Google Apps is not working. I will file a ticket with them instead of treating this like a GAE issue. - Jim -- 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=.
Re: [appengine-java] Re: Concurrency In Transaction
Is there some way to pause before retrying the database transaction? If you don't, then it seems to me that the processes that are banging into each other are going to keep failing. I'd like to add a pause for a random amount of time in the catch block. leszek wrote: > http://code.google.com/intl/pl/appengine/docs/java/datastore/transactions.html > > Look at the next code snippet > > === >for (int i = 0; i < NUM_RETRIES; i++) { > pm.currentTransaction().begin(); > > ClubMembers members = pm.getObjectById(ClubMembers.class, > "k12345"); > members.incrementCounterBy(1); > > try { > pm.currentTransaction().commit(); > break; > > } catch (JDOCanRetryException ex) { > if (i == (NUM_RETRIES - 1)) { > throw ex; > } > } > } > > > In Google App Engine "optimistic" transaction model is applied. There > is no any "global block", every request starts transaction but only > one is allowed to run through it, the second and next get and > exception and should run some logic to handle this exception. Here it > tries to rerun the transaction (hoping that the first already has > finished it) You can also return error message to the client and > enable switch "try again" or any other rescue plan. > --~--~-~--~~~---~--~~ > 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 > -~--~~~~--~~--~--~--- > -- 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=.
[appengine-java] Re: Is AppEngine down? My site is super-slow, static resources not loading
Tried it again, two different requests to www.jmccabe.com timed out. -- 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=.
[appengine-java] Looking for Bulk Loader beta testers
Hi App Engine developers, We're working on some improvements and additions to the bulk loader to make it easier to move data between the App Engine Datastore and other data files you may have. If you're doing this right now, we're looking for some beta testers. Two specific issues we're addressing at this time are: * More language-neutral: Java developers, this will help you! * More format-neutral: If you use some format other than CSV, this will help you! If you're interested, fill out the form at https://spreadsheets.google.com/viewform?formkey=dC15V2hwczhpZ1VVWFhPZGhXR1dydUE6MQ to get started. --Matthew -- 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=.
Re: [appengine-java] Relationship Problems...
You could have a class UserProject class UserProject { private Key userKey; private Key projectKey; } Then make User.projects a List and fill it with their projects right after you fetch the User (and coat it with Collections.unmodifiableList() as a reminder that it should be read only). And make User.projects transient and not persistent. I don't know if that's a recommended approach. bvkimball wrote: > I have read a lot of posts with people having trouble with accessing > the child objects of their parent but i haven't found a solution to my > problem. So i want to have Shared objects per Users. Such as: > > public class User { > private Key key; > private String name; > private String email; > private List projects; > } > > public class Project { > private Key key; > private String description > } > > how would i query for all project a user has, remembering that two > users can own the same project. Is there an equivilent to the "IN" > statement in sql where i can just query "select from " + Project.class > + " where key in (keyParam)", then define keyParam as a List or > something. > > Anyways, i can't figure out how do this, and any help would be greatly > appreciated. > > -- > > 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=. > > -- 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=.
Re: [appengine-java] Re: case sensitivity
Resistance is futile. Kris wrote: > Thanks Rusty, I've already searched there and have seen the > suggestions. I have been having a hard time believing that there is no > way to do this when using google app engine but am more or less > convinced at this point. > > > On Nov 16, 6:06 pm, Rusty Wright wrote: >> http://groups.google.com/group/google-appengine-java/search?group=goo... >> >> >> >> Kris wrote: >>> I'm more concerned about the proper way to do this generically. I >>> can't realistically store duplicates of every string based field that >>> I may want to search for. >>> On Nov 16, 11:36 am, Rusty Wright wrote: The recommended approach is to store the userName in all lower case, as an additional field/column, and then do the toLowerCase on the incoming parameter user name when you do the query and use that field/column that was stored in lower case. Kris wrote: > Is there any way to perform a JDO query on google app engine using a > case insensitive string comparison? e.g. > For example, >Query query = pm.newQuery(User.class, "userName.toLowerCase() > == > user && password == pass"); >query.declareParameters("String user, String pass"); >query.setUnique(true); >User user = (User) query.execute(userName.toLowerCase(), > password); > Of course GAE does not support the usage of toLowerCase() in the > filter string. > There's probably a terribly simple way to do this that I'm just not > aware of. > -- > 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 > athttp://groups.google.com/group/google-appengine-java?hl=. >>> -- >>> 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 >>> athttp://groups.google.com/group/google-appengine-java?hl=. > > -- > > 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=. > > -- 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=.
[appengine-java] Re: Is AppEngine down? My site is super-slow, static resources not loading
Strange, now it's all good. But for a good 5-10 minutes, the site was unusable. Not just for me in Seattle either - my sister in New York had the same problem. -- 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=.
[appengine-java] Is AppEngine down? My site is super-slow, static resources not loading
My site was fine yesterday, but right now it's really slow and static resources like CSS files and images are not loading. Is anyone else experiencing this? My site is www.jmccabe.com/jim/ - Jim -- 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=.
Re: [appengine-java] Embedded objects come back null in unit tests
Nick, What's likely happening here is that the fields you need are being lazily loaded. Properties that aren't indexed like Text or Blobs are retrieved when you call the appropriate getter. For instance, if I have a model Car with a Text Description field, I would have to do this: // How to get a null Description PersistenceManager pm = PMF.get().getPersistenceManager(); Car car = pm.getObjectById(Car.class, someId); pm.close(); car.getDescription(); // This is NULL // How to get a description PersistenceManager pm = PMF.get().getPersistenceManager(); Car car = pm.getObjectById(Car.class, someId); car.getDescription(); pm.close(); car.getDescription(); // This is not NULL Can you try retrieving the embedded class before checking for a value? Your debugger will list it as NULL, but if you have a debugger that has "evaluate in context" capability, you can call the getter and check the object again. The field will appear populated. We did this originally to follow the JDO spec, however, we've received feedback that it's confusing to the majority of our developers, so we'll be changing this behavior to load all fields eagerly. We'll document this so that JDO veterans will be aware of this behavior. On Sun, Nov 15, 2009 at 8:32 PM, Nick Bonatsakis wrote: > Hi All, > > I have followed the instructions on how to create the appropriate > classes for JUnit testing and have a fairly simple object hierarchy. I > have one class that includes a few embedded objects, they are all > correctly annotated with JDO annotations (i have compared them > directly to the example jdo classes that ship with GAE). I create an > instance of the parent object, set all the fields including the > embedded ones, then used the PersistenceManager to make the instance > persisted. When i query for all instances of the class, I get back the > right number of instances, the non-embedded fields are there, but all > of the embedded fields have null values. > > I also tried writing a simple test using the AddressBookEntry class, > and see the same behavior when looking in the debugger, that code is > as follows: > > @Test >public void testAddy(){ > >AddressBookUtils.insertNew > ("John","Doe","Hart","CT","8448445"); > >PersistenceManager pm = PMF.get().getPersistenceManager(); >Query q = pm.newQuery(AddressBookEntry.class); >List l = (List) q.execute(); > } > > Anyone have any pointers on how to resolve this? > > 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-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=. > > > -- Ikai Lan Developer Programs Engineer, Google 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-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=.
[appengine-java] Exception When Uploading Application To AppEngine
I am beginning to see this problem when uploading my application to the AppEngine. Here is the stack trace: com.google.appengine.tools.admin.AdminException: Unable to update app: Error writing to server at com.google.appengine.tools.admin.AppAdminImpl.update (AppAdminImpl.java:62) at com.google.appengine.eclipse.core.proxy.AppEngineBridgeImpl.deploy (AppEngineBridgeImpl.java:271) at com.google.appengine.eclipse.core.deploy.DeployProjectJob.runInWorkspace (DeployProjectJob.java:148) at org.eclipse.core.internal.resources.InternalWorkspaceJob.run (InternalWorkspaceJob.java:38) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) Caused by: java.io.IOException: Error writing to server at sun.reflect.GeneratedConstructorAccessor169.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at sun.net.www.protocol.http.HttpURLConnection.getChainedException (Unknown Source) at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source) at java.net.HttpURLConnection.getResponseCode(Unknown Source) at com.google.appengine.tools.admin.ServerConnection.send (ServerConnection.java:129) at com.google.appengine.tools.admin.ServerConnection.post (ServerConnection.java:95) at com.google.appengine.tools.admin.AppVersionUpload.send (AppVersionUpload.java:432) at com.google.appengine.tools.admin.AppVersionUpload.uploadFile (AppVersionUpload.java:335) at com.google.appengine.tools.admin.AppVersionUpload.doUpload (AppVersionUpload.java:105) at com.google.appengine.tools.admin.AppAdminImpl.update (AppAdminImpl.java:56) ... 4 more I don't know what the cause of this may be, I am seeing it with two of our apps that we created. We have been able to upload in the past every time without any problems, and since we started seeing this error, we have not been able to upload. I have even tried deleting the entire src folder and deploying, no luck. Creating a simple test application through Eclipse works just fine. We have tried uploading with both the appCfg tool and Eclipse, same error. We have experienced this with AppEngine 1.2.2 and 1.2.6. These are the steps that happen every time: After successful compilation of GWT... Compilation succeeded -- 14.631s Creating staging directory Scanning for jsp files. Scanning files on local disk. Scanned 250 files. Scanned 500 files. Scanned 750 files. Scanned 1000 files. Initiating update. Cloning 284 static files. Cloned 100 files. Cloned 200 files. Cloning 747 application files. Cloned 100 files. Cloned 200 files. Cloned 300 files. Cloned 400 files. Cloned 500 files. Cloned 600 files. Cloned 700 files. Uploading 43 files. Rolling back the update. java.io.IOException: Error writing to server Has anybody seen anything similar? Please help -- 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=.
[appengine-java] Configuring JSF 2.0 to run on Google App Engine
I'm attempting to configure JSF 2.0 to run on Google App Engine using the following setup: Apache Xalan-J 2.9.0 Google AppEngine for Java SDK v1.2.5 Sun Java ServerFaces 2.0 FCS Unified Expression Language 1.1 API (el-api-1.1.jar) and Implementation (el-impl-1.1jar) I followed the procedure indicated in http://java.wildstartech.com/Java-Platform-Enterpr...to-run-on-the-google-appengine However, I am getting the following errors on startup. I was wondering if anyone has experienced this problem. WARNING: Failed startup of context com.google.apphosting.utils.jetty.devappenginewebappcont...@14b081b {/,C:\workspace\JSFTemplate\war} com.sun.faces.config.ConfigurationException: CONFIGURATION FAILED! null at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java: 354) at com.sun.faces.config.ConfigureListener.contextInitialized (ConfigureListener.java:219) at org.mortbay.jetty.handler.ContextHandler.startContext (ContextHandler.java:530) at org.mortbay.jetty.servlet.Context.startContext(Context.java:135) at org.mortbay.jetty.webapp.WebAppContext.startContext (WebAppContext.java:1218) at org.mortbay.jetty.handler.ContextHandler.doStart (ContextHandler.java:500) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java: 448) at org.mortbay.component.AbstractLifeCycle.start (AbstractLifeCycle.java:40) at org.mortbay.jetty.handler.HandlerWrapper.doStart (HandlerWrapper.java:117) at org.mortbay.component.AbstractLifeCycle.start (AbstractLifeCycle.java:40) at org.mortbay.jetty.handler.HandlerWrapper.doStart (HandlerWrapper.java:117) at org.mortbay.jetty.Server.doStart(Server.java:217) at org.mortbay.component.AbstractLifeCycle.start (AbstractLifeCycle.java:40) at com.google.appengine.tools.development.JettyContainerService.startContainer (JettyContainerService.java:152) at com.google.appengine.tools.development.AbstractContainerService.startup (AbstractContainerService.java:116) at com.google.appengine.tools.development.DevAppServerImpl.start (DevAppServerImpl.java:218) at com.google.appengine.tools.development.DevAppServerMain $StartAction.apply(DevAppServerMain.java:162) at com.google.appengine.tools.util.Parser$ParseResult.applyArgs (Parser.java:48) at com.google.appengine.tools.development.DevAppServerMain. (DevAppServerMain.java:113) at com.google.appengine.tools.development.DevAppServerMain.main (DevAppServerMain.java:89) Caused by: java.lang.NullPointerException at com.sun.faces.util.Util.loadClass(Util.java:200) at com.sun.faces.config.processor.AbstractConfigProcessor.loadClass (AbstractConfigProcessor.java:312) at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processHandlerClass (FaceletTaglibConfigProcessor.java:416) at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processTags (FaceletTaglibConfigProcessor.java:370) at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processTagLibrary (FaceletTaglibConfigProcessor.java:313) at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.process (FaceletTaglibConfigProcessor.java:262) at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java: 337) ... 19 more Any assistance is much appreciated. 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-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=.
[appengine-java] XMPP getPresence response not valid?
Is anybody having problem with xmpp.getPresence not providing valid presence information for GTalk clients? Using very simple function to check the availability of a GTalk client: XMPPService xmpp = XMPPServiceFactory.getXMPPService(); if (xmpp.getPresence(agentJid).isAvailable()) { log.info(agentJid.toString() + " is available (added to list)"); } else { log.info(agentJid.toString() + " is not available"); } getPresence always returns the same presence status for a user regardless of the user real status. I've tried this with GTalk clients on both GMail and Apps domains. The result is exactly the same. This is extremely blocking for our application as we need to validate the presence of a group of GTalk clients to determine what to do with a request. Thanks in advance for your help, Jerome. -- 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=.
[appengine-java] Re: the question in ubuntu9.10 and eclipse 3.5
I install eclipse 3.5.1 from aptitude repository and have install AppEngine. But I see error (opened bug on http://code.google.com/p/google-web-toolkit/issues/detail?id=4240). I also search libstrc but found this only: sudo aptitude search libstdc v libstdc++- dev - i libstdc+ +6 - The GNU Standard C++ Library v3 p libstdc++6-4.1- dbg - The GNU Standard C++ Library v3 (debugging files) p libstdc++6-4.1- dev - The GNU Standard C++ Library v3 (development files) p libstdc++6-4.1- doc - The GNU Standard C++ Library v3 (documentation files) p libstdc++6-4.1- pic - The GNU Standard C++ Library v3 (shared library subset kit) p libstdc++6-4.2- dbg - The GNU Standard C++ Library v3 (debugging files) p libstdc++6-4.2- dev - The GNU Standard C++ Library v3 (development files) p libstdc++6-4.2- doc - The GNU Standard C++ Library v3 (documentation files) p libstdc++6-4.2- pic - The GNU Standard C++ Library v3 (shared library subset kit) p libstdc++6-4.3- dbg - The GNU Standard C++ Library v3 (debugging files) p libstdc++6-4.3- dev - The GNU Standard C++ Library v3 (development files) p libstdc++6-4.3- doc - The GNU Standard C++ Library v3 (documentation files) p libstdc++6-4.3- pic - The GNU Standard C++ Library v3 (shared library subset kit) p libstdc++6-4.4- dbg - The GNU Standard C++ Library v3 (debugging files) p libstdc++6-4.4- dev - The GNU Standard C++ Library v3 (development files) p libstdc++6-4.4- doc - The GNU Standard C++ Library v3 (documentation files) p libstdc++6-4.4- pic - The GNU Standard C++ Library v3 (shared library subset kit) and not present version 5. On 9 ноя, 15:51, Iqbal Yusuf Dipu wrote: > @Roy thanks. After I installed libstdc++.so.5 GWT is running fine. > > Iqbal > > On Nov 8, 11:33 pm, Roy Smith wrote: > > > The clue is "libstdc++.so.5: cannot open shared object file: No such file or > > directory" > > > Try googling this along with "apt-get". > > > 9.10 switched from stdc5 to stdc6, so you need to install the legacy stdc5 > > package. It's a common "problem" with 9.10 and nothing to do with Eclipse or > > GAE > > > On Mon, Nov 9, 2009 at 5:08 AM, Iqbal Yusuf Dipu > > wrote: > > > > I'm a total newbi as far as Ubuntu/Linux is concern. I'm using Ubuntu > > > 9.10, Eclipse 3.5 and having the problem as mentioned above even > > > though I've set my environment as > > > > export GDK_NATIVE_WINDOWS=1 > > > > ** Unable to load Mozilla for hosted mode ** > > > java.lang.UnsatisfiedLinkError: /home/iyusuf/bin/packages/eclipse3.5/ > > > plugins/com.google.gwt.eclipse.sdkbundle.linux_1.7.1.v200909221731/gwt- > > > linux-1.7.1/mozilla-1.7.12/libxpcom.so: libstdc++.so.5: cannot open > > > shared object file: No such file or directory > > > at java.lang.ClassLoader$NativeLibrary.load(Native Method) > > > at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1778) > > > at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1674) > > > at java.lang.Runtime.load0(Runtime.java:770) > > > at java.lang.System.load(System.java:1003) > > > at com.google.gwt.dev.shell.moz.MozillaInstall.load > > > (MozillaInstall.java:190) > > > at com.google.gwt.dev.BootStrapPlatform.initHostedMode > > > (BootStrapPlatform.java:53) > > > at > > > com.google.gwt.dev.HostedModeBase.(HostedModeBase.java:362) > > > at > > > com.google.gwt.dev.SwtHostedModeBase.(SwtHostedModeBase.java: > > > 127) > > > at com.google.gwt.dev.HostedMode.(HostedMode.java:271) > > > at com.google.gwt.dev.HostedMode.main(HostedMode.java:230) -- 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=.
[appengine-java] Relationship Problems...
I have read a lot of posts with people having trouble with accessing the child objects of their parent but i haven't found a solution to my problem. So i want to have Shared objects per Users. Such as: public class User { private Key key; private String name; private String email; private List projects; } public class Project { private Key key; private String description } how would i query for all project a user has, remembering that two users can own the same project. Is there an equivilent to the "IN" statement in sql where i can just query "select from " + Project.class + " where key in (keyParam)", then define keyParam as a List or something. Anyways, i can't figure out how do this, and any help would be greatly appreciated. -- 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=.
Re: [appengine-java] Discussion on will-it-play-in-app-engine
On Tue, Nov 17, 2009 at 7:02 AM, Dan Dubois wrote: > I have been trying to use Batik SVG Toolkit (http:// > xmlgraphics.apache.org/batik/) to generate images on GAE with no luck. > I get a ClassNotFoundError on org/w3c/dom/svg/SVGDocument. Perhaps you need the Java binding for SVG from http://www.w3.org/TR/SVG/java.html ? > I have > included ALL the Batik jars in my application but can't seem to locate > which jar this class should be in. Your help would be greatly > appreciated. It would be great to add > > Batik > Status: COMPATIBLE > > to the list. Although it seems this project hasn't released anything > in over 1.5 years. > > Best wishes, > Dan > > -- > > 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=. > > > -- 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=.
Re: [appengine-java] Re: How to speed up JSP compile time?
On Sat, Nov 14, 2009 at 1:01 PM, Steph wrote: > This happens: > - running dev_appserver > - with JSP files of just any size. > - seems to be blocking on initializing the datastore > Can you elaborate on this part a bit more? What are you seeing that makes you think it's "initializing the datastore"? Are you restarting the entire dev_appserver after modifying the jsp? How large is your datastore (e.g. how many entities, how many properties per entity, average size of each property). If you can file an issue with a very simple webapp that reproduces the problem, that would be the best way for us to track the problem down. Alternatively, you could hook a profiler up to the dev_appserver yourself (for example, visualvm, hprof, or jprofiler). With three minutes of execution time, there should be a pretty obvious hotspot. > > I tried to set --jvm_flag=-Xmx1G in my dev_appserver.cmd file but it > does not seem to help much (i don't use eclipse) > Another other advice? > > > On Nov 13, 12:00 pm, Toby Reyelts wrote: > > Wow, that sounds bad. You're saying that this happens while running the > > dev_appserver (not appcfg), and you're only modifying one JSP file? Is > that > > JSP file huge? Try raising the heap size of your JVM. For example, if > you're > > using Eclipse, set -Xmx1G in the JVM arguments for your launch config. If > > you're running the dev_appserver from the command line, use > > --jvm_flag=-Xmx1G.On Fri, Nov 13, 2009 at 12:51 PM, Steph < > steph@gmail.com> wrote: > > > When modifying a JSP in the war directory, it can take up to 3 minutes > > > for the JSP to recompile and the page to render (I am on a brand new > > > dual-core CPU 2.66 Ghz). > > > > > Is there a way that the JSP compile time can be speed up? This > > > slowness makes development almost unbearable. Thanks for your help. > > > > > -- > > > > > 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 unsubscr...@googlegroups.com> > > > . > > > For more options, visit this group at > > >http://groups.google.com/group/google-appengine-java?hl=. > > -- > > 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=. > > > -- 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=.
[appengine-java] Re: Task queue concurrency
As a follow up on this -- task queue throttles at queries per second, not dequeues per second. The current limit is 20 qps. You can't fool it by using long running request handlers. I tried it in production. Still looking for ways to get more than 20 qps for background jobs. Has anyone successfully done this? I would consider using an external box to generate inbound traffic if that's the only way, although I'm reluctant to do that. -- James On Oct 28, 12:00 pm, James Cooper wrote: > aha! I missed that. I wonder if "task invocations/second" means > "dequeues/second". > > If it means dequeues/second then in theory you could write a request > handler that burns through a queue of work items in the datastore, re- > queueing itself and exiting after 25 seconds and achieve 250 CPU > seconds/second of concurrency. > > Is that crazy talk? > > I hope these limits go up when Tasks Queues exits beta. Google is > selling us computer time but is setting some fairly low limits on what > we're allowed to buy. 10 cores of 1.2ghz CPU time is roughly > equivalent to a modern 4 core desktop machine right? > > -- James > > On Oct 28, 12:27 pm, Scott Hernandez wrote: > > > The docs here seem to indicate that dequeuing happens at 5/sec > > (default and 10 > > max).http://code.google.com/appengine/docs/java/taskqueue/overview.html > > > On Oct 27, 8:41 am, James Cooper wrote: > > > > Hi there, > > > > Last night I experimented with task queues to see what level of > > > concurrency I could achieve when running on the live environment. > > > > Summary of the test app: > > > - Bulk load 30,000 entities of a given type (3 properties / entity > > > object). > > > - Command line job I ran from my PC that hit an URL to queue the > > > entries > > > - This program was multi-threaded so I could simulate a bit of > > > load (10 concurrent threads) > > > - Queueing URL created a task queue entry within the same app > > > - 2nd URL handled the task queue request and stored entity to the > > > Datastore > > > > I watched the task queue dashboard for a few minutes and observed a > > > few things: > > > - Enqueue rate quickly outpaced dequeue rate > > > - I was enqueing at about 12 requests / second, but dequeuing at > > > 4 requests / second > > > - GAE did not appear to increase the dequeue rate over time in > > > response to my queue depth > > > > Result: It took a very long time to dequeue 30,000 tasks (over 2 > > > hours). It seemed that GAE was running one instance of my app. > > > > Expected: Much higher throughput. > > > > Is this expected behavior? It seems that given the 30 second request > > > limit that task queues are an important way to increase throughput > > > (alaMapReduce). But the "swarm" of app instances never seemed to > > > arrive. > > > > thanks > > > > -- James -- 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=.
[appengine-java] Re: case sensitivity
Thanks Rusty, I've already searched there and have seen the suggestions. I have been having a hard time believing that there is no way to do this when using google app engine but am more or less convinced at this point. On Nov 16, 6:06 pm, Rusty Wright wrote: > http://groups.google.com/group/google-appengine-java/search?group=goo... > > > > Kris wrote: > > I'm more concerned about the proper way to do this generically. I > > can't realistically store duplicates of every string based field that > > I may want to search for. > > > On Nov 16, 11:36 am, Rusty Wright wrote: > >> The recommended approach is to store the userName in all lower case, as an > >> additional field/column, and then do the toLowerCase on the incoming > >> parameter user name when you do the query and use that field/column that > >> was stored in lower case. > > >> Kris wrote: > >>> Is there any way to perform a JDO query on google app engine using a > >>> case insensitive string comparison? e.g. > >>> For example, > >>> Query query = pm.newQuery(User.class, "userName.toLowerCase() > >>> == > >>> user && password == pass"); > >>> query.declareParameters("String user, String pass"); > >>> query.setUnique(true); > >>> User user = (User) query.execute(userName.toLowerCase(), > >>> password); > >>> Of course GAE does not support the usage of toLowerCase() in the > >>> filter string. > >>> There's probably a terribly simple way to do this that I'm just not > >>> aware of. > >>> -- > >>> 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 > >>> athttp://groups.google.com/group/google-appengine-java?hl=. > > > -- > > > 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 > > athttp://groups.google.com/group/google-appengine-java?hl=. -- 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=.
[appengine-java] Re: Querying sub objects with JDOQL in GAE/J
It is not supported in Google App Engine JPA/JDO http://code.google.com/intl/pl/appengine/docs/java/datastore/usingjdo.html#Unsupported_Features_of_JDO "Join" queries. You cannot use a field of a child entity in a filter when performing a query on the parent kind. Note that you can test the parent's relationship field directly in query using a key. --- The only way is to "denormalization". Simple duplicate fields in Employ and ContactInfo you want to query on. -- 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=.
[appengine-java] Re: Datastore: is numeric ID unique for all entities of one type?
Try new KeyFactory.Builder(parentKind, id).addChild(childKind, id).getKey (); On Nov 16, 4:46 am, elvin wrote: > Good day. > > As far as documentation states, "The key value includes the key of the > entity group parent (if any) and either the app-assigned string ID or > the system-generated numeric ID. To create the object with an app- > assigned string ID, you create the Key value with the ID and set the > field to the value. To create the object with a system-assigned > numeric ID, you leave the key field null." > > Is this the id that can be accessed via Key#getId() call? I assume it > is. > > My main question is: is this numeric ID guaranteed to be unique for > all entities of the same type? > > If yes, how do you retrieve the entity using this id? I tried using > PersistenceManager#getObjectById(), but it does not find my entity. I > guess this is related to the fact that my entity is child in an entity > group, thus its keys' string representation would not be "MyClass > (10)" (which is created when I use KeyFactory to create key from an > entity type and a numeric ID) but "MyParent(20)/MyClass(10)". > > Thanks in advance, > Evgeny. -- 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=.
[appengine-java] Duplicate incoming emails?
Hi all, I'm observing a situation where my email webhook (/_ah/mail/*) is being invoked multiple times (seemingly randomly) for a given email. Not sure the pattern, but I'm definitely seeing log messages with the same email content multiple times, in no particular order or pattern. I'm not sure if a red herring, but it does appear to be somewhat related to the fact that I am deploying new versions and restarting the app constantly, as I tweak my code which handles the inbound email. Has anyone observed this behaviour? Can someone in Google help diagnose why my email webhook is being called repeatedly? Any help is appreciated. thanks, dave -- 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=.
[appengine-java] Discussion on will-it-play-in-app-engine
I have been trying to use Batik SVG Toolkit (http:// xmlgraphics.apache.org/batik/) to generate images on GAE with no luck. I get a ClassNotFoundError on org/w3c/dom/svg/SVGDocument. I have included ALL the Batik jars in my application but can't seem to locate which jar this class should be in. Your help would be greatly appreciated. It would be great to add Batik Status: COMPATIBLE to the list. Although it seems this project hasn't released anything in over 1.5 years. Best wishes, Dan -- 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=.
[appengine-java] Re: Datastore: is numeric ID unique for all entities of one type?
As for your main question, I assume from the API :: Key = A datastore GUID. A Key instance uniquely identifies an entity across all apps, and includes all information necessary to fetch the entity from the datastore with DatastoreService.get(Key). you can get an entity by key: Entity get(Key key) Retrieves the Entity with the specified Key. which is convertable to String using the KeyFactory's keyToString(Key key) function or convertable to long using the Key getId() func On Nov 16, 4:46 am, elvin wrote: > Good day. > > As far as documentation states, "The key value includes the key of the > entity group parent (if any) and either the app-assigned string ID or > the system-generated numeric ID. To create the object with an app- > assigned string ID, you create the Key value with the ID and set the > field to the value. To create the object with a system-assigned > numeric ID, you leave the key field null." > > Is this the id that can be accessed via Key#getId() call? I assume it > is. > > My main question is: is this numeric ID guaranteed to be unique for > all entities of the same type? > > If yes, how do you retrieve the entity using this id? I tried using > PersistenceManager#getObjectById(), but it does not find my entity. I > guess this is related to the fact that my entity is child in an entity > group, thus its keys' string representation would not be "MyClass > (10)" (which is created when I use KeyFactory to create key from an > entity type and a numeric ID) but "MyParent(20)/MyClass(10)". > > Thanks in advance, > Evgeny. -- 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=.