Skip to main content

Home/ Groups/ Google AppEngine
Esfand S

Datastore design question - Google App Engine | Google Groups - 0 views

  • It sounds like the list property can't be appended to without a transaction?  If so, it seems it'll be better to create two tables, one for Users and one for Items.
Esfand S

Content-Encoding in Google App Engine « A software developers journal - 0 views

  • It turns out that the Content-Type is also affecting the servers decision to compress the response. We were using applicaton/xml as Content-Type and when changing this to text/xml, the compression was enabled.
Esfand S

Appointments and Line Items - Stack Overflow - 0 views

  • I propose two possiblities: Duplicate Line_Item. Line_Item appointment_key name price finished ... A Line_Item should have a finished state, when the item was finished or not by the employee. If an employee hadn't finished all line items, mark them as unfinished, create a new appointment and copy all items that were unfinished. You can index on the appointment_key field on all Line_Items, which is a Good Thing. However, the duplicated data may be a problem. Dynamic fields for Line_Item: Line_Item duplicate_key appointment_key name price finished ... Create a new field, duplicate_key, for Line_Item which points to another Line_Item or to null (reserve this key!). Null means that the Line_Item is original, any other value means that this Line_Item is a duplicate of the Line_Item the field points to. All fields of Line_Item marked as a duplicate inherit the fields of the original Line_Item, except the appointment_key: so it will take less storage. Also this solution should have appointment_key indexed, to speed up lookup times. This requires one additional query per duplicated Line_Item, which may be a problem. Now, it's a clear choice: either better speed or better storage. I would go for the first, as it reduces complexity of your model, and storage is never a problem with modern systems. Less complexity generally means less bugs and less development/testing costs, which justifies the cost of the storage requirement.
Esfand S

How do I send an email from a non-gmail account using the appengine - Stack Overflow - 0 views

  • That's a restriction of App Engine's mail API: The sender address can be either the email address of a registered administrator for the application, or the email address of the current signed-in user (the user making the request that is sending the message). If you've got Google Apps running on that domain, you should have (or be able to create) an @thatdomain.com email addresses that you can register as an administrator of the App Engine app in question, which will then let you send email "from" that address.
Esfand S

Java App Engine Get Auto Generated Key value - Stack Overflow - 0 views

  • I have an Entity with an id type of Long, and the id gets filled in after I call makePersistent(). Here is what the code looks like:     GameEntity game = new GameEntity();    log.warning("before makePersistent id is " + game.getId());    pm.makePersistent(game);    log.warning("after makePersistent id is " + game.getId()); Here is a snippet of the GameEntity class: @PersistenceCapable(identityType = IdentityType.APPLICATION)public class GameEntity {    @PrimaryKey    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)    private Long id; And the output shows what you'd expect: WARNING 6428 - before makePersistent id is nullWARNING 6444 - after makePersistent id is 6 UPDATE: It occurred to me belatedly that you might want an actual Key object. You can create that yourself if you have the id: public Key getKey() {    return KeyFactory.createKey(GameEntity.class.getSimpleName(), id);}
Esfand S

GWT, Blobstore, the new high performance image serving API, and cute dogs on ... - 0 views

  • Blobstore crash course It’ll be best if we gave a quick refresher course on the blobstore before we begin. Here’s the standard flow for a blobstore upload: Create a new blobstore session and generate an upload URL for a form to POST to. This is done using the createUploadUrl() method of BlobstoreService. Pass a callback URL to this method. This URL is where the user will be forwarded after the upload has completed. Present an upload form to the user. The action is the URL generated in step 1. Each URL must be unique: you cannot use the same URL for multiple sessions, as this will cause an error. After the URL has uploaded the file, the user is forwarded to the callback URL in your App Engine application specified in step 1. The key of the uploaded blob, a String blob key, is passed as an URL parameter. Save this URL and pass the user to their final destination
Esfand S

