[appengine-java] Re: Best Practice for Java Datastore API

2011-04-23 Thread Andy
Well after studying the source, I guess I will just use 3rd party lib like Objectify because creating one takes too much time and effort to cover all GAE datastore API's ground. Thanks all for the advice! -- You received this message because you are subscribed to the Google Groups "Google App

[appengine-java] Re: Best Practice for Java Datastore API

2011-04-23 Thread Andy
Thanks Didier! Totally forgot that I could read the source from Objectify!! -- 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 grou

[appengine-java] Re: Best Practice for Java Datastore API

2011-04-21 Thread Andy
Thanks both of you. I would like to know the best practice of system design when using low level api. Like where should I store the property type information? I could simply use a Map to store the schema for each entity but then a property sometimes has more than just the type but also forma

[appengine-java] Best Practice for Java Datastore API

2011-04-21 Thread Andy
do I do that? e.g. creationDate is a Date type when saving it as a property of an entity but where should I define it as a Date type so I don't have to cast every single type? Thanks, Andy -- You received this message because you are subscribed to the Google Groups "Google App

[appengine-java] Re: Getting error when passing the object to client side please help me..

2011-03-05 Thread andy
hey, thanks. i did that with DTO class. means every time if i want send the result i should have to use DTO class objects?? -- 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-jav

[appengine-java] Re: Getting error when passing the object to client side please help me..

2011-03-05 Thread andy
thanks , i will try it now... one more thing i wants to ask that how get the child record(only child properties or including some parent properties) based on the parent properties? because i have used the one to many relation and there is on parent property in child. One way to do this- using t

[appengine-java] Getting Error while sending the parent object to client side please help me...

2011-03-05 Thread andy
here is my code; Employee:(Parent) @PersistenceCapable(identityType = IdentityType.APPLICATION,detachable="true") public class Employee implements Serializable { private static final long serialVersionUID = 1L; @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)

[appengine-java] Getting Error "org.datanucleus.sco.backed.List" while paasing the parent object form server to chile side

2011-03-05 Thread andy
-- 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 mo

[appengine-java] Getting error when passing the object to client side please help me..

2011-03-03 Thread andy
My code here: Employee Class: @PersistenceCapable(identityType = IdentityType.APPLICATION,detachable="true") public class Employee implements Serializable { private static final long serialVersionUID = 1L; @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) @

[appengine-java] Re: What Is "It's possible for two entities to have values of different types for the same property"

2011-01-05 Thread Andy
Thanks for your quick reply. I actually thought about it again and read it again, it's not just about updating schema, but the GAE documentation is all about the low level API, not JDO nor JPA. I am using JDO now so I thought that it is talking about JDO but it's not. So here's what I found i

[appengine-java] Re: Datastore Backup and Restore (for Java)

2011-01-05 Thread Andy
It is possible. Use KeyFactory's static method "keytostring()" to convert all your keys to string value. Since String values are portable on any platform, you can do that easily. Hope this help. -- You received this message because you are subscribed to the Google Groups "Google App Engine

[appengine-java] What Is "It's possible for two entities to have values of different types for the same property"

2011-01-05 Thread Andy
I found the sentence in subject line in the following page: http://code.google.com/appengine/docs/java/datastore/entities.html It doesn't elaborate more how to achieve that in Java at all, no sample code, no explanation, no nothing. We learned the way of creating entity schema for all same kind

[appengine-java] Basic Text Search Not Working

2011-01-03 Thread Andy Haaf
I followed the instructions at: http://googlecode.blogspot.com/2010/05/google-app-engine-basic-text-search.html but search is only working for exact matches in the column, not partial strings. Here is my code: String querystring = request.getParameter("querystring"); querystring = ( queryst

Re: [appengine-java] App calling another secured App

2011-01-01 Thread Andy
Hi, I think I will leverage XMPP as system exchange channel, I will try some experiments and hopefully that's working. Thanks, Andy -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send

