[appengine-java] Reading Blobstore data

2011-07-07 Thread Luca Matteis
Hello, I'm trying to simply read blobstore data without using the .serve() method. It seems like I can use the .fetchData() method, but the parameters needed are unclear to me and how I would generate them. I just need to read all the bytes. For example if I store a plain/text file in the blobsto

[appengine-java] Does .getKey().getId() stay the same?

2011-06-05 Thread Luca Matteis
I was wondering if entity.getKey().getId() is going to stay the same always, as I depend ID to bookmark entities. -- 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@googlegrou

[appengine-java] .getKey().getId()

2011-05-07 Thread Luca Matteis
.getKey().getId() returns an incremental number (starts from 1) on the development server. However on the live server (when I deploy it to Google) this number is quite large, for example 22007. How come? Can I get incremental numbers starting from 1 on the live server as it is on the development s

Re: [appengine-java] A couple of datastore questions!

2011-05-03 Thread Luca Matteis
Owned relationships are a bit weird in my opinion. I was having your same issue. I had a `MyImage` class that was defined inside two different classes. This didn't work... I didn't quite understand why and so to avoid all weirdness I decided that for more complex relationship cases I would always u

Re: [appengine-java] web application migration to the cloud using GAE

2011-05-02 Thread Luca Matteis
If you're using standard APIs for your data layer like JDO or JPA then it should work out of the box... otherwise you're pretty much stuck having to re-write many layers. The I/O layer for example needs to be completely abstracted out because no I/O operations (other than reading resources) are all

[appengine-java] Some details on how GAE actually works

2011-04-30 Thread Luca Matteis
App Engine has been abstracting all their implementation details away from the developer, which is great. I'm however a little curious in knowing how their infrastructure works... not only how it works but also how it scales geographically. Living in Europe this has a strong impact on my decision t