Functions - Google App Engine - Google Code - 0 views

  • allocate_ids(model_key, count)
  • allocate_id_range(model, start, end, **kwargs)
Esfand S

Google Web Toolkit Blog: How to Use Google Plugin for Eclipse with Maven - 0 views

  • to enable both Maven and GPE for the same project. This article explains how to do that.
  • Mavenizing an existing GPE project To use Maven with an existing GPE project, follow these steps:
Esfand S

Logging Google App Engine application? - Stack Overflow - 0 views

  • Google App Engine applications written in Java can write information to the log files using java.util.logging.Logger. Log data for an application can be viewed and analyzed using the Administration Console, or downloaded using appcfg.sh request_logs. More info in the Logging documentation.
Esfand S

Is it possible to create references in Google App Engine? - Stack Overflow - 0 views

  • A reference property simply stores the unique key of the entity it references. So the mother and father entities could each contain a copy of the key corresponding to their child
Esfand S

Using Asynchronous URLFetch on Java App Engine « Ikai Lan says - 0 views

  • Developers building applications on top of Java App Engine can use the familiar java.net interface for making off-network calls. For simple requests, this should be more than sufficient. The low-level API, however, provides one feature not available in java.net: asynchronous URLFetch.
  • The one killer feature of App Engine’s low-level API that isn’t present in java.net is asynchronous URLFetch. What is asynchronous fetch? Let’s make an analogy:
Esfand S

Junit Problem - Google App Engine for Java | Google Groups - 0 views

  • there are few jars like appengine-testing.jar appengine-local-rutime-shared.jar etc. Basically when you create a new GAE project the eclipse plugin copies some jars automatically in war folder, which are required when you will be running ur application on GAE server, but it doesnt copy few test jars which are required only for local dev env and testing. So what i did i compared jars in my war folder and GAE SDK installed folder. I found that few of jars not included so i included all in my Eclipse build path/Junit run path(but didnt copy into war folder) and that worked for me and then i didnt care to check which were the jars actually needed and which were not as i included all jars. But somehow in docs they have mentioned to included only one or two jars and with these jars junit doesnt work.
Esfand S

Google App Engine for Java Questions - Google App Engine - Google Code - 0 views

  • How do I handle multipart form data? or How do I handle file uploads to my app? You can obtain the uploaded file data from a multipart form post using classes from the Apache Commons FileUpload package. Specifically you may want to use FileItemStream, FileItermIterator and ServletFileUpload as illustrated below. If you see a java.lang.NoClassDefFoundError after starting your application, make sure that the Apache Commons FileUpload JAR file has been copied to your war/WEB-INF/lib directory and added to your build path. import org.apache.commons.fileupload.FileItemStream;import org.apache.commons.fileupload.FileItemIterator;import org.apache.commons.fileupload.servlet.ServletFileUpload;import java.io.InputStream;import java.io.IOException;import java.util.logging.Logger;import javax.servlet.ServletException;import javax.servlet.http.HttpServlet;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletResponse;public class FileUpload extends HttpServlet {  private static final Logger log =      Logger.getLogger(FileUpload.class.getName());  public void doPost(HttpServletRequest req, HttpServletResponse res)      throws ServletException, IOException {    try {      ServletFileUpload upload = new ServletFileUpload();      res.setContentType("text/plain");      FileItemIterator iterator = upload.getItemIterator(req);      while (iterator.hasNext()) {        FileItemStream item = iterator.next();        InputStream stream = item.openStream();        if (item.isFormField()) {          log.warning("Got a form field: " + item.getFieldName());        } else {          log.warning("Got an uploaded file: " + item.getFieldName() +                      ", name = " + item.getName());          // You now have the filename (item.getName() and the          // contents (which you can read from stream).  Here we just          // print them back out to the servlet output stream, but you          // will probably want to do something more interesting (for          // example, wrap them in a Blob and commit them to the          // datastore).          int len;          byte[] buffer = new
« First ‹ Previous 161 - 180 Next › Last »
Showing 20 items per page