Re: [appengine-java] App calling another secured App

2011-01-01 Thread Andy
Thanks for your reply. I am not very familiar with shared keyed encryption method, do you have a link to the resource you can share? Besides, I think it is beyond encryption, it requires some kind of authentication also right? -- You received this message because you are subscribed to the Goo

[appengine-java] App calling another secured App

2010-12-31 Thread Andy
login to APP 2? Any idea? Thanks, Andy -- 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] Re: Entity relationship designing - best practice

2010-12-31 Thread Andy
I have the same question but this is leading to much bigger relationship model. As students, they may not have many exams, but I am working on an app for financial institute so a banking client has more than 100,000,000 transactions for different account. Therefore, should I group all transaction

Re: [appengine-java] Blobstore Code Works On Dev Server, Not Production

2010-12-07 Thread Andy Haaf
So, I did that, but now I am receiving the following error: p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 19.0px; font: 13.0px Courier New} java.lang.IllegalStateException: Must be called from a blob upload callback request Plus, I needed to change my .jsp form code to a "get" versus a

[appengine-java] Blobstore Code Works On Dev Server, Not Production

2010-12-07 Thread Andy Haaf
My blobstore code works just great in the dev server (running on Mac) but I receive an error when uploading to production. I receive an Error: HTTP method GET is not supported by this URLeven though the sample refers to post. As I said, works fine in Dev. Please help! -- You received this message

[appengine-java] Where Do I Store Memcache "Cache" Reference?

2010-12-03 Thread Andy
According to the docs, creating memcache for an app is easy but where do I store the "Cache" reference returned by the CacheFactory? Do I store it in ServletContext as an attribute? or any other technique? thanks. -- You received this message because you are subscribed to the Google Groups "Go

Re: [appengine-java] Compare Unowned Key

2010-11-02 Thread Andy
Got it!!! http://gae-java-persistence.blogspot.com/2010/01/querying-with-key-parameters.html Thanks Max Ross, the blogger. Basically I have to use the following syntax instead of regular String builder: p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; min-height: 15.0px} p.p2 {ma

Re: [appengine-java] Compare Unowned Key

2010-11-02 Thread Andy
but when I execute this, it always returns all PField instances, did I do anything wrong? Thanks, Andy -- 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

Re: [appengine-java] Compare Unowned Key

2010-11-01 Thread Andy Leung
r, Google App Engine Blogger: http://googleappengine.blogspot.com Reddit: http://www.reddit.com/r/appengine Twitter: http://twitter.com/app_engine On Sun, Oct 31, 2010 at 8:38 PM, Andy wrote: > I created unowned key in child objects for query. When I try to query by > the key, I tried the fo

[appengine-java] Compare Unowned Key