Re: [appengine-java] Are urls with /ah/* automatically protected?

2011-04-22 Thread Luca Matteis
These pages are only available on the development server, not when your site goes live. So it should be safe enough :) On Fri, Apr 22, 2011 at 11:18 AM, Marcel Overdijk wrote: > I'm wonderinf if urls starting with /ah/* (like /_ah/queue/ > __deferred__) are automatically protected or that I shoul

Re: [appengine-java] Re: Data being stored in a weird way

2011-04-20 Thread Luca Matteis
not. >> >> So, change it to UTF-8 and your issue should get fixed. >> >> regards >> >> didier >> >> On Apr 19, 6:32 pm, Luca Matteis wrote: >> > I posted a question on StackOverflow about my data being stored with >> > weird c

[appengine-java] Data being stored in a weird way

2011-04-19 Thread Luca Matteis
I posted a question on StackOverflow about my data being stored with weird chars, and it only happens live, which is very strange. Here's the question: http://stackoverflow.com/questions/5707266/google-app-engine-data-being-stored-in-a-weird-way Am I missing something? -- You received this mess

Re: [appengine-java] Is there a way to get the app name?

2011-04-14 Thread Luca Matteis
You could parse the appengine-web.xml file which contains the app name. On Thu, Apr 14, 2011 at 7:08 PM, Luis Montes wrote: > Is there a way at runtime to get the app engine app name? > It's possible to create an app in eclipse and deploy it to multiple > .appspot.com  domains.  Also I can't just

Re: [appengine-java] What are you opinions about yesterdays announced opensource Cloudcoundry PaaS

2011-04-13 Thread Luca Matteis
I think it's still a mystery so far. They seem to want to follow App Engine's philosophy and free the developer from all the sys-admin work, yet they provide implementation details (MySQL, Redis, and MongoDB are listed on their site). This means that the developer will still need to do some sys-adm

[appengine-java] Owned relationship. Lost reference

2011-04-10 Thread Luca Matteis
I have a Recipe entity that contains two images: @PersistenceCapable(identityType = IdentityType.APPLICATION, detachable="true") public class Recipe { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key key; @Persistent private MyImage myImage; //

[appengine-java] Object Manager has been closed - solution other than detaching

2011-04-08 Thread Luca Matteis
Whenever I query something like public static MyUser getUserInfo(Key userKey) { PersistenceManager pm = PMF.get().getPersistenceManager(); MyUser myUser, detached = null; try { myUser = pm.getObjectById(MyUser.class, userKey); pm.detachCopy(myUse

Re: [appengine-java] Re: JDO - Updating a One-to-one child

2011-04-08 Thread Luca Matteis
Oh! Oh!!! Great idea I will just edit it instead of creating a new one! DUH! thanks so much On Fri, Apr 8, 2011 at 11:53 AM, Simon Knott wrote: > Is there any reason you make a new MyImage object?  Why can't you just > change the MyImage object which already exists in the MyUser object? > > -

Re: [appengine-java] Re: JDO - Updating a One-to-one child

2011-04-08 Thread Luca Matteis
Argh! Nothing! I just tried making all changes... nothing.. same results :( It's incredible I can't find any example online that involves editing a child owned entity. On Fri, Apr 8, 2011 at 11:41 AM, Simon Knott wrote: > I've no idea whether it makes any difference, but try changing the > follow

Re: [appengine-java] Re: JDO - Updating a One-to-one child

2011-04-08 Thread Luca Matteis
The MyUser entity: http://codepad.org/C2qRTTRt and the MyImage entity: http://codepad.org/xR6hhuU8 On Fri, Apr 8, 2011 at 11:00 AM, Simon Knott wrote: > Can you post the code for your MyUser and the MyImage classes as well? > > -- > You received this message because you are subscribed to the G

Re: [appengine-java] Re: JDO - Updating a One-to-one child

2011-04-08 Thread Luca Matteis
ust as I said, the object still points to the first image instead of the one added. On Fri, Apr 8, 2011 at 10:11 AM, Ian Marshall wrote: > Hi Luca, > > What's your code for > >  r.setImage(newImage) > > and anything else that might be relevant? > > Ian > > &g

Re: [appengine-java] Re: JDO - Updating a One-to-one child

2011-04-07 Thread Luca Matteis
tx.isActive())    // Because of an exception, say >          tx.rollback(); >      } >      finally >      { >        pm.close(); >      } >    } > > > On Apr 7, 3:03 pm, Luca Matteis wrote: >> This is really weird. I cannot find anything on the internet t

Re: [appengine-java] Re: JDO - Updating a One-to-one child

2011-04-07 Thread Luca Matteis
This is really weird. I cannot find anything on the internet that could help me. It seems such a simple thing to be editing child objects and I find it ridiculous that I can't find a solution. please help On Thu, Apr 7, 2011 at 11:53 AM, Luca Matteis wrote: > Well, I would think the

Re: [appengine-java] Re: JDO - Updating a One-to-one child

2011-04-07 Thread Luca Matteis
Well, I would think the Key has relationship information. The thing is that I'm able to fetch the image for the recipe, so the relationship is there somehow. It seems as if setImage() isn't enough for the linkage to update to the latest image. On Thu, Apr 7, 2011 at 11:29 AM, Simon Knott wrote: >

Re: [appengine-java] Re: JDO - Updating a One-to-one child

2011-04-07 Thread Luca Matteis
I don't see the actual Recipe being update with anything. I just see the Image being added in the Image 'table'. But from the datastore viewer there's no attribute in the Recipe 'table'. Hope that's clear. On Thu, Apr 7, 2011 at 10:58 AM, Simon Knott wrote: > If you look in the datastore admin to

Re: [appengine-java] Re: JDO - Updating a One-to-one child

2011-04-07 Thread Luca Matteis
It's the same when deployed to GAE. From the live datastore viewer I don't see the children when viewing the Recipe entity itself. The images get stored in another table called Image. Was I suppose to see a reference to the image object directly in the Recipe entity? On Thu, Apr 7, 2011 at 11:08 A

Re: [appengine-java] Re: JDO - Updating a One-to-one child

2011-04-07 Thread Luca Matteis
Hello Simon, even if I persist it doing try { r.setImage(newImage); pm.makePersistent(newImage); } finally { pm.close(); } I still get the same results. The interesting thing is that if I delete the image entity from the datastore, the recipe

[appengine-java] JDO - Updating a One-to-one child

2011-04-07 Thread Luca Matteis
I have a Recipe. Each Recipe has an image. So my entity looks something like @PersistenceCapable public class Recipe { @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key key; @Persistent private MyImage myImage; When I create the Recipe the first

Re: [appengine-java] Re: App Engine identifier. Key vs Id

2011-04-06 Thread Luca Matteis
Name="datanucleus", key="gae.pk-id", value="true") >  private Long loID; > >  // >  // Other persistent data members... >  // > >  public String getEncodedKey() >  { >    return sEncodedKey; >  } > >  public Long getID() >  { >    return loID;

[appengine-java] App Engine identifier. Key vs Id

2011-04-05 Thread Luca Matteis
To identify my JDO objects in Google App Engine I use the Key type. It works fine but when I need to pass this through urls it gets sort of long. For example: http://mysite.com/user/aghtaWx1LWFwcHIZCxIGTXlVc2VyGAMMCxIHTXlJbWFnZRgHDA When viewing my entities in my admin viewer I can see that the

Re: [appengine-java] any where i can hire people to do development on app engine in singapore?

2011-03-25 Thread Luca Matteis
Just hire good Java developers. Competent Java developers are also competent Google App Engine developers. On Wed, Mar 23, 2011 at 7:00 PM, Elvin Li wrote: > looking for competent developers > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine f

Re: [appengine-java] Re: Blobstore API vs Datastore API

2011-03-20 Thread Luca Matteis
I decided to go with datastore since I'll be storing simple thumbnail images - nothing more than 100kb. I'm a bit afraid of the 30s limit but I suppose it makes sense for Google. I work for a bioinformatics group known at global level and I'm trying to show my team the power of App Engine; hopefull

Re: [appengine-java] Re: Why does google set quotas on their API calls?

2011-03-14 Thread Luca Matteis
Ok. Thanks for the information. I'm still new at this cloud thing, and it looks great. On Mon, Mar 14, 2011 at 8:29 PM, Jay Young wrote: > Because when you do image transformations, you are sending an API to another > piece of Google's infrastructure, which I would assume is highly optimized > fo

[appengine-java] Re: Why does google set quotas on their API calls?

2011-03-14 Thread Luca Matteis
Sorry, clicked on "send" before finishing my question. Why does AppEngine set API limitations when I could just as easily use a third-party library for manipulation and avoid this limitation? Luca On Mon, Mar 14, 2011 at 8:08 PM, Luca Matteis wrote: > From the Image Java API p

[appengine-java] Why does google set quotas on their API calls?

2011-03-14 Thread Luca Matteis
>From the Image Java API page: Each Images service request counts toward the Image Manipulation API Calls quota. -- 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@googlegrou

[appengine-java] JSP error output using dev_appserver (appengine's development server)

2011-03-13 Thread Luca Matteis
When my JSP pages fail for some reason I can't find where the development server puts the error output information. Most web-servers just return a formatted HTML page showing the cause of the JSP error but the built-in development web-server appengine uses doesn't. Where can I get this information

Re: [appengine-java] Re: Blobstore API vs Datastore API

2011-03-11 Thread Luca Matteis
Is it possible to store the image directly on disk, as a resource? On 3/11/11, Simon Knott wrote: > The datastore can handle blobs with a maximum size of 1MB, whereas the > blobstore can handle blobs of 2GB. > > -- > You received this message because you are subscribed to the Google Groups > "Goo

[appengine-java] Blobstore API vs Datastore API

2011-03-11 Thread Luca Matteis
After spending almost half a day implementing the Blobstore API locally I realized only after uploading that it actually to have billing enabled in order to work. I'm not exactly happy with that because I wish the dev_appserver would've told me. Anyhow, I don't feel like giving out my credit-card t

Re: [appengine-java] Re: Blobstore Java API - people can upload whatever they want with no control

2011-03-11 Thread Luca Matteis
ng only the > logged in people be allowed to upload will already significantly > reduce spam. > > And then, you can use captchas to make sure it's a human, etc. > > regards > > didier > > On Mar 11, 1:58 pm, Luca Matteis wrote: >> So you're saying

Re: [appengine-java] Re: Blobstore Java API - people can upload whatever they want with no control

2011-03-11 Thread Luca Matteis
s and > check local files because of the sandbox. > > regards > > didier > > On Mar 11, 12:07 pm, Luca Matteis wrote: >> I have started using the Bloblstore Java >> API:http://code.google.com/appengine/docs/java/blobstore/overview.html >> >> It seems like th

[appengine-java] Blobstore Java API - people can upload whatever they want with no control

2011-03-11 Thread Luca Matteis
I have started using the Bloblstore Java API: http://code.google.com/appengine/docs/java/blobstore/overview.html It seems like the upload form goes to something like: http://groups.google.com/group/google-appengine-java?hl=en.

Re: [appengine-java] Can I set GAE's dev_appserver to automatically reload context when I change .class files?

2011-03-11 Thread Luca Matteis
tps://sites.google.com/site/slim3appengine/ > > Yasuo Higa > > On Thu, Mar 10, 2011 at 7:58 PM, Luca Matteis wrote: >> Hello everybody! >> >> I'm using Google AppEngine with their built in web server. My >> development goes about in a simple way: I make changes to my .

[appengine-java] Can I set GAE's dev_appserver to automatically reload context when I change .class files?

2011-03-10 Thread Luca Matteis
Hello everybody! I'm using Google AppEngine with their built in web server. My development goes about in a simple way: I make changes to my .java sources or .jsp and compile using ant and to see the changes I have to restart the development server. I'm wondering if there's a way I can avoid this