[appengine-java] Re: Can't decide: JDO, Twig-Persist or Objectify?
Hi I like Slim3. http://sites.google.com/site/slim3appengine/ -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Simulate concurrent access to memcache
And the test code is like this: @Test public void memcacheConcurrentAccess() throws InterruptedException { Runnable runner = new Runnable() { @Override public void run() { // TODO Auto-generated method stub MemcacheService service = MemcacheServiceFactory.getMemcacheService(); service.increment("test-key", 1L, 1L); try { Thread.sleep(200L); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } service.increment("test-key", 1L, 1L); } }; Thread t1 = new Thread(runner); Thread t2 = new Thread(runner); t1.start(); t2.start(); while (t1.isAlive()) { Thread.sleep(100L); } } On Apr 24, 3:59 pm, Phuong Nguyen wrote: > Here is one kind of exception that I got: > Caused by: com.google.apphosting.api.ApiProxy$CallNotFoundException: > The API package 'memcache' or call 'Increment()' was not found. > at com.google.apphosting.api.ApiProxy.makeSyncCall(ApiProxy.java:95) > at com.google.apphosting.api.ApiProxy.makeSyncCall(ApiProxy.java:48) > at > com.google.appengine.api.memcache.MemcacheServiceImpl.increment(MemcacheServiceImpl.java: > 623) > > Other exceptions are almost similar (ApiProxy$CallNotFoundException, > with different command - 'Set()', for example). > > On Apr 24, 3:31 pm, Phuong Nguyen wrote: > > > > > Hi, > > Is there any way to simulating concurrent access to memcache during > > unit testing? > > I'm trying to write a wrapper to try to synchronize access to > > memcache. However, my test fail miserably because when ever I create a > > thread, then inside this thread, almost any interaction with Memcache > > API would result in an exception. (I guess it due to GAE constraint > > that threads won't be manually created???) > > > I'm using these components to create the testing env: > > > LocalDatastoreServiceTestConfig datastoreConfig = new > > LocalDatastoreServiceTestConfig(); > > LocalMemcacheServiceTestConfig memcacheConfig = new > > LocalMemcacheServiceTestConfig(); > > helper = new LocalServiceTestHelper(datastoreConfig, memcacheConfig); > > > and helper.setUp/helper.tearDown before and after test method. > > > -- > > 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=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 > athttp://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=en.
Re: RE : [appengine-java] Re: Handling concurrent modification
By the way, I know it would be a little off topic, but have you guys experienced on unit testing concurrent access with memcache API? I find it impossible to do that with the provided testing library of GAE 1.3.2 SDK. Every times I tried to simulate concurrent access to memcache API using threads, then weird exceptions will be thrown (I have posted it here: http://groups.google.com/group/google-appengine-java/browse_thread/thread/e6326fc8a8ecae88). On Apr 23, 10:06 pm, Romain Pelisse wrote: > +1 > > Why are you looking to that on memcache rather than with the datastore ? > > It could definitelly be sounded approach, I would just like to know the > reasons behind ... > > Le 23 avr. 2010 15:00, "James" a écrit : > > It sounds like you're looking for memcached CAS > -http://groups.google.com/group/memcached/browse_thread/thread/b98fc70... > > Of course, this all begs the question of what you do if your data is > expunged from memcached. Are you not also writing to the datastore > (which has its own concurrency mgmt for cases like these)? > > James > > On Apr 23, 12:23 am, Phuong Nguyen wrote:> Hi guys: > > I'm creating an app t... > > For more options, visit this group athttp:// > > groups.google.com/group/google-appengine-java?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine fo... > > -- > 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=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=en.
Re: RE : [appengine-java] Re: Handling concurrent modification
The reason is speed. Given I'm have game, for example. When ever a player make a move, I need to update the game details. Only when the game finish that I want to persist them to datastore (for later reference). On Apr 23, 10:06 pm, Romain Pelisse wrote: > +1 > > Why are you looking to that on memcache rather than with the datastore ? > > It could definitelly be sounded approach, I would just like to know the > reasons behind ... > > Le 23 avr. 2010 15:00, "James" a écrit : > > It sounds like you're looking for memcached CAS > -http://groups.google.com/group/memcached/browse_thread/thread/b98fc70... > > Of course, this all begs the question of what you do if your data is > expunged from memcached. Are you not also writing to the datastore > (which has its own concurrency mgmt for cases like these)? > > James > > On Apr 23, 12:23 am, Phuong Nguyen wrote:> Hi guys: > > I'm creating an app t... > > For more options, visit this group athttp:// > > groups.google.com/group/google-appengine-java?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine fo... > > -- > 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=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=en.
[appengine-java] Re: List DB adds chars before string?
Thank you both. To answer Tristan question: I have no problem working with the string, only looking at the datastore view. I guess there's no problem. Thank you both. Tiago On Apr 24, 5:21 pm, Alan Kennedy wrote: > [TiagoP] > > > This is the result: [mat12, bg10] > > > When I do the same on the deploy server, this is the result: > > [u'mat12', u'bg10'] > > > I don't understand why it adds "u' '" to the string. > > That's python's way of representing a unicode string, i.e. > > Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit > (Intel)] on win32 > Type "help", "copyright", "credits" or "license" for more information.>>> s = > "Hello World" > >>> us = unicode(s) > >>> s > 'Hello World' > >>> us > > u'Hello World' > > Alan. > > -- > 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=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=en.
[appengine-java] JSP showing new DB data problem.
Hi all, When data is changed from the DB the JSP shows it to the user. The problem is that the JSP doesn't reload with the new data until I close session and start it again. My flow is like this: USer sign in (start session) -> goes to XXX.jsp and fetchs data from the DB -> data is changed from the DB -> XXX.jsp does not show the new data until I stop session and start it again. How can I make the JSP show me the new data? 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=en.
Re: [appengine-java] Can't decide: JDO, Twig-Persist or Objectify?
Hi jbdhl, You can choose Slim3, too. Please see the following tutorial using GWT. http://sites.google.com/site/slim3appengine/getting-started-with-gwt Slim3 supports HOT reloading when you use GWT, too. HOT reloading means new version of a class is automatically reloaded on the fly. Due to HOT reloading, when you change the source code, you can see the changed result on your browser without restarting web application. Yasuo Higa On Sun, Apr 25, 2010 at 4:04 AM, jbdhl wrote: > Hi > > I really can't decide which datastore abstraction to use for my app. > Any help deciding, would be much appreciated! > > The app is build using GWT and there is a lot of one-to-many relations > (so I would value if all children could be automatically deleted if > the parent is deleted). > > So... Which one of JDO, Objectify or Twig-Persist should I use? > > * Twig > Pros: simple, low startup latency > Cons: only one developer (major drawback), GAE-only > > * Objectify > Pros: simple, low startup latency > Cons: slightly more verbose syntax than in Twig, GAE-only > > * JDO > Pros: not GAE-only > Cons: complex, long startup latency > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine for Java" group. > To post to this group, send email to google-appengine-j...@googlegroups.com. > To unsubscribe from this group, send email to > google-appengine-java+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/google-appengine-java?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Single Sign on between applications
Was trying to look around for an answer and couldn't find it, but if I owned several applications, could i create a single sign on page that would log into both applications at the same time? For example, if i had a blog type of web site and I wanted to integrate it with a forum application I had, could I sign into both with 1 screen? -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: 404 (Not Found) on basic app
It seems to work now. What you see happens most of the time when you access an application for the first time or if you didn't receive traffic for some time since your instance needs to boot. You can see this in the logs as "This request caused a new process to be started for your application, and thus caused your application code to be loaded for the first time. This request may thus take longer and use more CPU than a typical request for your application." -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] Can't decide: JDO, Twig-Persist or Objectify?
I like Objectify, but you will find out that using the low level api its the best option due the appengine limitations. 2010/4/24 jbdhl > Hi > > I really can't decide which datastore abstraction to use for my app. > Any help deciding, would be much appreciated! > > The app is build using GWT and there is a lot of one-to-many relations > (so I would value if all children could be automatically deleted if > the parent is deleted). > > So... Which one of JDO, Objectify or Twig-Persist should I use? > > * Twig > Pros: simple, low startup latency > Cons: only one developer (major drawback), GAE-only > > * Objectify > Pros: simple, low startup latency > Cons: slightly more verbose syntax than in Twig, GAE-only > > * JDO > Pros: not GAE-only > Cons: complex, long startup latency > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine for Java" group. > To post to this group, send email to > google-appengine-j...@googlegroups.com. > To unsubscribe from this group, send email to > google-appengine-java+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/google-appengine-java?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Can't decide: JDO, Twig-Persist or Objectify?
Hi I really can't decide which datastore abstraction to use for my app. Any help deciding, would be much appreciated! The app is build using GWT and there is a lot of one-to-many relations (so I would value if all children could be automatically deleted if the parent is deleted). So... Which one of JDO, Objectify or Twig-Persist should I use? * Twig Pros: simple, low startup latency Cons: only one developer (major drawback), GAE-only * Objectify Pros: simple, low startup latency Cons: slightly more verbose syntax than in Twig, GAE-only * JDO Pros: not GAE-only Cons: complex, long startup latency -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] ApiProxyLocalImpl class not public
Hi, I'm trying to write a unit test for persistence using JDO and I noticed that I need an instance of ApiProxyLocalImpl to achieve it. The problem is that I'm unable to instantiate it as it this not a public class. ApiProxyLocalImpl can be found inside com.google.appengine.tools.development in both appengine-testing.jar and appengine-local-runtime.jar What is the problem? Where can I find a public version of it? Thanks in advance -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] 404 (Not Found) on basic app
Hi guys, I'm trying out Google App Engine for Java, and immediately got blocked by a problem. I'm using Eclipse, and Google Plugin for Eclipse. I've created an application using the wizard, and deployed it using the plugin. It was deployed successfully. When trying it at http://shelly-il.appspot.com, I get 404 (Not Found). When using it at http://localhost: it works fine. What seems to be the problem here? Thanks, Asaf -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] JDO unowned relationship
Hi, I’m a beginner in JDO. So I read the google tutorial http://code.google.com/intl/de/appengine/docs/java/datastore/relationships.html Well, I understand how to make a owned relationship. Bur I didn’t understand how I should make a unowned relation. So here’s the google example for unowned one-to-one relationship: @PersistenceCapable public class Person { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key key; @Persistent private Key favoriteFood; // ... } @PersistenceCapable public class Food { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key key; // ... } So a Person can have a favored Food. But a Food is not linked to only one Person, but can be the favored Food of more than one Person. Ok, I understand that we don’t have a Food-Object in the class Person, but instead we have the Key to the food. Ok, now I want to get the favored Food Object of a Person. How do I get now the Food Object? Is the only way to get it by calling the getObjectById() or to make a query like “SELECT FROM Food WHERE key = person.getFavoredFoodKey()” Is there another fully automatically way to get the Food-Object? -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
Re: [appengine-java] List DB adds chars before string?
[TiagoP] > This is the result: [mat12, bg10] > > When I do the same on the deploy server, this is the result: > [u'mat12', u'bg10'] > > I don't understand why it adds "u' '" to the string. That's python's way of representing a unicode string, i.e. Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> s = "Hello World" >>> us = unicode(s) >>> s 'Hello World' >>> us u'Hello World' Alan. -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: List DB adds chars before string?
This is a wild guess, but maybe it is an internal marker that means "Unicode string". Do you have issues working with the string, or are you just looking through the datastore viewer? On Apr 24, 8:23 am, TiagoP wrote: > Hi, > > I have a field in my db which is a List of Strings. > > I add strings to that list and it works fine on the development > server. > > This is the result: [mat12, bg10] > > When I do the same on the deploy server, this is the result: > [u'mat12', u'bg10'] > > I don't understand why it adds "u' '" to the string. > > I would really appreciate your help. > > 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 > athttp://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=en.
[appengine-java] Re: Update to GAE/J 1.3.2 -> Project in Eclipse broken
Yes it seems to be the same issue. Thanks for the link and bug report. //Daniel On 23 Apr, 19:47, Henri wrote: > The problem may be related to the Vaadin eclipse plugin. > Seehttp://dev.vaadin.com/ticket/4596 > > -- > Henri Muurimaa > > On Apr 20, 9:02 am, Dannemano wrote: > > > > > > > Note, I am also MacOSX snow leopard. I have been hacking away in App > > Engine and Vaadin before 1.3.2 and it has been working flawlessly. > > > I tried moving the project to a newly downloaded copy of Eclipse (the > > JavaEE development version) and then installing Google Plugin. > > The same issue as described above. > > > After reinstalling and trying different order in how I set the App > > Engine SDK for the project I got it working. Instead I now receive > > warnings: > > > Description Resource Path Location Type > > The App Engine SDK JAR appengine-api-1.0-sdk-1.3.2.jar is missing in > > the WEB-INF/lib directory > > > If I run the project now with the development server I get this > > runtime issue: > > > HTTP ERROR 500 > > Problem accessing /. Reason: > > com/google/appengine/api/datastore/EntityNotFoundException > > Caused by: > > java.lang.NoClassDefFoundError: com/google/appengine/api/datastore/ > > EntityNotFoundException > > > So clearly the dev-server cannot find the libraries and this is the > > point where I am currently stuck. If I use the J2EE Module > > Dependencies to export the App Engine required libs to WEB-INF/lib > > then the App Engine SDK gets messed up for the project and I am back > > to the starting point where the SDK is permanently set to > > "{project.home}/war" > > > Any ideas? Can it be a bug in the Google plugin itself for MacOS? > > > Regards, > > Daniel > > > On 19 Apr, 19:18, Moritz wrote: > > > > No. > > > > Miguel asked for an example project for reproduction, but in each and > > > every project I try to enable appengine support, I get the same > > > problem and the SDK is permanently set to "{project.home}/war" and I'm > > > not able to change it. > > > > My solution is to get rid of the Eclipse plugin and use the Maven > > > plugin instead. Maven is better anyway - unfortunately not officially > > > supported by Google. > > > > Moritz > > > > P.S.: I'm using Eclipse on Mac OS X 10.6.3 > > > > On 19 Apr., 13:00, Dannemano wrote: > > > > > Hi, > > > > > Any updates on the bug? I have the exact same problems and have been > > > > unable to fix it. > > > > > Regards, > > > > Daniel > > > > > On 5 Apr, 15:04, Miguel Méndez wrote: > > > > > > Can you file a bug with a project that reproduces the problem? I > > > > > think that > > > > > will be the best way to get to bottom of what is going 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 > > > > athttp://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 > > > athttp://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 > > athttp://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 > athttp://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=en.
[appengine-java] List DB adds chars before string?
Hi, I have a field in my db which is a List of Strings. I add strings to that list and it works fine on the development server. This is the result: [mat12, bg10] When I do the same on the deploy server, this is the result: [u'mat12', u'bg10'] I don't understand why it adds "u' '" to the string. I would really appreciate your help. 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=en.
[appengine-java] Re: Simulate concurrent access to memcache
Here is one kind of exception that I got: Caused by: com.google.apphosting.api.ApiProxy$CallNotFoundException: The API package 'memcache' or call 'Increment()' was not found. at com.google.apphosting.api.ApiProxy.makeSyncCall(ApiProxy.java:95) at com.google.apphosting.api.ApiProxy.makeSyncCall(ApiProxy.java:48) at com.google.appengine.api.memcache.MemcacheServiceImpl.increment(MemcacheServiceImpl.java: 623) Other exceptions are almost similar (ApiProxy$CallNotFoundException, with different command - 'Set()', for example). On Apr 24, 3:31 pm, Phuong Nguyen wrote: > Hi, > Is there any way to simulating concurrent access to memcache during > unit testing? > I'm trying to write a wrapper to try to synchronize access to > memcache. However, my test fail miserably because when ever I create a > thread, then inside this thread, almost any interaction with Memcache > API would result in an exception. (I guess it due to GAE constraint > that threads won't be manually created???) > > I'm using these components to create the testing env: > > LocalDatastoreServiceTestConfig datastoreConfig = new > LocalDatastoreServiceTestConfig(); > LocalMemcacheServiceTestConfig memcacheConfig = new > LocalMemcacheServiceTestConfig(); > helper = new LocalServiceTestHelper(datastoreConfig, memcacheConfig); > > and helper.setUp/helper.tearDown before and after test method. > > -- > 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=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=en.
[appengine-java] Re: Distributed cache that are globally available, really?
Ouch, my bad for not reading the document properly. Thanks for pointing out. On Apr 24, 2:50 pm, Pieter Coucke wrote: > Collections.emptyMap() are just the parameters, as explained > here:http://code.google.com/appengine/docs/java/memcache/usingjcache.html#... > > The createCache() method creates a connection to memcached, which is a > distributed globally available cache. > > -- > 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=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=en.
[appengine-java] Simulate concurrent access to memcache
Hi, Is there any way to simulating concurrent access to memcache during unit testing? I'm trying to write a wrapper to try to synchronize access to memcache. However, my test fail miserably because when ever I create a thread, then inside this thread, almost any interaction with Memcache API would result in an exception. (I guess it due to GAE constraint that threads won't be manually created???) I'm using these components to create the testing env: LocalDatastoreServiceTestConfig datastoreConfig = new LocalDatastoreServiceTestConfig(); LocalMemcacheServiceTestConfig memcacheConfig = new LocalMemcacheServiceTestConfig(); helper = new LocalServiceTestHelper(datastoreConfig, memcacheConfig); and helper.setUp/helper.tearDown before and after test method. -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.
[appengine-java] Re: Distributed cache that are globally available, really?
Collections.emptyMap() are just the parameters, as explained here: http://code.google.com/appengine/docs/java/memcache/usingjcache.html#Configuring_Expiration The createCache() method creates a connection to memcached, which is a distributed globally available cache. -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-j...@googlegroups.com. To unsubscribe from this group, send email to google-appengine-java+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-appengine-java?hl=en.