2010-10-31 Thread Andy
I created unowned key in child objects for query. When I try to query by the key, I tried the following because I read the GQL statement: p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco} span.s1 {color: #492df6} "where product = KEY('"+KeyFactory.keyToString(product)+"')"); But it

[appengine-java] Is there a way to turn off Task Queue timeouts?

2010-10-12 Thread andy stevko
I really want to be able to debug step through a Task Queue initiated task and have it not time out. http method POST against URL http://0.0.0.0:8080/task/simple timed out. Also - have you noticed that the dev server does retry tasks that throw errors? This is contrary to the docs - "the develop

Re: [appengine-java] OneToOne relationship with java.lang.Long ids

2010-10-11 Thread andy stevko
The ID for the owned child User instances has to be a Key or String type because the it contains both the reference to the parent(s) and the unique id of the object. A Long alone will not contain enough information to navigate the object model to it. I usually stick with String ids for all my type

Re: [appengine-java] what is sharding?

2010-10-11 Thread andy stevko
This is a bit of a stretch for this forum. Perhaps this explanation will help you understand the database design term. http://stackoverflow.com/questions/992988/what-is-sharding-and-why-is-it-important On Mon, Oct 11, 2010 at 4:30 AM, sagar misal wrote: > can anyone please make me understand

Re: [appengine-java] Task queue with HTTP POST not working.

2010-10-10 Thread andy stevko
Does your servlet respond to POST requests? On Oct 10, 2010 10:28 AM, "apple" wrote: > I followed the codes in GAE document to make a simple task queue: > > Queue queue = QueueFactory.getDefaultQueue(); > queue.add(TaskOptions.Builder.method(TaskOptions.Method.GET).url("/ > security")); > > This w

Re: [appengine-java] Re: Web Hook - Asynchronous - Where is my response?

2010-10-07 Thread Andy Leung
f status data in memcache or the datastore. > > > On 7 Oct 2010, at 20:13, Andy wrote: > > Sorry I don't quite understand your answer, what do you mean by "DataStore >> Operation"? >> >> -- >> You received this message because you are subscribe

[appengine-java] Re: Many to many relation ship

2010-10-07 Thread Andy
hope this helps, Andy -- 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-app

[appengine-java] Re: Web Hook - Asynchronous - Where is my response?

2010-10-07 Thread Andy
Sorry I don't quite understand your answer, what do you mean by "DataStore Operation"? -- 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

Re: [appengine-java] Datastore, Java, JSP, JSON, AJAX, Web Page. Is it going to work?

2010-10-06 Thread andy stevko
Hi x_maras, re: using email as a primary key http://code.google.com/appengine/docs/java/users/overview.html The User object exposes a unique user ID that is guaranteed to be stable for the lifetime of the user's account, even if the email address is changed. You can use this value in a datastore

[appengine-java] Re: Web Hook - Asynchronous - Where is my response?

2010-10-06 Thread Andy
Thanks for your quick reply Robert. So is there a way to check the task status by task ID or some sort? -- 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.

[appengine-java] Web Hook - Asynchronous - Where is my response?

2010-10-06 Thread Andy
Hi, I have read the Task API for many times and am still confused about the web hook. If web hook is asynchronous, where do I get the signal (like Future) that my task is completed and where do I get the response of the web hook request? Thanks, Andy -- You received this message because

Re: [appengine-java] Many to many relation ship

2010-10-06 Thread andy stevko
Not sure why the datastore needs to know that a Car is associated with a particular User. There is no easy way for the datastore to handle cascading deletes in a M-to-M relationship w/o reference counting. Also setting the Fetch policy to load children with the parent load is not an option due to t

Re: [appengine-java] is there any proper way to create shortcut(s) for the current window object in gwt

2010-10-03 Thread andy stevko
google-appengine-java is probably the wrong group to ask this question. http://groups.google.com/group/google-web-toolkit is a better community for GWT questions. Also - did your Widget has focus when you used the keyboard? On Sun, Oct 3, 2010 at 2:30 AM, wingdings wrote: > just for like CTRL

Re: [appengine-java] Simplest key query

2010-10-02 Thread andy stevko
Hi Paul, FWIW, Here is a slightly edited version of my JDO query by id. Perhaps it can help you get over this bump. @SuppressWarnings("unchecked") public Account lookupAccountById( PersistenceManager pm, Long accountId) { logger.fine("looking up account id=" + accountId ); // look up

Re: [appengine-java] Re: Creating Folder/Directory at Runtime

2010-10-01 Thread andy stevko
.com, I > will create a domain new_domain. I will then have > www.webpage.com/new_domain/ > if I can create this directory at runtime. Thanks again! > > On Oct 1, 11:00 am, andy stevko wrote: > > No - all local disk write access is not permitted. > > > > http://code

Re: [appengine-java] JDO unique Long ID keys across entity groups

2010-09-30 Thread andy stevko
Perhaps you can weaken the P-C relationship by making C separate entities and, instead of P storing a list of C objects, P stores a list of C ids. On Thu, Sep 30, 2010 at 3:28 AM, Fred wrote: > Hi Group, > > I know key ids are only unique across entity groups so what GAE + JDO > gives me is: >

Re: [appengine-java] Creating Folder/Directory at Runtime

2010-09-30 Thread andy stevko
No - all local disk write access is not permitted. http://code.google.com/appengine/docs/java/runtime.html The Filesystem A Java application cannot use any classes used to write to the filesystem, such as java.io.FileWriter. An application can read its own files from the filesystem using classes

Re: [appengine-java] Problem with persist a child class

2010-09-30 Thread andy stevko
My only thought is that you should clean your project and have datanucleus rebuild the persistent classes entirely. On Wed, Sep 29, 2010 at 2:34 PM, lisandrodc wrote: > Hi andy! I have tried delete my local_db and the problem persist. > The exception is in the next code, in the call

Re: [appengine-java] Re: Not Able To Move To The Cloud

2010-09-29 Thread andy stevko
Yes, it is simple - You are missing the leading slash in your . Perhaps you can learn how to configure tomcat web.xml files with this very nice blog post. http://tomcat-configure.blogspot.com/2009/01/tomcat-web-xml.html You can also learn how what matches the regular expression by using this test

Re: [appengine-java] Re: Not Able To Move To The Cloud

2010-09-29 Thread andy stevko
Dave is correct the tag must match the app id. The is best incremented from deployment to deployment as well. This is easily maintained using the eclipse project properties google appengine tab. Your web xml url pattern is the problem. Try using a absolute uri rather than a relative uri as the r

Re: [appengine-java] Re: Urgent: Getting only Server Error (500) since ~12:30 am (September 28th)

2010-09-28 Thread andy stevko
Ditto on the high error rate on my app too. app_id=ninuku-archivist Whats going on here?? On Tue, Sep 28, 2010 at 8:08 AM, mscwd01 wrote: > I've been getting the second issue you mentioned for the last few > days. Sometimes the error rate is above 50%. Don't expect to get any > help from Googl

Re: [appengine-java] Re: Problem with persist a child class

2010-09-25 Thread andy stevko
(long integers and double-width floats), the value is converted, not cast. If the numeric property value is larger than the field type, the conversion overflows without throwing an exception. --Andy On Sat, Sep 25, 2010 at 1:40 PM, lisandrodc wrote: > Hi! Andy I can't change the type of

Re: [appengine-java] Problem with persist a child class

2010-09-24 Thread andy stevko
I've managed to make class inheritance work for me using JDO. The only difference I see between my annotations and yours is I'm using @Inheritance(customStrategy = "complete-table") InheritanceStrategy

Re: [appengine-java] Re: problem, please help me

2010-09-18 Thread andy stevko
> > > > > > > > > > > > > > > > > and nothing done ? > > > > what can i do else ??? > > > > On Sep 18, 1:43 am, andy stevko wrote: > > > > > Perhaps you can figure this out by

Re: [appengine-java] Re: problem, please help me

2010-09-17 Thread andy stevko
ote > > > > > > > what is the problem in it ?? > > On Sep 18, 12:51 am, andy stevko wrote: > > Seems pretty straight forward You need to define an index for 'Quote' > > I suggest looking at > > .../war/WEB-INF/appengine

Re: [appengine-java] problem, please help me

2010-09-17 Thread andy stevko
Seems pretty straight forward You need to define an index for 'Quote' I suggest looking at .../war/WEB-INF/appengine-generated/datastore-indexes.xml and datastore-indexes-auto.xml and correct the settings. http://code.google.com/appengine/docs/java/datastore/queriesandindexes.html#Defining_Inde

Re: [appengine-java] [IDEA] Circumventing app engine cold start with a warm up

2010-09-16 Thread andy stevko
I was just thinking about this issue during an interview this morning. I like your initServlet idea and think that it could also be used during takedown to cleanup any external resources (like batched sequence counters). An alternative for the scaling from 1 server to many startup problem is to n

Re: [appengine-java] Delete indexes for application

2010-09-15 Thread andy stevko
run appcfg.py vacuum_indexes as described in http://code.google.com/appengine/docs/python/datastore/queriesandindexes.html#Big_Entities_and_Exploding_Indexes On Tue, Sep 14, 2010 at 11:43 AM, Barada Sahu wrote: > Hi, > I need to delete the indexes for my java app as the column name has > chang

[appengine-java] Re: Security problem with App Engine application

2010-09-06 Thread Andy Faulkner
Thanks for your contributions guys. Had got myself a confused with the need to use AppEngine which, as John points out, I don't need to in this context. Andy On Sep 3, 9:23 am, John Patterson wrote: > You can write a local Java application that reads data using the JDBC   > driver

[appengine-java] Security problem with App Engine application

2010-09-02 Thread Andy Faulkner
404) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java: 409) at org.mortbay.thread.QueuedThreadPool $PoolThread.run(QueuedThreadPool.java:582) I'd really appreciate if someone can help me to resolve these errors. Do I need a policy file? And if so, where sho

[appengine-java] Re: Calendar API

2010-05-07 Thread Andy Glover
0T23:59:59")); CalendarEventFeed resultFeed = myService.query(query, CalendarEventFeed.class); List entries = resultFeed.getEntries(); for (int i = 0; i < entries.size(); i++) { CalendarEventEntry entry = entries.get(i); } } CalendarEventEntry has a getId, etc. Does that help? -Andy On Ma

[appengine-java] Re: help! output Image to a webpage

2009-12-16 Thread andy
You need to do this differently. Serve one HTML page that includes tags for your X pictures. The src url for the pictures then points to a servlet that take the URL parameter of the picture ID, load the data and write it to the stream. Servlet code also needs to set the content type to "image/jpg

[appengine-java] Re: BlobstoreService, No image data is available.

2009-12-16 Thread andy
The resize without accessing the dimensions works. Image oldImage = ImagesServiceFactory.makeImageFromBlob(bi.getBlobKey ()); ImagesService imagesService = ImagesServiceFactory.getImagesService (); Transform resize = ImagesServiceFactory.makeResize(128, 128); Image newImage = imagesService

[appengine-java] BlobstoreService, No image data is available.

2009-12-15 Thread andy
I'm trying to scale an image after upload (in the doPost method). The blob key seems to be ok and the image is served after the upload. Image oldImage = ImagesServiceFactory.makeImageFromBlob(bk); double aspectRatio = (double) oldImage.getWidth() / (double) oldImage.getHeight(); -> java.lang.U

Re: [appengine-java] Re: Collections usge in Appengine Java

2009-12-09 Thread andy stevko
://www.datanucleus.org/products/accessplatform_1_1/jdo/annotations.html#FetchGroup Strings and other basic java.lang types are in the default fetch group. User defined types need to be added to a user named fetch group (or may be added to the default group). HTH, --Andy On Thu, Dec 3, 2009 at 11:10 PM

Re: [appengine-java] Collections usge in Appengine Java

2009-12-02 Thread andy stevko
This is a common issue. You need to define a @FetchGroup( ) for your class that names that member then add the FetchGroup to your persistence manager. @FetchGroup( name="children", members={ @Persistent(name="childcollection") }) public class //--- PersistenceMa

[appengine-java] Re: JSP errors in hosted mode

2009-09-16 Thread andy
http://code.google.com/p/googleappengine/issues/detail?id=2132. If anyone else feels this is an issue please feel free to star the issue. Thanks again. On Sep 16, 11:49 am, Keith Platfoot wrote: > Hi Andy, > At this point, no.  For JSP errors generated by javac, the error will refe

[appengine-java] JSP errors in hosted mode

2009-09-16 Thread andy
sp.java: 53: ';' expected Is there a way to get the GAE hosted mode server to display JSP source line level error messages? Any help would be much appreciated. Andy --~--~-~--~~~---~--~~ You received this message because you are subscribed to the G