[appengine-java] Date, Calendar question (multiple instances of web application behaviour) clarification

2010-07-19 Thread Marcus Brody
Good day,

I would like to ask about following.

How is java.util.Date synchronized in case there is more than 1
instance of my web application.
Example:

WebAppInstance01 : I create somewhere new Date()

at the same time
WebAppInstance02: I create somewhere  new Date()

Is there some time shift ? Or those both app request some central
authority ?

Thank you,

-- 
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] is there any solution/idea how blacklist IP in realtime ?

2010-07-19 Thread Marcus Brody
Hello,

I was looking for some solution which would allow me realtime
blacklist IPs. I didnt find any.
Realtime I mean without manually getting IP and change dos.xml and
upload it.

A man can upload dos.xml to bann certain IPs. Can this be done somehow
(anyhow) programmatically, even using home computer ?

I image it would be possible to let my computer run request every 5
mins to get webapplication abusive IPs and then upload new dos.xml ?
Is this only possible solution or I am heavily missing something ? :)

Other way I came with is to update dos.xml on gae webapp and somehow
trigger it has changed so gae will notice, problem is I dont know how
or if its even possible :)

Thank you for you time,

-- 
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: App Engine integration with Google Apps Marketplace

2010-07-19 Thread l.denardo
The link to generate login URL is different for apps accounts

String appsLoginUrl = userService.getOpenIdLoginUrl(redirectTo,
loginDomain,

https://www.google.com/accounts/o8/site-xrds?hd=; +
loginDomain, attributesRequest);

loginDomain is obviously your domain, in your case the URL is
https://www.google.com/accounts/o8/site-xrds?hd=domain1.com;

Regards
Lorenzo

On Jul 15, 11:29 pm, Daniel Pascariu daniel.pasca...@gmail.com
wrote:
 Hi,

 I'm trying to enable SSO for my App Engine app in order to put it on
 the Google Marketplace.
 Let's say that I have my GAE app running atwww.example.com. When I
 publish it to the Google Marketplace, a Google Apps user (say
 us...@domain1.com) will be able to click on a link in the Google menu
 pointing to my site - something like 
 this:http://www.example.com/home?from=googledomain=domain1.com

 Now, acording to this docu (http://code.google.com/appengine/docs/java/
 users/overview.html) I should use the Users API to authenticate the
 user.
 I assume I have to use  userService.createLoginURL method somehow and
 use the domain domain1.com (which is passed as a parameter to my /
 home servlet).

 I have tried something like this:

 SetString attributesRequest = new HashSetString();
 attributesRequest.add(openid.mode=checkid_immediate);
 attributesRequest.add(openid.ns=http://specs.openid.net/auth/2.0;);
 attributesRequest.add(openid.return_to= + thisUrl);
 userService.createLoginURL(thisUrl, domain1.com, 
 https://www.google.com/accounts/o8/id;, attributesRequest);

 The probem is that the login URL which I get works for google accounts
 only (like gmail accounts) - I do not get any Google Apps page where a
 user like us...@domain1.com could login :(

 Does anybody know how I can get this working ? Or am I on the wrong
 track ?

 Many thanks for the help !!
 Daniel

-- 
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: Active transactions

2010-07-19 Thread Marcus Brody
Hi lisandrodc,

please carefully read all documents

http://code.google.com/appengine/docs/java/datastore/
and
http://www.datanucleus.org/products/accessplatform_1_1/guides/jdo/daolayer_design.html

Also many people cannot read spanish, if you would write in english
you may get more
answers.

I think you problem is that you datastore operation failed in catch
block
and since you are closing persistence manager first and then
rollbacking it
fails.

Solution:
1) read everything as carefully as possible, look at example and try
experiment.
2) in finally block rollback first and then close persistence manager

On Jul 18, 11:01 pm, lisandrodc lisandr...@gmail.com wrote:
 Hi! I have a problem with active transaction.When I try to guard in
 the datastore, says:

  La transaccion esta activo todavia. Debe cerrar las transacciones
 usando los metodos commit() o rollback().

 As closure all the transactions?
 The method is:

 PersistenceManager pm2 = JDOHelper.getPersistenceManager(fechaAgreg);

                 Transaction tx = pm2.currentTransaction();

                 try {
                         tx.begin();
                         Partido par1 = null;
                         ControladorTorneo cT= new ControladorTorneo();
                         par1 = new Partido(null, new Resultado(),
 cT.devolverEquipo( idTorneo,idEqLocal),
 cT.devolverEquipo(idTorneo,idEqVisitante), fecha, hora);

                         fechaAgreg.agregarPartido(par1);
                         pm2.makePersistent(fechaAgreg);
                         tx.commit();

                 } finally {
                         pm2.close();

                         if (tx.isActive()) {
                                 tx.rollback();
                         }
                 }

         }

 Regards

-- 
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: Active transactions

2010-07-19 Thread Marcus Brody
try follow this pattern for transactions

public void doSomthingWithEntity(T entity) {

PersistenceManager pm = getPersistenceManager();
Transaction transaction = pm.currentTransaction();

try {
transaction.begin();
//  do something with entity, get, persist, delete
//  pm.makePersistent(entity);

transaction.commit();
}
finally {
if (transaction != null  transaction.isActive())
transaction.rollback();
pm.close();
}
}

On Jul 18, 11:01 pm, lisandrodc lisandr...@gmail.com wrote:
 Hi! I have a problem with active transaction.When I try to guard in
 the datastore, says:

  La transaccion esta activo todavia. Debe cerrar las transacciones
 usando los metodos commit() o rollback().

 As closure all the transactions?
 The method is:

 PersistenceManager pm2 = JDOHelper.getPersistenceManager(fechaAgreg);

                 Transaction tx = pm2.currentTransaction();

                 try {
                         tx.begin();
                         Partido par1 = null;
                         ControladorTorneo cT= new ControladorTorneo();
                         par1 = new Partido(null, new Resultado(),
 cT.devolverEquipo( idTorneo,idEqLocal),
 cT.devolverEquipo(idTorneo,idEqVisitante), fecha, hora);

                         fechaAgreg.agregarPartido(par1);
                         pm2.makePersistent(fechaAgreg);
                         tx.commit();

                 } finally {
                         pm2.close();

                         if (tx.isActive()) {
                                 tx.rollback();
                         }
                 }

         }

 Regards

-- 
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: rename a app-id

2010-07-19 Thread Marcus Brody
create new app with your desired ID and forward all request :P

On Jul 18, 3:34 pm, aswath satrasala aswath.satras...@gmail.com
wrote:
 I do not want to delete the app.  I have user data.

 -Aswath

 On Sun, Jul 18, 2010 at 6:57 PM, jacek.ambroziak
 jacek.ambroz...@gmail.comwrote:

  Not really, but you can delete the app
  and after it is gone
  create a new one with the (available) name you want

  On Jul 18, 12:02 am, aswath satrasala aswath.satras...@gmail.com
  wrote:
   Hello,
   Is there any way I can rename my app-id.

   -Aswath

  --
  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.comgoogle-appengine-java%2bunsubscr...@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.



Re: [appengine-java] JCache

2010-07-19 Thread Hariharan Anantharaman
As long as the objects are serializable, I believe we can store them in
jcache.

~hari

On Jul 19, 2010 9:15 AM, pdias paulojorged...@gmail.com wrote:

Is possible to save object instances using JCache?

I have tried and received the following message:
javax.servlet.ServletException: java.lang.IllegalArgumentException:
can't accept class CLASSNAME as a memcache entity

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.comgoogle-appengine-java%2bunsubscr...@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] error when persist more than 1 object

2010-07-19 Thread senderj
I am trying to learn GAE by writing simple java programs. This is the
coding I use to try JPA:

EntityManager em = null;
try {
em = EMF.get().createEntityManager();
int i = 6;
Trade5min t5 = new Trade5min();
t5.setStkCode(i);
t5.settDate(2010-07-15);
t5.setTradeRec(this is trec of +i);
em.persist(t5);
} finally {
   em.close();
   resp.getWriter().println(TestWrite done);
}

It works. I can see the persisted records in datastore, and showed
TestWrite done on the browser.

However, if I add a second persist:
EntityManager em = null;
try {
em = EMF.get().createEntityManager();
int i = 6;
Trade5min t5 = new Trade5min();
t5.setStkCode(i);
t5.settDate(2010-07-15);
t5.setTradeRec(this is trec of +i);
em.persist(t5);
i++;
t5 = new Trade5min();
t5.setStkCode(i);
t5.settDate(2010-07-15);
t5.setTradeRec(this is trec of +i);
em.persist(t5);
} finally {
   em.close();
   resp.getWriter().println(TestWrite done);
}

It gives out warning:
handleAbandonedTxns: Request completed without committing or rolling
back
and then PersistenceException: Illegal argument at em.close().
Anybody know what's wrong with my coding?

-- 
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] JDO creates entities when I don't ask it to

2010-07-19 Thread Hariharan Anantharaman
Where do u commit the transaction? I hope it is not after saving of A. Could
you confirm if B and A are persisted and committed seperately and
independent of each other.

Thanks
Hari

On Jul 19, 2010 9:15 AM, pbadn doug...@poweredbyalt.net wrote:

I am having a problem that is confusing me.

I have two entities, A and B.  Both have user-assigned numeric ids and
A refers to an instance of B.  So I have a process like this:

B b = new B();
b.setId(1);

// save b

A a = new A();
a.setId(1);

B b2 = DAL.getBById(1);
a.setB(b2);

// save a

DAL.getBById is a method that returns an instance of B by the id given
to it.  However, when I do this, a second instance of B is created.
So I should have an instance of A and an instance of B that is
referred to by A.  But what I have is an instance of A and two
instances of B.
Is this a common mistake?  I am new to GAE/J and JDO.

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.comgoogle-appengine-java%2bunsubscr...@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] Re: About Google App Engine Google API

2010-07-19 Thread Tan Duy
Hi there,
Now, I think that I should create an application on GAE.
It will list some libraries on Google Map. We can search, look for
books and make friends with book-lovers at somewhere near you.
I'll try to use Google Web Toolkit in my project and some another
Google APIs.
This project will serve all people.
I need some helps.

On Jul 19, 11:51 am, Khor Yong Hao fyh...@gmail.com wrote:
 Is you meant that you want to create another SNS that consisted of all
 members of google appengine java group?

-- 
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: Unable to execute query for a large number of entities

2010-07-19 Thread Simon
I believe (and this may be wrong) that the index data is only created
when the object is inserted/updated.  Therefore, any existing data
will be not covered by the new index and won't be retrieved with any
queries which are based upon the index.

Updating them or reuploading them should solve the issue.

On Jul 16, 9:18 am, Ice13ill andrei.fifi...@gmail.com wrote:
 I created and uploaded an index for those 2 params:

     datastore-index kind=DbAddressEntry ancestor=false
 source=auto
         property name=parent direction=asc /
         property name=type direction=asc /
     /datastore-index

 After building it i can now execute the query i needed, but i have
 another problem: the retrieved data is incomplete :(
 I run an GQL query in Datastore viewer and the data is there, it seems
 that the app engine sdk does not serve it even with the composite
 indexes.
 Could it help if I reupload the data ? Or if i use low level api to
 get the entities ? (theoretically, it should work right? because it
 seams that the information is not indexed as it should)

 On Jul 15, 6:28 pm, Ice13ill andrei.fifi...@gmail.com wrote:



  I uploaded about 100.000 entities into datastore and I need to execute
  a type of query that shouldn't require composite indexes.
  But i get this:

  The built-in indices are not efficient enough for this query and your
  data. Please add a composite index for this query..  An index is
  missing but we are unable to tell you which one due to a bug in the
  App Engine SDK

  My entity has three fields (String): type, value, parent so i created
  an index like this:

  datastore-indexes autoGenerate=true
     datastore-index kind=DbAddressEntry ancestor=false
  source=auto
          property name=value direction=asc /
          property name=parent direction=asc /
          property name=type direction=asc /
      /datastore-index
  /datastore-indexes

  The query uses only equality filters but sometimes only 2 params are
  used (type and value, let's say)

  Does that meen that i have to create another index ?
  Or can something else help ?- Hide quoted text -

 - Show quoted text -

-- 
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: JCache

2010-07-19 Thread pdias
Yes it needs to be “serializable”.
Thanks for your answer.
pdias

On 19 Jul, 09:30, Hariharan Anantharaman
hariharan.ananthara...@gmail.com wrote:
 As long as the objects are serializable, I believe we can store them in
 jcache.

 ~hari

 On Jul 19, 2010 9:15 AM, pdias paulojorged...@gmail.com wrote:

 Is possible to save object instances using JCache?

 I have tried and received the following message:
 javax.servlet.ServletException: java.lang.IllegalArgumentException:
 can't accept class CLASSNAME as a memcache entity

 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.comgoogle-appengine-java%2B 
 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] Share session between 3rd party domain (google apps) and appspot.com?

2010-07-19 Thread Just
Hi,

is it possible to share the session between a google apps domain and
appspot.com?
I wanted to use the ssl of appspot.com for secure login and the
redirect back to regular domain.

Regards

-- 
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] Must only return a redirect from a Blobstore upload callback??? What does it mean?

2010-07-19 Thread salvatore
Hi all!

I have two jsp,
-one whith a form for upload a file
-one for managing upload

But, stil the upload goes fine , I recive this warning


19-lug-2010 12.11.15
com.google.appengine.api.blobstore.dev.UploadBlobServlet$3$2 write
GRAVE: Must only return a redirect from a Blobstore upload callback.
19-lug-2010 12.11.15 com.google.apphosting.utils.jetty.JettyLogger
warn
AVVERTENZA: Committed before 500 Expected a redirect, tried to write
content instead.
19-lug-2010 12.11.15 com.google.apphosting.utils.jetty.JettyLogger
warn

what does it mean?

-- 
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] task queues and retries

2010-07-19 Thread Fabrizio Accatino
AFAIK if you don't catch exceptions, you'll get HTTP 500 error.
Can you post your code?
Are you sure that you do not try/catch the exception?

fabrizio


On Mon, Jul 19, 2010 at 12:38 AM, Philip Tucker ptuc...@gmail.com wrote:

 One of my tasks encountered a failure and wasn't retried. I think it's
 because the servlet returned a 200 response, but I don't know why it
 did since the exception bubbled all the way up to the base servlet. Do
 we need to explicitly return a 5xx error code in exception cases for
 retries to work?

 07-18 02:46PM 06.907 /cleanerq 200 29515ms 9156cpu_ms 5404api_cpu_ms
 0kb AppEngine-Google; (+http://code.google.com/appengine)
 0.1.0.2 - - [18/Jul/2010:14:46:36 -0700] POST /cleanerq HTTP/1.1 200
 0 http://11.latest.wordwisegame.appspot.com/starttasks; AppEngine-
 Google; (+http://code.google.com/appengine)
 11.latest.wordwisegame.appspot.com ms=29516 cpu_ms=9157
 api_cpu_ms=5404 cpm_usd=0.254392 queue_name=cleaner-queue
 task_name=5681724147391472665 exit_code=104

 ...

-- 
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] C++ in GAE

2010-07-19 Thread Gal Dolber
No...

2010/7/18 otuyama otuy...@gmail.com

 Hello,
 Is it possible to compile C++ code in JVM bytecode? I would like to
 run
 legacy code in Google App Engine for Java. Of course, C++ and Java
 libs will
 be incompatible, but it could be fixed with wrapper libs.
 Thanks.
 Julio

 --
 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.comgoogle-appengine-java%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-appengine-java?hl=en.




-- 
http://ajax-development.blogspot.com/

-- 
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] How to close an object before second transaction?

2010-07-19 Thread coltsith
Here's the psudo-code for one of my methods:


1. Get PersistenceManager (pm)

2. pm.fetchObject1

3. pm.beginTransaction

4. pm.modifyObject1

5. pm.commit

6. pm.fetchObject2

7. pm.beginTransaction

8. pm.modifyObject2

9. pm.commit

however I get this error can't operate on multiple entity groups in a
single transaction...

Do I have to put another line in between step 5 and 7 saying that I'm
'done' with object1, like to close it?

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] Length of member variable names contributes to storage space used?

2010-07-19 Thread Mark
Hi,

I read in a post that the length of member variable names contributes
to the amount of storage space your app uses, example:

class Farm {
private String mFarmersFavoriteCropToPlant;
}

would take more space to store than:

class Farm {
private String m;
}

might not matter for a handful of instances, but if I have thousands
of records... is this true?

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] Re: is there any solution/idea how blacklist IP in realtime ?

2010-07-19 Thread John Patterson
I believe some people maintain their own request count by ip address  
using memcache and restrict access using a filter.


On 19 Jul 2010, at 20:09, Marcus Brody wrote:



I am missing something ? So you guys are sitting in web console and
watch
how many requests came from given IP address ? This has to be done
automatically ... somehow.

--
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=en.



[appengine-java] Re: PDF Files

2010-07-19 Thread chrischelmi
yes exatky

On Jul 18, 1:12 pm, Khor Yong Hao fyh...@gmail.com wrote:
 Your Problem is not using iText to generate PDF content and download it, but
 is able to allow user upload their own PDF and providing download, right?

 On Thu, Jul 15, 2010 at 3:25 PM, dovm dovm...@gmail.com wrote:
  Hi,

  Check this one
 http://www.pdfjet.com/java/index.html

  They claim to support Google App Engine

  =Dov

  On Jul 15, 7:57 am, Daniel vedm...@gmail.com wrote:
   But it says that on Will it play in App Engine

   That its incompatible:

   iText
   Version(s): ?
   Status: INCOMPATIBLE

       * iText relies on several classes not in the JRE class whitelist
   including java.awt.Color and java.nio.MappedByteBuffer. A bug has been
   filed athttp://
  sourceforge.net/tracker/?func=detailatid=365255aid=2810312g

   On Jul 15, 7:51 am, Shyam Visamsetty shyamsunder...@gmail.com wrote:

Chris,

Did you want to generate a PDF File on the GAE?
If yes, you can use the iText library for generating the pdfs on the
app engine. You can have a servlet to download the PDF file you
generated.

Thanks,
Shyam Visamsetty

On Jul 14, 1:36 pm, chrischelmi michelvo...@gmail.com wrote:

 Helle every body,
 I am working on a Google App Engine Project that consists of
  uploading
 PDF files and displaying it after.
 I use a Blob to store the PDF file
 i want to do a process to download this PDF file by giving the a
 specifics name.
 Is there a way to generaye PDF files with GAE?
 i have a process to display the PDF but i want to download it direcly
 from an URL.

  --
  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.comgoogle-appengine-java%2bunsubscr...@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] Re: PDF Files

2010-07-19 Thread chrischelmi
You are right conor, i set the content to application/pdf and i cand
display it. but my problem is that in some browsers and OS(Mac) ,the
pdf is not displyed, the download starts automatically with a default
name, i want to have control on the name given to the file before it
is downloaded





On Jul 18, 6:44 pm, Conor Power iamco...@gmail.com wrote:
 it doesn't sound like you need to generate the PDF using a library if it's
 stored as a blob ... can't you just set the content type to be
 application/pdf and stream the blog contents?

 your servlet just needs the key or some mapping to look up the blob.

 otherwise, i wrote a summary of my experiences with PDF generation a while
 ago:

 http://conorjpower.com/2010/01/11/pdf-generation-in-java/

 C

 On Sun, Jul 18, 2010 at 5:12 AM, Khor Yong Hao fyh...@gmail.com wrote:

  Your Problem is not using iText to generate PDF content and download it,
  but is able to allow user upload their own PDF and providing download,
  right?

  On Thu, Jul 15, 2010 at 3:25 PM, dovm dovm...@gmail.com wrote:

  Hi,

  Check this one
 http://www.pdfjet.com/java/index.html

  They claim to support Google App Engine

  =Dov

  On Jul 15, 7:57 am, Daniel vedm...@gmail.com wrote:
   But it says that on Will it play in App Engine

   That its incompatible:

   iText
   Version(s): ?
   Status: INCOMPATIBLE

       * iText relies on several classes not in the JRE class whitelist
   including java.awt.Color and java.nio.MappedByteBuffer. A bug has been
   filed athttp://
  sourceforge.net/tracker/?func=detailatid=365255aid=2810312g

   On Jul 15, 7:51 am, Shyam Visamsetty shyamsunder...@gmail.com wrote:

Chris,

Did you want to generate a PDF File on the GAE?
If yes, you can use the iText library for generating the pdfs on the
app engine. You can have a servlet to download the PDF file you
generated.

Thanks,
Shyam Visamsetty

On Jul 14, 1:36 pm, chrischelmi michelvo...@gmail.com wrote:

 Helle every body,
 I am working on a Google App Engine Project that consists of
  uploading
 PDF files and displaying it after.
 I use a Blob to store the PDF file
 i want to do a process to download this PDF file by giving the a
 specifics name.
 Is there a way to generaye PDF files with GAE?
 i have a process to display the PDF but i want to download it
  direcly
 from an URL.

  --
  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.comgoogle-appengine-java%2bunsubscr...@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.comgoogle-appengine-java%2bunsubscr...@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] Re: App Engine integration with Google Apps Marketplace

2010-07-19 Thread l.denardo
I don't know if there are any differences, since I never tried the
other way.

I'll try to investigate in the next days, but I think this could be
helpful for things such as https redirect and similar issues.
Maybe a word from GAE team will help (anyway, some blog posts about
OpenID have been announced, so I think we'll be informed soon about
everything).

regards
Lorenzo

On Jul 19, 3:52 pm, Daniel Pascariu daniel.pasca...@gmail.com wrote:
 Hi Lorenzo,

 Thanks for taking the time to help !

 I tried to call userService.createLoginURL with federatedIdentity =
 https://www.google.com/accounts/o8/site-xrds?hd=domain1.com; as you
 suggested and it seems to work :)

 But it also works with federatedIdentity = 'domain1.com !

 The produced URLs are slightly different, but the outcome seems the
 same - I can login to domain1.com using user1 (on google apps).
 I'm wondering if there's any subtle difference between the OpenId
 authentification in the two cases - do you know ?

 Thanks,
 Daniel

 On Jul 19, 9:43 am, l.denardo lorenzo.dena...@gmail.com wrote:

  The link to generate login URL is different for apps accounts

  String appsLoginUrl = userService.getOpenIdLoginUrl(redirectTo,
  loginDomain,
                                                  
  https://www.google.com/accounts/o8/site-xrds?hd=; +
  loginDomain, attributesRequest);

  loginDomain is obviously your domain, in your case the URL is
  https://www.google.com/accounts/o8/site-xrds?hd=domain1.com;

  Regards
  Lorenzo

  On Jul 15, 11:29 pm, Daniel Pascariu daniel.pasca...@gmail.com
  wrote:

   Hi,

   I'm trying to enable SSO for my App Engine app in order to put it on
   the Google Marketplace.
   Let's say that I have my GAE app running atwww.example.com. When I
   publish it to the Google Marketplace, a Google Apps user (say
   us...@domain1.com) will be able to click on a link in the Google menu
   pointing to my site - something like 
   this:http://www.example.com/home?from=googledomain=domain1.com

   Now, acording to this docu (http://code.google.com/appengine/docs/java/
   users/overview.html) I should use the Users API to authenticate the
   user.
   I assume I have to use  userService.createLoginURL method somehow and
   use the domain domain1.com (which is passed as a parameter to my /
   home servlet).

   I have tried something like this:

   SetString attributesRequest = new HashSetString();
   attributesRequest.add(openid.mode=checkid_immediate);
   attributesRequest.add(openid.ns=http://specs.openid.net/auth/2.0;);
   attributesRequest.add(openid.return_to= + thisUrl);
   userService.createLoginURL(thisUrl, domain1.com, 
   https://www.google.com/accounts/o8/id;, attributesRequest);

   The probem is that the login URL which I get works for google accounts
   only (like gmail accounts) - I do not get any Google Apps page where a
   user like us...@domain1.com could login :(

   Does anybody know how I can get this working ? Or am I on the wrong
   track ?

   Many thanks for the help !!
   Daniel

-- 
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: Entity relationship table

2010-07-19 Thread Nacho Coloma
My 2 cents: if all your users are of type Person and it's a root
entity, you can also save some space by storing Key ids instead of Key
instances (you save the redundant type name etc).

On Jul 19, 5:53 am, Ikai L (Google) ika...@google.com wrote:
 The best practice is probably to create list properties with Keys
 representing friend IDs. This is a good video to watch:

 http://www.youtube.com/watch?v=AgaL6NGpkB8





 On Fri, Jul 16, 2010 at 8:03 AM, dmetri333 dmetri...@gmail.com wrote:
  Im relatively new too GAE and the Datastore, and i had a question on
  the best way to setup some entities.

  I have created a entity called 'Person' and this person has a list of
  friends in the system that are also of type 'Person'.  In SQL i would
  have created a simple linker/relationship table with 2 fields
  (person_id, friend_id), both referring to the same id from the
  'Person' table.

  I was wondering what the best practice for doing this with GAE and
  bigtable.

  demetri

  --
  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.comgoogle-appengine-java%2B 
  unsubscr...@googlegroups.com
  .
  For more options, visit this group at
 http://groups.google.com/group/google-appengine-java?hl=en.

 --
 Ikai Lan
 Developer Programs Engineer, Google App Engine
 Blog:http://googleappengine.blogspot.com
 Twitter:http://twitter.com/app_engine
 Reddit:http://www.reddit.com/r/appengine

-- 
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: java.net.InetAddress and logback 0.9.21

2010-07-19 Thread Juan Hernandez
I'm running into the same issue (I'm using logback 0.9.21).

I tried to configure Logback manually using the JoranConfigurator.

Well, I started extending the JoranConfigurator trying to avoid the
call to the method ContextUtil.addHostNameAsProperty() in the
ConfigurationAction class that is the one causing the issue but it
looked I needed to extend a few classes and started to look messy.

At the end I took a different approach. Just created the ContextUtil
class in my webapp project in the same package as the original one so
mine would be picked instead of the other.

This is the code I put for that class ... (basically removing the use
of java.net.InetAddress class)

package ch.qos.logback.core.util;

import ch.qos.logback.core.Context;
import ch.qos.logback.core.CoreConstants;
import ch.qos.logback.core.spi.ContextAwareBase;

public class ContextUtil extends ContextAwareBase {

public ContextUtil(Context context) {
setContext(context);
}

/**
 * Add the local host's name as a property
 */
public void addHostNameAsProperty() {
context.putProperty(CoreConstants.HOSTNAME_KEY, yourhostname);
}
}

Hope it helps.


On May 21, 3:28 am, Sean seanhor...@gmail.com wrote:
 I've posted the same question over on the logback forum but I wanted
 to check here to see who is using SLF4J/logback with GAE:

 http://old.nabble.com/Google-App-Engine-and-java.net.InetAddress-ts28...

 Question is posted here again:

 I'm trying to hook up slf4j/logback into a Google App Engine project
 but it looks like I'm running into a problem with a class that GAE
 blocks, namely java.net.InetAddress.  I'm using the latest: slf4j
 1.6.0 and logback 0.9.21, tied into v1.3.3.1 of the AppEngine SDK and
 here is my java version:

 * java version 1.6.0_18
 * OpenJDK Runtime Environment (IcedTea6 1.8) (6b18-1.8-0ubuntu1)
 * OpenJDK 64-Bit Server VM (build 14.0-b16, mixed mode)

 If I don't include a logback.xml, my gae dev server starts up properly
 and I see my log messages printed to the console.

 The place in *my* code where the failure happens is in the very first
 call to grab the logger, in
 com.cosanta.eventflow.control.EventServletContextListener:43, which is
 just:

         private org.slf4j.Logger logger =
 org.slf4j.LoggerFactory.getLogger(this.getClass().getName());

 I took the logback.xml right out of the examples: logback-examples/src/
 main/java/chapters/configuration/sample0.xml:

 ?xml version=1.0 encoding=UTF-8 ?
 configuration

   appender name=STDOUT
     class=ch.qos.logback.core.ConsoleAppender
     !-- encoders are assigned by default the type
          ch.qos.logback.classic.encoder.PatternLayoutEncoder --
     encoder
       pattern%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg
 %n/pattern
     /encoder
   /appender

   root level=debug
     appender-ref ref=STDOUT /
   /root
 /configuration

 When I try to start the GAE dev server from my eclipse workspace, I
 get the following printed to the console:

 May 21, 2010 1:25:05 AM
 com.google.apphosting.utils.config.AbstractConfigXmlReader
 readConfigXml
 INFO: Successfully processed /home/sean/Dropbox/dev/workspace/
 EventFlow/war/WEB-INF/web.xml
 Failed to instantiate [ch.qos.logback.classic.LoggerContext]
 Reported exception:
 java.lang.NoClassDefFoundError: java.net.InetAddress is a restricted
 class. Please see the Google  App Engine developer's guide for more
 details.
         at
 com.google.appengine.tools.development.agent.runtime.Runtime.reject(Runtime 
 .java:
 51)
         at
 ch.qos.logback.core.util.ContextUtil.addHostNameAsProperty(ContextUtil.java :
 34)
         at
 ch.qos.logback.classic.joran.action.ConfigurationAction.begin(Configuration 
 Action.java:
 47)
         at
 ch.qos.logback.core.joran.spi.Interpreter.callBeginAction(Interpreter.java:
 273)
         at
 ch.qos.logback.core.joran.spi.Interpreter.startElement(Interpreter.java:
 145)
         at
 ch.qos.logback.core.joran.spi.Interpreter.startElement(Interpreter.java:
 127)
         at
 ch.qos.logback.core.joran.spi.EventPlayer.play(EventPlayer.java:40)
         at
 ch.qos.logback.core.joran.spi.Interpreter.play(Interpreter.java:332)
         at
 ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurat 
 or.java:
 126)
         at
 ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurat 
 or.java:
 93)
         at
 ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurat 
 or.java:
 52)
         at
 ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextI 
 nitializer.java:
 60)
         at
 ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitialize 
 r.java:
 121)
         at
 org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:85)
         at
 org.slf4j.impl.StaticLoggerBinder.clinit(StaticLoggerBinder.java:
 55)
         at org.slf4j.LoggerFactory.bind(LoggerFactory.java:121)
         at
 

[appengine-java] local_db does not exist; cannot store persistent data

2010-07-19 Thread Erencie
I use Google app Engine plugin for Eclipse and managed to make the
guestbook demo run successfuly. When I create my own app by
following the code pattern of guestbook, sth weird happens:

Jul 19, 2010 6:08:46 AM
com.google.appengine.api.datastore.dev.LocalDatastoreService load
INFO: The backing store, D:\Eclipse workspace\TeammateV0.0\war\WEB-INF
\appengine-generated\local_db.bin, does not exist. It will be created.


I noticed that in /war/WEB-INF/appengine-generated folder, there is
only datastore-indexes-auto.xml, but no local_db.bin file exists,
unlike the case in the demo guestbook project.

And I find that I cannot store anything persistent objects, even
though I follow the correct codes in tutorials. However, the whole
thing runs without any errors.


I tried diff configurations in the few xml files, and tried using
transactions as well. I did also closed the persistentFactory. But
nothing changes.

Can anyone help me?Thanks a lot.

-- 
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: Roo + GWT + Security on AppEngine

2010-07-19 Thread ondrej
 2) i had some issues with static files, spring security doesnt protect
 static html files.

I do have similar problem. Spring security works pretty fine for me,
but I cannot understand why I can't limit access to HTML host page.
The current situation is that my application starts and I have to
handle login problem in gwt code by myself.

I'd prefer Spring security to handle this, so when user is not logged,
and try to load my /Application.html, he/she is automatically
redirected to login page, and no gwt entry-point code is launched
until user is logged in.

This behavior is working very fine for dynamically (by servlet)
generated content (such as JSP pages), but the filter chain seems not
to be applied to to static (e.g. HTML) resources.

For example:

When this is set in config file:

intercept-url pattern=/secured/** access=ROLE_ADMIN /

and I try to access /secured/administration.jsp Spring security
rejects access correctly. But when I try to access /secured/index.html
and the file exists, seems that no Spring filter chain is applied and
the file is displayed.

Is there a way how to configure Spring security to deny access to
static files when user is not logged in?

-- 
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] Updated Eclipse Plugin ?

2010-07-19 Thread Navaneeth Krishnan
I tried out the latest version of the eclipse plugin for GAE

http://code.google.com/appengine/docs/java/gettingstarted/installing.html

to realize that the bundled app engine version is 1.3.3. If there any
plan to upgrade it to the latest SDK (1.3.5) ?

When can we expect a new release ?

Also, is there a way to manually upgrade the eclipse plugin ?


-- 
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: Geomodel in Java

2010-07-19 Thread Mahsa
Now, I am trying to use the proximity search in Geomodel. However, I
am facing a problem, which I am not sure what it is, but I think it is
related to either my PersistentManager or baseQuery. I ran the query,
however, while my database is not empty, I got null results.

public class HowToUseGeocell extends TestCase {
...

public int ProximitySearch(double lat, double lon, double distance) {

Point center = new Point(lat, lon);
ListObjectToSave objects = null;
PersistenceManager pm = PMF.get().getPersistenceManager();

   try{
ListObject params = new ArrayListObject();
params.add(Mahsa);
GeocellQuery baseQuery = new GeocellQuery(Owner ==
OwnerParam, String OwnerParam, params);


try {
objects = GeocellManager.proximityFetch(center, 40,
distance, ObjectToSave.class, baseQuery, pm);
Assert.assertTrue(objects.size()  0);
} catch (Exception e) {
// We catch excption here because we have not
configured the PersistentManager (and so the queries won't work)
}


} finally {
pm.close();
}


if (objects == null)
return -3;

else
return objects.size();


}

}


Here is my ObjectToSave class:


@PersistenceCapable(detachable=true)
public class ObjectToSave implements LocationCapable {

@PrimaryKey
@Persistent
private long id;

@Persistent
private double latitude;

@Persistent
private double longitude;

@Persistent
private double altitude;

@Persistent
private ListString geocells;

@Persistent
private String owner;

public long getId() {
return id;
}

public void setId(long id) {
this.id = id;
}

public double getLatitude() {
return latitude;
}

public void setLatitude(double latitude) {
this.latitude = latitude;
}

public double getLongitude() {
return longitude;
}

public void setLongitude(double longitude) {
this.longitude = longitude;
}

public double getAltitude() {
return altitude;
}

public void setAltitude(double alt) {
this.altitude = alt;
}

public ListString getGeocells() {
return geocells;
}

public void setGeocells(ListString geocells) {
this.geocells = geocells;
}

public String getKeyString() {
return Long.valueOf(id).toString();
}

public Point getLocation() {
return new Point(latitude, longitude);
}

public String getOwner() {
return owner;
}

public void setOwner(String o) {
this.owner = o;
}


}


My PMF class:

public final class PMF {
private static final PersistenceManagerFactory pmfInstance =
JDOHelper.getPersistenceManagerFactory(transactions-
optional);

private PMF() {}

public static PersistenceManagerFactory get() {
return pmfInstance;
}
}


My Servlet:

@SuppressWarnings(serial)
public class Test8_Geomodel_GAEServlet extends HttpServlet {

//  public static UseGeocell GC = new UseGeocell();
//public final static PersistenceManagerFactory pmfInstance =
JDOHelper.getPersistenceManagerFactory(transactions-optional);

public void doGet(HttpServletRequest req, HttpServletResponse resp)
throws IOException {


doPost(req, resp);

//  resp.setContentType(text/plain);
//  resp.getWriter().println(Hello, world);
}



public void doPost(HttpServletRequest req, HttpServletResponse resp)
throws IOException {

HowToUseGeocell gc = new HowToUseGeocell();
ListObjectToSave obj = new ArrayListObjectToSave();


//Read Excel source file (which is defined in web.xml file) 
store it in datastore
ServletContext context = getServletContext();

String file_path = context.getRealPath(LiDAR.xls);
File Myfile = new File(file_path);


Workbook workBook;
int PointNo;
double latitude = 0.0, longitude = 0.0, altitude = 0.0;
String owner = ;

try {

workBook = Workbook.getWorkbook(Myfile);
Sheet sheet = workBook.getSheet(0);

int NumOfColumns = sheet.getColumns();
int NumOfRows = sheet.getRows();

String data;
for(int row = 1; row  NumOfRows; row++) {
for(int col = 0; col  NumOfColumns; col++) {
data = sheet.getCell(col, row).getContents();

data = sheet.getCell(0, 
row).getContents();
PointNo = 
Integer.parseInt(data.toString());


Re: [appengine-java] local_db does not exist; cannot store persistent data

2010-07-19 Thread Ronmell Fuentes
Hello Erencie.

have you tried to save persistence objects in data store? and have you tried
to retrieve all data saved in your data store?
does it show any error?

are you using something like JUnit or something besides the code shown in
google tutorials?

Rgds.

R

2010/7/19 Erencie xiaoni@gmail.com

 I use Google app Engine plugin for Eclipse and managed to make the
 guestbook demo run successfuly. When I create my own app by
 following the code pattern of guestbook, sth weird happens:

 Jul 19, 2010 6:08:46 AM
 com.google.appengine.api.datastore.dev.LocalDatastoreService load
 INFO: The backing store, D:\Eclipse workspace\TeammateV0.0\war\WEB-INF
 \appengine-generated\local_db.bin, does not exist. It will be created.


 I noticed that in /war/WEB-INF/appengine-generated folder, there is
 only datastore-indexes-auto.xml, but no local_db.bin file exists,
 unlike the case in the demo guestbook project.

 And I find that I cannot store anything persistent objects, even
 though I follow the correct codes in tutorials. However, the whole
 thing runs without any errors.


 I tried diff configurations in the few xml files, and tried using
 transactions as well. I did also closed the persistentFactory. But
 nothing changes.

 Can anyone help me?Thanks a lot.

 --
 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.comgoogle-appengine-java%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-appengine-java?hl=en.




-- 
ausencia de evidencia  ≠  evidencia de ausencia
http://culturainteractiva.blogspot.com/

-- 
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: is there any solution/idea how blacklist IP in realtime ?

2010-07-19 Thread Marcus Brody
Yes, I already have such solution, but It still
does eat some resources (minimal if written correctly)

But thank for answer John,
only think I am afraid I wake up and my dayly budged will be eaten
by some kind of dos attack done while I was sleeping, I still think
since you can upload dos.xml very quickly there has to be some
mechanism how to automate it.

Anyone has some pros/cons of my ideas ?

On Jul 19, 3:56 pm, John Patterson jdpatter...@gmail.com wrote:
 I believe some people maintain their own request count by ip address  
 using memcache and restrict access using a filter.

 On 19 Jul 2010, at 20:09, Marcus Brody wrote:



  I am missing something ? So you guys are sitting in web console and
  watch
  how many requests came from given IP address ? This has to be done
  automatically ... somehow.

  --
  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 
  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] next gen queries

2010-07-19 Thread pac
In Alfred Fuller's presentation (http://www.youtube.com/watch?
v=ofhEyDBpngMfeature=channel), he mentioned that limit of 5000 list
items and need for number of composite indexes for list (i.e. 2 value
search from list, 3 value search from list etc) will be removed. As
per video, I think he mentioned that functionality is nearly in place.

At this stage, is it possible to give an approx idea when can we
expect this one 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=en.



[appengine-java] App Engine Java servlet clearing my Content-type Header for form POST from python

2010-07-19 Thread Jean Hsu
Hi,

I'm running a servlet on Google App Engine.  When I try to post multi-
part form data to the url from a python script, locally it works, but
when I deploy to app engine, it complains that the content-type header
is null.

When I print out the content type header to my logs, it is indeed
correct when run locally (multipart/form-data; boundary.) but
null when run on app engine.

Is App Engine clearing certain headers?

Here's the stack trace when deployed to appengine:

org.apache.commons.fileupload.FileUploadBase
$InvalidContentTypeException: the request doesn't contain a multipart/
form-data or multipart/mixed stream, content type header is null at
org.apache.commons.fileupload.FileUploadBase$FileItemIteratorImpl.
(FileUploadBase.java:885) at
org.apache.commons.fileupload.FileUploadBase.getItemIterator(FileUploadBase.java:
331) at
org.apache.commons.fileupload.FileUploadBase.parseRequest(FileUploadBase.java:
349) at
org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(ServletFileUpload.java:
126)


Thanks!
Jean

-- 
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] Persistence manager for all system

2010-07-19 Thread lisandrodc
Hi! I have a  doubt of since administering a Persistence manager for
an application(for example web). When close the persistence manager?
When commit the transaction? The pattern singleton the example?
Because if I continue the help of google, the pattern, close a
persitence manager, for example:

 PersistenceManager pm = PMF.get().getPersistenceManager();

Employee e = new Employee(Alfred, Smith, new Date());

try {
pm.makePersistent(e);
} finally {
pm.close(); //I accede again for the system, it is going
to give mistake because it is closed
}

The standard errors that happen to me are:

1- Object whit id model.fe...@cf17c3 is handled for other
ObjectManager.
2-The persistent manager is closed.
3- The transaction is active still. You must close the transactions
using the methods
 commit() o rollback().

Regards

-- 
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] PMF.get().getPersistenceManager() freezes after restart

2010-07-19 Thread bradr
We are seeing some strange behavior... after we stop/restart the dev
server it freezes when trying to get an instance of the
PersistenceManager.

Steps to repeat:
1) We execute a query similar to the AppEngine example:
http://code.google.com/appengine/docs/java/datastore/queriesandindexes.html#Introducing_Queries
2) It returns about 480 entities
3) We stop the server using the Eclipse console
4) We restart the server and attempt to run the same Query
5) It hangs at PMF.get().getPersistenceManager();

We put in output statements to verify, and it doesn't output the
second string and in firebug we just see the RPC request hang...
 System.out.println(getting PMF);
 PMF.get().getPersistenceManager();
 System.out.println(got PMF);

Has anyone experienced similar issues? We are running Eclipse Helios
with AppEngine 1.3.5, GWT 2.0.4, JDK 1.6_20 and the newest Google
Eclipse Plugin. We tested on Ubuntu and Windows 7 and got the same
results.

-- 
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] Updated Eclipse Plugin ?

2010-07-19 Thread Hariharan Anantharaman
From your eclipse itself(having an older version of gae), you can update to
latest version by using software updates option in elclipse.

Thanks
Hari

On Jul 19, 2010 9:39 PM, Navaneeth Krishnan navaneeth.cont...@gmail.com
wrote:

I tried out the latest version of the eclipse plugin for GAE

http://code.google.com/appengine/docs/java/gettingstarted/installing.html

to realize that the bundled app engine version is 1.3.3. If there any
plan to upgrade it to the latest SDK (1.3.5) ?

When can we expect a new release ?

Also, is there a way to manually upgrade the eclipse plugin ?


--
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.comgoogle-appengine-java%2bunsubscr...@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] Re: Dance Dance Robot error / Channel API

2010-07-19 Thread Daniel Guermeur
Thanks for the tip about channel.js. This is what I needed.

Now I get an error when pushing a message to a client. I get this:

com.google.appengine.api.channel.ChannelFailureException: An
unexpected error occurred.
Caused by: com.google.apphosting.api.ApiProxy$ApplicationException:
ApplicationError: 2:

Here is the stack trace. Let me know of any ideas you might have.

Thanks!
Daniel


SEVERE: Failed to push the message
com.metadot.book.stalkrapp.shared.mess...@1010a3b to client channel-
a4kt0t-stalkrappt...@example.com-1
com.google.appengine.api.channel.ChannelFailureException: An
unexpected error occurred.
at
com.google.appengine.api.channel.ChannelServiceImpl.sendMessage(ChannelServiceImpl.java:
59)
at
com.metadot.book.stalkrapp.server.PushServer.sendMessageToOneUser(PushServer.java:
82)
at
com.metadot.book.stalkrapp.server.FriendsServiceImpl.getFriend(FriendsServiceImpl.java:
283)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
com.google.appengine.tools.development.agent.runtime.Runtime.invoke(Runtime.java:
100)
at
com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:
562)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:
188)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:
224)
at
com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:
62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
511)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1166)
at
com.metadot.book.stalkrapp.server.servlets.LoginFilter.doFilter(LoginFilter.java:
31)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:
51)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:
43)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:
122)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:
388)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:
216)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:
182)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:
765)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
418)
at
com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:
70)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
152)
at com.google.appengine.tools.development.JettyContainerService
$ApiProxyHandler.handle(JettyContainerService.java:349)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
542)
at org.mortbay.jetty.HttpConnection
$RequestHandler.content(HttpConnection.java:938)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:
409)
at org.mortbay.thread.QueuedThreadPool
$PoolThread.run(QueuedThreadPool.java:582)
Caused by: com.google.apphosting.api.ApiProxy$ApplicationException:
ApplicationError: 2:
at
com.google.appengine.api.channel.dev.LocalChannelService.sendChannelMessage(LocalChannelService.java:
91)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.appengine.tools.development.ApiProxyLocalImpl

[appengine-java] Re: Dance Dance Robot error / Channel API

2010-07-19 Thread GoSharp Lite
I have the same error using dev server.

If you deploy your app to production server, below error log shows
channel service is not enable.

exception: com.google.apphosting.api.ApiProxy
$FeatureNotEnabledException: The channel service is not enabled.

It seems we have to patiently wait:)

On Jul 20, 10:36 am, Daniel Guermeur superco...@gmail.com wrote:
 Thanks for the tip about channel.js. This is what I needed.

 Now I get an error when pushing a message to a client. I get this:

 com.google.appengine.api.channel.ChannelFailureException: An
 unexpected error occurred.
 Caused by: com.google.apphosting.api.ApiProxy$ApplicationException:
 ApplicationError: 2:

 Here is the stack trace. Let me know of any ideas you might have.

 Thanks!
 Daniel

 SEVERE: Failed to push the message
 com.metadot.book.stalkrapp.shared.mess...@1010a3b to client channel-
 a4kt0t-stalkrappt...@example.com-1
 com.google.appengine.api.channel.ChannelFailureException: An
 unexpected error occurred.
         at
 com.google.appengine.api.channel.ChannelServiceImpl.sendMessage(ChannelServiceImpl.java:
 59)
         at
 com.metadot.book.stalkrapp.server.PushServer.sendMessageToOneUser(PushServer.java:
 82)
         at
 com.metadot.book.stalkrapp.server.FriendsServiceImpl.getFriend(FriendsServiceImpl.java:
 283)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
 39)
         at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
 25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at
 com.google.appengine.tools.development.agent.runtime.Runtime.invoke(Runtime.java:
 100)
         at
 com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:
 562)
         at
 com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:
 188)
         at
 com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:
 224)
         at
 com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:
 62)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
         at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
 511)
         at org.mortbay.jetty.servlet.ServletHandler
 $CachedChain.doFilter(ServletHandler.java:1166)
         at
 com.metadot.book.stalkrapp.server.servlets.LoginFilter.doFilter(LoginFilter.java:
 31)
         at org.mortbay.jetty.servlet.ServletHandler
 $CachedChain.doFilter(ServletHandler.java:1157)
         at
 com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:
 51)
         at org.mortbay.jetty.servlet.ServletHandler
 $CachedChain.doFilter(ServletHandler.java:1157)
         at
 com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:
 43)
         at org.mortbay.jetty.servlet.ServletHandler
 $CachedChain.doFilter(ServletHandler.java:1157)
         at
 com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:
 122)
         at org.mortbay.jetty.servlet.ServletHandler
 $CachedChain.doFilter(ServletHandler.java:1157)
         at
 org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:
 388)
         at
 org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:
 216)
         at
 org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:
 182)
         at
 org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:
 765)
         at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
 418)
         at
 com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:
 70)
         at
 org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
 152)
         at com.google.appengine.tools.development.JettyContainerService
 $ApiProxyHandler.handle(JettyContainerService.java:349)
         at
 org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
 152)
         at org.mortbay.jetty.Server.handle(Server.java:326)
         at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
 542)
         at org.mortbay.jetty.HttpConnection
 $RequestHandler.content(HttpConnection.java:938)
         at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755)
         at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
         at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
         at
 org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:
 409)
         at org.mortbay.thread.QueuedThreadPool
 $PoolThread.run(QueuedThreadPool.java:582)
 Caused by: com.google.apphosting.api.ApiProxy$ApplicationException:
 ApplicationError: 2:
         at
 

[appengine-java] strange datastore status

2010-07-19 Thread cse.zh...@gmail.com
Dear all,
Today I encountered a strange situation. I have used app engine SDK
1.3.5. And I have two applications on https://appengine.google.com/
assume they are *myapp* and *myapp-sandbox*.

*myapp* and *myapp-sandbox* have the same code. I tried to execute a
same section of code towards these 2 apps. Both returned successfully.
But the datastore response are diffrent. *myapp-sandbox* created a
record in datastore, but *myapp* didn't.

I tried to write SEVERE log in *myapp*, but none of them was
successfully recorded. I can't see any logs in Admin Console, which
prevent me from investigating the problem.

I viewed the status report from url: http://code.google.com/status/appengine/,
and everything seems OK.

Can someone help me find it out?

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: strange datastore status

2010-07-19 Thread cse.zh...@gmail.com
Dear all,
I've already found the reason. It is related to my careless. There is
a tiny difference between the two apps which caused the problem. And I
didn't notice it.

Sorry for the inconvenience.

On 7月20日, 上午11时24分, cse.zh...@gmail.com cse.zh...@gmail.com wrote:
 Dear all,
 Today I encountered a strange situation. I have used app engine SDK
 1.3.5. And I have two applications onhttps://appengine.google.com/
 assume they are *myapp* and *myapp-sandbox*.

 *myapp* and *myapp-sandbox* have the same code. I tried to execute a
 same section of code towards these 2 apps. Both returned successfully.
 But the datastore response are diffrent. *myapp-sandbox* created a
 record in datastore, but *myapp* didn't.

 I tried to write SEVERE log in *myapp*, but none of them was
 successfully recorded. I can't see any logs in Admin Console, which
 prevent me from investigating the problem.

 I viewed the status report from url:http://code.google.com/status/appengine/,
 and everything seems OK.

 Can someone help me find it out?

 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: JDO - How to Model a Transferable Relationship?

2010-07-19 Thread Didier Durand
Hi,

I think that you have to go for an unowned 1-to-many relationship to
achieve what you want else your child is stuck with its 1st parent.

See for samples:http://code.google.com/appengine/docs/java/datastore/
relationships.html#Unowned_Relationships

didier

On Jul 17, 10:44 pm, max 6738...@gmail.com wrote:
 Hi,

 I'm having trouble getting JDO work in a situation of wanting to
 transfer child objects from one parent to another.  Let's say that I
 would like to model an object called Team and an object called
 Player.  A Player can be on only one team at a time, and a Team can
 have many Players.  I can get the basics working, however I run into
 problems when I want to transfer (trade) an existing Player instance
 to an existing Team instance.  Outside of that relationship, the
 objects are completely different.

 I have the problem that a child cannot be moved because apparently it
 isn't in the same entity group.  I have tried to model it as SetKey
 in each class like the Favorite Foods example in the documentation,
 but that doesn't work.  I don't get errors, but nothing is saved.  The
 Sets saved are always empty.  I have tried the same thing with
 ArrayListLong, where Long is the Key.getId() of the related
 object.

 I think I am missing something rather simple, but I can't get it
 working.  Do I need other annotations?  Can someone post a simple
 example?

 thanks!
 Max

-- 
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: Length of member variable names contributes to storage space used?

2010-07-19 Thread Didier Durand
Hi Mark,

I would say yes: the datastore viewer shows the data with couples
(name,value), name being the origianal attribute name in the java
class.

Moreover the doc says Each persistent field of the class represents a
property of the entity, with the name of the property equal to the
name of the field (with case preserved). at
http://code.google.com/appengine/docs/java/datastore/dataclasses.html#Class_and_Field_Annotations

regards
didier

On Jul 19, 3:32 pm, Mark mar...@gmail.com wrote:
 Hi,

 I read in a post that the length of member variable names contributes
 to the amount of storage space your app uses, example:

     class Farm {
         private String mFarmersFavoriteCropToPlant;
     }

 would take more space to store than:

     class Farm {
         private String m;
     }

 might not matter for a handful of instances, but if I have thousands
 of records... is this true?

 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] Geomodel Java: Proximity Search

2010-07-19 Thread Mahsa
I am trying to use the proximity search of Geomodel. However, I
am facing a problem, which I am not sure what it is, but I think it is
related to either my PersistentManager or baseQuery. I ran the query,
however, while my database is not empty, I got null results.


Here are my codes:

public class HowToUseGeocell extends TestCase {
...

public int ProximitySearch(double lat, double lon, double distance) {

Point center = new Point(lat, lon);
ListObjectToSave objects = null;
PersistenceManager pm = PMF.get().getPersistenceManager();

   try{
ListObject params = new ArrayListObject();
params.add(Mahsa);
GeocellQuery baseQuery = new GeocellQuery(Owner ==
OwnerParam, String OwnerParam, params);

try {
objects = GeocellManager.proximityFetch(center, 40,
distance, ObjectToSave.class, baseQuery, pm);
Assert.assertTrue(objects.size()  0);
} catch (Exception e) {
// We catch excption here because we have not
configured the PersistentManager (and so the queries won't work)
}

} finally {
pm.close();
}

if (objects == null)
return -3;

else
return objects.size();

}
}

Here is my ObjectToSave class:

@PersistenceCapable(detachable=true)
public class ObjectToSave implements LocationCapable {

@PrimaryKey
@Persistent
private long id;

@Persistent
private double latitude;

@Persistent
private double longitude;

@Persistent
private double altitude;

@Persistent
private ListString geocells;

@Persistent
private String owner;

public long getId() {
return id;
}

public void setId(long id) {
this.id = id;
}

public double getLatitude() {
return latitude;
}

public void setLatitude(double latitude) {
this.latitude = latitude;
}

public double getLongitude() {
return longitude;
}

public void setLongitude(double longitude) {
this.longitude = longitude;
}

public double getAltitude() {
return altitude;
}

public void setAltitude(double alt) {
this.altitude = alt;
}

public ListString getGeocells() {
return geocells;
}

public void setGeocells(ListString geocells) {
this.geocells = geocells;
}

public String getKeyString() {
return Long.valueOf(id).toString();
}

public Point getLocation() {
return new Point(latitude, longitude);
}

public String getOwner() {
return owner;
}

public void setOwner(String o) {
this.owner = o;
}

}

My PMF class:

public final class PMF {
private static final PersistenceManagerFactory pmfInstance =
JDOHelper.getPersistenceManagerFactory(transactions-
optional);

private PMF() {}

public static PersistenceManagerFactory get() {
return pmfInstance;
}

}

My Servlet:

@SuppressWarnings(serial)
public class Test8_Geomodel_GAEServlet extends HttpServlet {

//  public static UseGeocell GC = new UseGeocell();
//public final static PersistenceManagerFactory pmfInstance =
JDOHelper.getPersistenceManagerFactory(transactions-optional);

public void doGet(HttpServletRequest req, HttpServletResponse
resp)
throws IOException {

doPost(req, resp);

//  resp.setContentType(text/plain);
//  resp.getWriter().println(Hello, world);
}

public void doPost(HttpServletRequest req, HttpServletResponse
resp)
throws IOException {

HowToUseGeocell gc = new HowToUseGeocell();
ListObjectToSave obj = new
ArrayListObjectToSave();

//Read Excel source file (which is defined in
web.xml file) 
store it in datastore
ServletContext context = getServletContext();

String file_path = context.getRealPath(LiDAR.xls);
File Myfile = new File(file_path);

Workbook workBook;
int PointNo;
double latitude = 0.0, longitude = 0.0, altitude =
0.0;
String owner = ;

try {

workBook = Workbook.getWorkbook(Myfile);
Sheet sheet = workBook.getSheet(0);

int NumOfColumns = sheet.getColumns();
int NumOfRows = sheet.getRows();

String data;
for(int row = 1; row  NumOfRows; row++) {
for(int col = 0; col  NumOfColumns; col++) {
data = sheet.getCell(col,
row).getContents();

data = sheet.getCell(0,
row).getContents();
PointNo =
Integer.parseInt(data.toString());


[appengine-java] Tag clouds on GAE for Java - how to store and how to aggregate

2010-07-19 Thread planetjones
Hi,
I'm looking to store entities using GAE Java which have 1-many tags.
I
would like to display a tag cloud, so will need to know how many
times
each tag occurs (can't use aggregate functions and group by on GAE to
do this like I would in SQL). And when I click a tag I would like to
retrieve all entities with the selected tag.
Does anyone have any examples of what my Classes should look like to
do this optimally and efficiently? Sample JPA code would be great
too.
Cheers - Jonathan

-- 
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: dynamically resizing a textarea

2010-07-19 Thread Brandon A
This is on the client side of the application. However I've finally
found a solution to the problem... It's pretty simple and most
experienced developers would probably know about it... But yeah, even
though not all HTML attributes are accessible directly from the GWT
TextArea class, I'm pretty sure every attribute is accessible from the
element returned by textarea.getElement(), including scrollHeight.

On Jul 12, 11:41 am, Ikai L (Google) ika...@google.com wrote:
 You'll need to do this in the client using Javascript. You can't do client
 side UI on the server.

 If you're using Google Web Toolkit, you may have better luck finding an
 answer here:https://groups.google.com/group/Google-Web-Toolkit?pli=1



 On Sun, Jul 11, 2010 at 11:24 PM, Brandon A br.ar...@gmail.com wrote:
  I'm creating textareas in the main java file of my app, and I want to
  make them resize themselves as users enter and delete text in them. I
  can't figure out how to do this, though. There are solutions online
  where you can use javascript in the html file to compare the
  offsetHeight and scrollHeight of the textarea and then make the two
  heights match each other. However, since my textareas are not static
  elements of the page and because I'm doing this with java, I don't
  have access to the scrollHeight of the textarea (well, at least I
  think I don't), so I can't use that solution. I'm very new to all of
  this so there might be something that I'm completely missing. Any
  advice would be greatly 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.comgoogle-appengine-java%2bunsubscr...@googlegroups.com
  .
  For more options, visit this group at
 http://groups.google.com/group/google-appengine-java?hl=en.

 --
 Ikai Lan
 Developer Programs Engineer, Google App Engine
 Blog:http://googleappengine.blogspot.com
 Twitter:http://twitter.com/app_engine
 Reddit:http://www.reddit.com/r/appengine

-- 
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.



[google-appengine] request.get() works wrong

2010-07-19 Thread saintthor
code:

SlctType = cgi.escape( self.request.get( 'selecttype' ))
SlctCodes = cgi.escape( self.request.get( 'codes' ))
logging.info( selecttype = %s, codes = %s % ( SlctType,
SlctCodes ))

log:

#

   1.
  07-18 11:30PM 48.863 /gumo?
selecstyle=1codes=01,03,05 200 6ms 0cpu_ms 1kb Mozilla/
5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.2.6) Gecko/20100625
Firefox/3.6.6 GTB7.1,gzip(gfe)
  See details

  125.39.117.198 - saintthor [18/Jul/2010:23:30:48 -0700] GET /
gumo?selecstyle=1codes=01,03,05 HTTP/1.1 200 1718 -
Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.2.6) Gecko/
20100625 Firefox/3.6.6 GTB7.1,gzip(gfe) smarthor8.appspot.com ms=6
cpu_ms=0 api_cpu_ms=0 cpm_usd=0.000295

   2.
  I 07-18 11:30PM 48.867 selecttype = , codes =
01,03,05

you see, the selecstyle=1 in querystring is not get.

this app works well till this morning. and wrong afternoon. what
happened? how to fix it?

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: request.get() works wrong

2010-07-19 Thread saintthor
nonono, please delete this.


 selecstyle=1codes=01,03,05 200 6ms 0cpu_ms 1kb Mozilla/
 5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.2.6) Gecko/20100625
 Firefox/3.6.6 GTB7.1,gzip(gfe)
       See details

       125.39.117.198 - saintthor [18/Jul/2010:23:30:48 -0700] GET /
 gumo?selecstyle=1codes=01,03,05 HTTP/1.1 200 1718 -
 Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.2.6) Gecko/
 20100625 Firefox/3.6.6 GTB7.1,gzip(gfe) smarthor8.appspot.com ms=6
 cpu_ms=0 api_cpu_ms=0 cpm_usd=0.000295

    2.
       I 07-18 11:30PM 48.867 selecttype = , codes =
 01,03,05
 
 you see, the selecstyle=1 in querystring is not get.

 this app works well till this morning. and wrong afternoon. what
 happened? how to fix it?

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: How logging [doesnt?] work?

2010-07-19 Thread l.denardo
The listed behavior seems to work in production only.
I haven't been able to write output on standard streams in development
too.

Anyway you can simply log the required output with the appropriate log
level, and it will be prompted to your console if logging properties
are correctly set.

Regards
Lorenzo

On Jul 18, 2:03 am, kab kbo...@als.com wrote:
 In the doc: Java Servlet Environment  Logging, this statement
 appears:

 Everything the servlet writes to the standard output stream
 (System.out) and standard error stream (System.err) is captured by App
 Engine and recorded in the application logs. Lines written to the
 standard output stream are logged at the INFO level, and lines
 written to the standard error stream are logged at the WARNING
 level.

 This isn't happening for me: none of my app's (development) System.out
 messages appear, even when I set the Console Main  Logs severity to
 Debug.  Note that I have a logging.properties file in WEB-INF whose
 content is

 .level = INFO

 and my appengine-web.xml contains

 system-properties
         property name=java.util.logging.config.file value=WEB-INF/
 logging.properties/
 /system-properties

 What am I missing here?
 Thanks in advance,
 Ken Bowen

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: How to access the source code I uploaded

2010-07-19 Thread Grant
Hi, you cannot see it after it is uploaded.

One of the many reasons for this is so you can sell apps without
giving the source away.

There are numerous code repositoies where you can keep version
controlled code such as http://www.github.com and http://code.google.com

Grant

On Jul 17, 7:47 pm, eric frameworkappdevelo...@gmail.com wrote:
 Hello

 I want to know where can I see and access the source code which I
 uploaded in Google App Engine using JAVA when I log into the account?

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Subcategory Capability with GAE Datastore Models?

2010-07-19 Thread Bill Edwards
Hi!

I've been recently trying to wrap my head around GAE's datatypes.  Is
there a model type in GAE that allows me to define subproperties?  For
example, I want to have a category property where some categories
fall under others, and when i query for all entities within a
supercategory, i get the subcategories also.

For example:
class Animals(db.Model):
type = db.StringProperty()

Animals(type='mammal')
Animals(type='chimpanzee')
Animals(type='monkey')

When I query for all animals with type mammal, i want to return all 3
of the above objects.

I've read through the documentation, and the PolyModel datastore model
has struck my eye as being potentially helpful.  However, it doesn't
seem to quite do the job.

Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Subcategory Capability with GAE Datastore Models?

2010-07-19 Thread Nickolas Daskalou
As you said, you can accomplish this using PolyModels, eg:

class Animal(db.polymodel.PolyModel):
  ...
class Mammal(Animal):
  ...
class Chimpanzee(Mammal):
  ...
class Monkey(Mammal):
  ...

and retrieve all Monkeys, Chimpanzees and other Mammals using:

animals = Mammal.all().fetch()

OR you can roll your own by using a ListProperty (or a StringListProperty),
eg:

class Animal(db.Model):
  type = db.StringListProperty()

animal1 = Animal(type=['mammal'])
animal2 = Animal(type=['mammal','chimpanzee'])
animal3 = Animal(type=['mammal','monkey'])

db.put([animal1,animal2,animal3])

and retrieve all three using:

animals = Animal.all().filter('type = ','mammal').fetch()

I'm sure there are other solutions to this too.

Nick


On 19 July 2010 18:04, Bill Edwards twmaf...@gmail.com wrote:

 Hi!

 I've been recently trying to wrap my head around GAE's datatypes.  Is
 there a model type in GAE that allows me to define subproperties?  For
 example, I want to have a category property where some categories
 fall under others, and when i query for all entities within a
 supercategory, i get the subcategories also.

 For example:
 class Animals(db.Model):
type = db.StringProperty()

 Animals(type='mammal')
 Animals(type='chimpanzee')
 Animals(type='monkey')

 When I query for all animals with type mammal, i want to return all 3
 of the above objects.

 I've read through the documentation, and the PolyModel datastore model
 has struck my eye as being potentially helpful.  However, it doesn't
 seem to quite do the job.

 Thanks!

 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To post to this group, send email to google-appeng...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: Subcategory Capability with GAE Datastore Models?

2010-07-19 Thread gops
you can achieve this in polymodel by adding all common properties to
polymodel base class and specific property to the hierarchy.

i.e.

Class LivingThing(polymodel.PolyModel):
Kingdom = db.StringProperty()
Phylum = db.StringProperty()
Subphylum = db.StringProperty()

Class Mammal(LivingThing):
noofbreast = db.IntegerProperty()

class Monkey(Mammal):
   canjump = db.BooleanProperty()

now you can create class monkey as,
Monkey(Kingdom=Animal,canjump=True)

and later query as LivingThing.filter(Kingdom =,Animal).fetch()

can return Monkey.

On Jul 19, 1:04 pm, Bill Edwards twmaf...@gmail.com wrote:
 Hi!

 I've been recently trying to wrap my head around GAE's datatypes.  Is
 there a model type in GAE that allows me to define subproperties?  For
 example, I want to have a category property where some categories
 fall under others, and when i query for all entities within a
 supercategory, i get the subcategories also.

 For example:
 class Animals(db.Model):
     type = db.StringProperty()

 Animals(type='mammal')
 Animals(type='chimpanzee')
 Animals(type='monkey')

 When I query for all animals with type mammal, i want to return all 3
 of the above objects.

 I've read through the documentation, and the PolyModel datastore model
 has struck my eye as being potentially helpful.  However, it doesn't
 seem to quite do the job.

 Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] GAE + RESTful webservice

2010-07-19 Thread Alon Carmel
Pistons for python gives you a restful access to all your methods.
I personally wrote all the rest api access points myself. i like to keep it
personal without revealing my data structure.
-
Cheers,

def AlonCarmel(request)
 import simplejson as json
 contact = {}
 contant['email'] = 'a...@aloncarmel.me'
 contact['twitter'] = '@aloncarmel'
 contact['web'] = 'http://aloncarmel.me'
 contact['phone'] = '+972-54-4860380'
 return HttpResponse(json.dumps(contact))



* If you received an unsolicited email from by mistake that wasn't of your
matter please delete immediately. All E-mail sent from Alon Carmel is
copyrighted to Alon Carmel 2008. Any details revealed in e-mails sent by
Alon Carmel are owned by the Author only. Any attempt to duplicate or
imitate any of the Content is prohibited under copyright law 2008.



On Sun, Jul 18, 2010 at 8:48 PM, ping bernd.warm...@gmail.com wrote:

 Hi,
 i want to develop a webapplication on GAE which stores and retrieves
 data from a database and make it available through RESTful
 Webservices.
 What's the best way to do this?
 Can I use Axis2? Or Restlet? Whats the general approach for
 implementing REST in GAE?

 greets.

 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To post to this group, send email to google-appeng...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Are key filters more efficient than ancestor queries?

2010-07-19 Thread Blixt
Imagine the following models:

class Parent(db.Model):
name = db.StringProperty()
count = db.IntegerProperty()

class Child(db.Model):
number = db.IntegerProperty()
value = db.StringProperty()

Whenever a new Child is added, it is added with a Parent as its parent
entity in a transaction which also updates some values on the Parent.

My question is this: To get a list of children that belongs to a
Parent, is it more efficient to add a ReferenceProperty to the Child
model and filter by that, than it is to use the ancestor filter in
queries?

To clarify in code:

# Using ancestor
Child.all().ancestor(parent_key).fetch(10)
# Using filter on a new ReferenceProperty called 'my_parent'
Child.all().filter('my_parent', parent_key).fetch(10)

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Are key filters more efficient than ancestor queries?

2010-07-19 Thread Nick Johnson (Google)
Hi Blixt,

On Mon, Jul 19, 2010 at 12:15 PM, Blixt andreasbl...@gmail.com wrote:

 Imagine the following models:

 class Parent(db.Model):
name = db.StringProperty()
count = db.IntegerProperty()

 class Child(db.Model):
number = db.IntegerProperty()
value = db.StringProperty()

 Whenever a new Child is added, it is added with a Parent as its parent
 entity in a transaction which also updates some values on the Parent.

 My question is this: To get a list of children that belongs to a
 Parent, is it more efficient to add a ReferenceProperty to the Child
 model and filter by that, than it is to use the ancestor filter in
 queries?

 To clarify in code:

 # Using ancestor
 Child.all().ancestor(parent_key).fetch(10)
 # Using filter on a new ReferenceProperty called 'my_parent'
 Child.all().filter('my_parent', parent_key).fetch(10)


These two should have roughly the same performance.

Bear in mind, though, that if you don't need entity groups for transaction
purposes, you should avoid using ancestor relationships. Given that, the
second approach is a better one - just not for query performance reasons.

-Nick Johnson



 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To post to this group, send email to google-appeng...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.




-- 
Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. ::
Registered in Dublin, Ireland, Registration Number: 368047
Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number:
368047

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: Are key filters more efficient than ancestor queries?

2010-07-19 Thread Blixt
Thanks Nick.

The reason I use entity groups is not for any kind of performance
reasons – I really need to make sure that the Parent entity is updated
in combination with a Child entity being added, and the values being
set are related to the order of entity insertions, so entity groups
feel like the right thing to do to ensure data atomicity.

My only thought is that I'd rather add redundancy (by adding a
ReferenceProperty that can be inferred from the key) than lose
performance. If the performance difference is negligible however, I'd
rather not add an unnecessary property.

/Blixt

On Jul 19, 1:21 pm, Nick Johnson (Google) nick.john...@google.com
wrote:
 Hi Blixt,





 On Mon, Jul 19, 2010 at 12:15 PM, Blixt andreasbl...@gmail.com wrote:
  Imagine the following models:

  class Parent(db.Model):
     name = db.StringProperty()
     count = db.IntegerProperty()

  class Child(db.Model):
     number = db.IntegerProperty()
     value = db.StringProperty()

  Whenever a new Child is added, it is added with a Parent as its parent
  entity in a transaction which also updates some values on the Parent.

  My question is this: To get a list of children that belongs to a
  Parent, is it more efficient to add a ReferenceProperty to the Child
  model and filter by that, than it is to use the ancestor filter in
  queries?

  To clarify in code:

  # Using ancestor
  Child.all().ancestor(parent_key).fetch(10)
  # Using filter on a new ReferenceProperty called 'my_parent'
  Child.all().filter('my_parent', parent_key).fetch(10)

 These two should have roughly the same performance.

 Bear in mind, though, that if you don't need entity groups for transaction
 purposes, you should avoid using ancestor relationships. Given that, the
 second approach is a better one - just not for query performance reasons.

 -Nick Johnson



  --
  You received this message because you are subscribed to the Google Groups
  Google App Engine group.
  To post to this group, send email to google-appeng...@googlegroups.com.
  To unsubscribe from this group, send email to
  google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2Bunsubscrib 
  e...@googlegroups.com
  .
  For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.

 --
 Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd. ::
 Registered in Dublin, Ireland, Registration Number: 368047
 Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number:
 368047

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: GAE + RESTful webservice

2010-07-19 Thread François Masurel
I've successfully used Restlet with OAuth for a simple web service.

On 18 juil, 19:48, ping bernd.warm...@gmail.com wrote:
 Hi,
 i want to develop a webapplication on GAE which stores and retrieves
 data from a database and make it available through RESTful
 Webservices.
 What's the best way to do this?
 Can I use Axis2? Or Restlet? Whats the general approach for
 implementing REST in GAE?

 greets.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Re: GAE + RESTful webservice

2010-07-19 Thread Łukasz Rybka
I'm currently using Jersey framework with no bigger problems (except for
normal Jersey issues ;)). Very good framework for beginners.

2010/7/19 François Masurel fm2...@mably.com

 I've successfully used Restlet with OAuth for a simple web service.

 On 18 juil, 19:48, ping bernd.warm...@gmail.com wrote:
  Hi,
  i want to develop a webapplication on GAE which stores and retrieves
  data from a database and make it available through RESTful
  Webservices.
  What's the best way to do this?
  Can I use Axis2? Or Restlet? Whats the general approach for
  implementing REST in GAE?
 
  greets.

 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To post to this group, send email to google-appeng...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] paypalx-gae-toolkit with SDK 1.3.5

2010-07-19 Thread Duong BaTien
Hi:

I am trying to compile and runserver of sample PicMart in
paypalx=gae-toolkit with the latest SDK 1.3.5. The comile target is ok
except a warning, the runserver target has error and the access via
http://localhost:8080/ has 403 error Problem accessing FORBIDDEN. Does
anyone have the answer?

Thanks
Duong BaTien
DBGROUPS and BudhNet

Warning for ant javc: 

[javac] /data/picMart/build.xml:112: warning: 'includeantruntime' was
not set, defaulting to build.sysclasspath=last; set to false for
repeatable builds
[javac] Compiling 2 source files
to /data/picMart/war/WEB-INF/classes

BUILD SUCCESSFUL

Error for ant runserver:

datanucleusenhance:
  [enhance] DataNucleus Enhancer (version 1.1.4) : Enhancement of
classes
  [enhance] DataNucleus Enhancer completed with success for 0 classes.
Timings : input=241 ms, enhance=0 ms, total=241 ms. Consult the log for
full details
  [enhance] DataNucleus Enhancer completed and no classes were enhanced.
Consult the log for full details

runserver:
 [java] Jul 19, 2010 8:11:35 AM
com.google.appengine.tools.info.LocalVersionFactory getVersion
 [java] INFO: Could not find API version
from /data/picMart/war/WEB-INF/lib/.svn
 [java] java.util.zip.ZipException: error in opening zip file
 [java] at java.util.zip.ZipFile.open(Native Method)
 [java] at java.util.zip.ZipFile.init(ZipFile.java:114)
 [java] at java.util.jar.JarFile.init(JarFile.java:135)
 [java] at java.util.jar.JarFile.init(JarFile.java:99)
 [java] at
com.google.appengine.tools.util.ApiVersionFinder.findApiVersion(ApiVersionFinder.java:37)
 [java] at
com.google.appengine.tools.info.LocalVersionFactory.getVersion(LocalVersionFactory.java:65)
 [java] at
com.google.appengine.tools.info.UpdateCheck.getLocalVersion(UpdateCheck.java:116)
 [java] at
com.google.appengine.tools.info.UpdateCheck.checkForUpdates(UpdateCheck.java:95)
 [java] at
com.google.appengine.tools.info.UpdateCheck.doNagScreen(UpdateCheck.java:168)
 [java] at
com.google.appengine.tools.info.UpdateCheck.maybePrintNagScreen(UpdateCheck.java:136)
 [java] at com.google.appengine.tools.development.DevAppServerMain
$StartAction.apply(DevAppServerMain.java:150)
 [java] at com.google.appengine.tools.util.Parser
$ParseResult.applyArgs(Parser.java:48)
 [java] at
com.google.appengine.tools.development.DevAppServerMain.init(DevAppServerMain.java:113)
 [java] at
com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:89)
 [java] Jul 19, 2010 8:11:38 AM
com.google.apphosting.utils.jetty.JettyLogger info
 [java] INFO: Logging to JettyLogger(null) via
com.google.apphosting.utils.jetty.JettyLogger
 [java] Jul 19, 2010 8:11:38 AM
com.google.apphosting.utils.config.AppEngineWebXmlReader
readAppEngineWebXml
 [java] INFO: Successfully
processed /data/picMart/war/WEB-INF/appengine-web.xml
 [java] Jul 19, 2010 8:11:38 AM
com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml
 [java] INFO: Successfully
processed /data/picMart/war/WEB-INF/web.xml
 [java] Jul 19, 2010 8:11:41 AM
com.google.appengine.tools.development.DevAppServerImpl start
 [java] INFO: The server is running at http://localhost:8080/


-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] How much faster is key-based lookup compared to a query?

2010-07-19 Thread coltsith
Lets say I want to retrieve 4 objects. What would be faster:

1. for (int i = 0; i  4; i++) {

persistenceManager.getObjectById(object1)

}

or

2. Query = (select * from objects where id == 'id1' || id == 'id2'
|| id == 'id3' || id == 'id4')

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Is it okay to have multiple PersistenceManagers in single method?

2010-07-19 Thread coltsith
(PMF = PersistenceManagerFactory instance)

PersistenceManager pm1 = PMF.get().getPersistenceManager();

PersistenceManager pm2 = PMF.get().getPersistenceManager();

Is this a strict no no? I want to use it so I can have two
transactions in a single method on different objects.

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Conflicting info about taskqueues during scheduled downtime.

2010-07-19 Thread djidjadji
Maybe the task can be created but will only execute when the
maintenance period is ended.
Most tasks want to write to the datastore or memcache. But both are
disabled, so no need to try to
run a task-request.

2010/7/15 JK jan...@gmail.com:
 I was looking at the Brett Slatkins talk Building high-throughput
 data pipelines with Google App Engine and one of the comment that
 made was that taskqueues don't work in the maintenance mode. But I
 was looking at this

 http://www.slideshare.net/jasonacooper/strategies-for-maintaining-app-engine-availability-during-read-only-periods

 and one of the points in this is that you can use taskqueues to defer
 the data store insertion.

 I am confused now. Can someone clarify this please?

 --
 You received this message because you are subscribed to the Google Groups 
 Google App Engine group.
 To post to this group, send email to google-appeng...@googlegroups.com.
 To unsubscribe from this group, send email to 
 google-appengine+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/google-appengine?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Re: Google App Python src code download

2010-07-19 Thread djidjadji
Making a daily-backup on an USB stick was too much work for this app?

2010/7/19 Cluster cluster.mas...@gmail.com:
 Actually i didnt use svn for that project (and this was the only *one*
 exclusion)

 Thats all wrong :( i didnt enable remote api console, i didnt
 integrated zipexport full app files functionality
 http://www.manatlan.com./blog/zipme___download_sources_of_your_gae_website__as_a_zip_file

 So, you, the followers, learn on mine mistakes

 i m pity, gone to cry a little

 --
 You received this message because you are subscribed to the Google Groups 
 Google App Engine group.
 To post to this group, send email to google-appeng...@googlegroups.com.
 To unsubscribe from this group, send email to 
 google-appengine+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/google-appengine?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Previously attached subdomain still bound to the deleted appengine application

2010-07-19 Thread Balaban Valeriu
http://code.google.com/appengine/kb/adminconsole.html#delete_app

http://code.google.com/appengine/kb/adminconsole.html#delete_appYou can
delete your app, but App Engine provides safety measures to prevent
inadvertent deletion. To delete your app, you first disable it, which stops
all serving requests but leaves your data and state alone. Once your app is
disabled, you can leave it that way, or you can delete it. While your app is
disabled, you can still use the Administration Console to manage it. If you
delete it, your data and state are destroyed and can't be restored. *Even
after your application is deleted, its appid is reserved.*

2010/7/16 Sumit skbrnwl-...@yahoo.com

 Hi,

 I'd a java application on appengine that was pointing to my subdomain
 foo.bar.com (example domain). I found out about google apps based
 authentication if it is used as appengine.google.com/a/bar.com
 (example domain) and hence deleted the previous application. It took
 three days to completely remove that application and now i'm trying to
 attach my new application (hosted as part of google apps integration)
 to the same subdomain. Its complaining that my previous appengine
 instance (which i thought has been completely removed) is still
 attached with this subdomain. Now that i've no access to the deleted
 appengine instance, would you please suggest on how to clean this
 mess?

 I will provide details on the app_id and subdomain once i hear from
 you guys.
 Thanks,
 -Sumit

 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To post to this group, send email to google-appeng...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Does anyone have a code example of AES encryption in python?

2010-07-19 Thread Denis Hoctor
Hi,

I have a query string I need to encrypt using AES in CBC mode with
zero padding, before finally encoding it to base64 and I need to run
this on Google App Engine in Python.

I've had a look around and can't be sure what works in GAE and what
doesn't, I'm also finding it hard to get example code of some of those
I believe should work, such as (http://code.google.com/p/slowaes/).

Does anyone have a code example or link to one for AES encryption in
python on Google App Engine?

I think AESSlow seems to be the one to use with App Engine but can
find no examples of how to implement it.

Thanks,
Denis

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Domain name management

2010-07-19 Thread liquid solutions
Hi Group
 I have registered a domain. Now i want the domain name www..org.
should point to abaaaxx.appsoft.com.
Right now it is forwarding it and hence when i type www..org it
forwards to abaaaxxx.appsoft.com and i can see that on the browser. I
should see only my domain name instead . Please suggest

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] How much faster is key-based lookup compared to a query?

2010-07-19 Thread Robert Kluin
Have you thought about benchmarking this?






On Mon, Jul 19, 2010 at 10:51 AM, coltsith conla...@gmail.com wrote:
 Lets say I want to retrieve 4 objects. What would be faster:

    1. for (int i = 0; i  4; i++) {

    persistenceManager.getObjectById(object1)

    }

 or

    2. Query = (select * from objects where id == 'id1' || id == 'id2'
 || id == 'id3' || id == 'id4')

 Thanks

 --
 You received this message because you are subscribed to the Google Groups 
 Google App Engine group.
 To post to this group, send email to google-appeng...@googlegroups.com.
 To unsubscribe from this group, send email to 
 google-appengine+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/google-appengine?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: How much faster is key-based lookup compared to a query?

2010-07-19 Thread Robert Lancer
App Engine status has bench marks for this, 
http://code.google.com/status/appengine/

But I can tell you for your situation here the get would be ideal
because you would actually be using 4 queries because thats what the
IN clause does behind the scenes, and thats the way your query would
work with the id == 'id1' || id == 'id2' ...


On Jul 19, 12:40 pm, Robert Kluin robert.kl...@gmail.com wrote:
 Have you thought about benchmarking this?



 On Mon, Jul 19, 2010 at 10:51 AM, coltsith conla...@gmail.com wrote:
  Lets say I want to retrieve 4 objects. What would be faster:

     1. for (int i = 0; i  4; i++) {

     persistenceManager.getObjectById(object1)

     }

  or

     2. Query = (select * from objects where id == 'id1' || id == 'id2'
  || id == 'id3' || id == 'id4')

  Thanks

  --
  You received this message because you are subscribed to the Google Groups 
  Google App Engine group.
  To post to this group, send email to google-appeng...@googlegroups.com.
  To unsubscribe from this group, send email to 
  google-appengine+unsubscr...@googlegroups.com.
  For more options, visit this group 
  athttp://groups.google.com/group/google-appengine?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Re: How much faster is key-based lookup compared to a query?

2010-07-19 Thread Toby Reyelts
You want the batch version of the get function,
getObjectsByIdhttp://db.apache.org/jdo/api20/apidocs/javax/jdo/PersistenceManager.html#getObjectsById(java.util.Collection),
which shouldn't involve multiple round-trips to the database.

On Mon, Jul 19, 2010 at 1:09 PM, Robert Lancer robert.lan...@gmail.comwrote:

 App Engine status has bench marks for this,
 http://code.google.com/status/appengine/

 But I can tell you for your situation here the get would be ideal
 because you would actually be using 4 queries because thats what the
 IN clause does behind the scenes, and thats the way your query would
 work with the id == 'id1' || id == 'id2' ...


 On Jul 19, 12:40 pm, Robert Kluin robert.kl...@gmail.com wrote:
  Have you thought about benchmarking this?
 
 
 
  On Mon, Jul 19, 2010 at 10:51 AM, coltsith conla...@gmail.com wrote:
   Lets say I want to retrieve 4 objects. What would be faster:
 
  1. for (int i = 0; i  4; i++) {
 
  persistenceManager.getObjectById(object1)
 
  }
 
   or
 
  2. Query = (select * from objects where id == 'id1' || id == 'id2'
   || id == 'id3' || id == 'id4')
 
   Thanks
 
   --
   You received this message because you are subscribed to the Google
 Groups Google App Engine group.
   To post to this group, send email to google-appengine@googlegroups.com
 .
   To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com
 .
   For more options, visit this group athttp://
 groups.google.com/group/google-appengine?hl=en.

 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To post to this group, send email to google-appeng...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Domain name management

2010-07-19 Thread Barry Hunter
http://code.google.com/appengine/articles/domains.html

On 19 July 2010 12:52, liquid solutions liquidz.soluti...@gmail.com wrote:
 Hi Group
  I have registered a domain. Now i want the domain name www..org.
 should point to abaaaxx.appsoft.com.
 Right now it is forwarding it and hence when i type www..org it
 forwards to abaaaxxx.appsoft.com and i can see that on the browser. I
 should see only my domain name instead . Please suggest

 --
 You received this message because you are subscribed to the Google Groups 
 Google App Engine group.
 To post to this group, send email to google-appeng...@googlegroups.com.
 To unsubscribe from this group, send email to 
 google-appengine+unsubscr...@googlegroups.com.
 For more options, visit this group at 
 http://groups.google.com/group/google-appengine?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Domain name management

2010-07-19 Thread liquid solutions
Thanks Barry,
 I have already followed those steps but it does not work . Infact now i get
page not found error.Is it required that the hosted app is under the same
id  as google app .
eg
my hosted web is at a...@gmail.com wherelese my google aps are at
mydomain.org

On Mon, Jul 19, 2010 at 11:11 PM, Barry Hunter barrybhun...@gmail.comwrote:

 http://code.google.com/appengine/articles/domains.html

 On 19 July 2010 12:52, liquid solutions liquidz.soluti...@gmail.com
 wrote:
  Hi Group
   I have registered a domain. Now i want the domain name www..org.
  should point to abaaaxx.appsoft.com.
  Right now it is forwarding it and hence when i type www..org it
  forwards to abaaaxxx.appsoft.com and i can see that on the browser. I
  should see only my domain name instead . Please suggest
 
  --
  You received this message because you are subscribed to the Google Groups
 Google App Engine group.
  To post to this group, send email to google-appeng...@googlegroups.com.
  To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com
 .
  For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.
 
 

 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To post to this group, send email to google-appeng...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.



-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Re: Are key filters more efficient than ancestor queries?

2010-07-19 Thread Vladimir Prudnikov
Also keep in mind that you can't change parent property after you create an
object.

On 19 July 2010 13:26, Blixt andreasbl...@gmail.com wrote:

 Thanks Nick.

 The reason I use entity groups is not for any kind of performance
 reasons – I really need to make sure that the Parent entity is updated
 in combination with a Child entity being added, and the values being
 set are related to the order of entity insertions, so entity groups
 feel like the right thing to do to ensure data atomicity.

 My only thought is that I'd rather add redundancy (by adding a
 ReferenceProperty that can be inferred from the key) than lose
 performance. If the performance difference is negligible however, I'd
 rather not add an unnecessary property.

 /Blixt

 On Jul 19, 1:21 pm, Nick Johnson (Google) nick.john...@google.com
 wrote:
  Hi Blixt,
 
 
 
 
 
  On Mon, Jul 19, 2010 at 12:15 PM, Blixt andreasbl...@gmail.com wrote:
   Imagine the following models:
 
   class Parent(db.Model):
  name = db.StringProperty()
  count = db.IntegerProperty()
 
   class Child(db.Model):
  number = db.IntegerProperty()
  value = db.StringProperty()
 
   Whenever a new Child is added, it is added with a Parent as its parent
   entity in a transaction which also updates some values on the Parent.
 
   My question is this: To get a list of children that belongs to a
   Parent, is it more efficient to add a ReferenceProperty to the Child
   model and filter by that, than it is to use the ancestor filter in
   queries?
 
   To clarify in code:
 
   # Using ancestor
   Child.all().ancestor(parent_key).fetch(10)
   # Using filter on a new ReferenceProperty called 'my_parent'
   Child.all().filter('my_parent', parent_key).fetch(10)
 
  These two should have roughly the same performance.
 
  Bear in mind, though, that if you don't need entity groups for
 transaction
  purposes, you should avoid using ancestor relationships. Given that, the
  second approach is a better one - just not for query performance reasons.
 
  -Nick Johnson
 
 
 
   --
   You received this message because you are subscribed to the Google
 Groups
   Google App Engine group.
   To post to this group, send email to google-appengine@googlegroups.com
 .
   To unsubscribe from this group, send email to
   google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.comgoogle-appengine%2Bunsubscrib
 e...@googlegroups.com
   .
   For more options, visit this group at
  http://groups.google.com/group/google-appengine?hl=en.
 
  --
  Nick Johnson, Developer Programs Engineer, App Engine Google Ireland Ltd.
 ::
  Registered in Dublin, Ireland, Registration Number: 368047
  Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration
 Number:
  368047

 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To post to this group, send email to google-appeng...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com
 .
 For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.




-- 
*— Vladimir Prudnikov, ToBeeDo*

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] db.get(10 keys) vs. ModelType.all().filter(...).fetch(10)

2010-07-19 Thread Blixt
I'd like to know the performance difference between db.get()ting with
specific keys and getting the same entities using a filter.

I did a benchmark and using a query appears to be very slightly
faster. Are there situations where the performance can differ more?
Are there other pitfalls I should watch out for?

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: Conflicting info about taskqueues during scheduled downtime.

2010-07-19 Thread JK
But if the task queue is available then I could queue up a task to
write to the datastore
and it will write it when datastore is available. I would really like
to use this feature, hence
the question.

Thanks,
JK.

On Jul 19, 9:40 am, djidjadji djidja...@gmail.com wrote:
 Maybe the task can be created but will only execute when the
 maintenance period is ended.
 Most tasks want to write to the datastore or memcache. But both are
 disabled, so no need to try to
 run a task-request.

 2010/7/15 JK jan...@gmail.com:

  I was looking at the Brett Slatkins talk Building high-throughput
  data pipelines with Google App Engine and one of the comment that
  made was that taskqueues don't work in the maintenance mode. But I
  was looking at this

 http://www.slideshare.net/jasonacooper/strategies-for-maintaining-app...

  and one of the points in this is that you can use taskqueues to defer
  the data store insertion.

  I am confused now. Can someone clarify this please?

  --
  You received this message because you are subscribed to the Google Groups 
  Google App Engine group.
  To post to this group, send email to google-appeng...@googlegroups.com.
  To unsubscribe from this group, send email to 
  google-appengine+unsubscr...@googlegroups.com.
  For more options, visit this group 
  athttp://groups.google.com/group/google-appengine?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Re: Access from Israel

2010-07-19 Thread Ikai L (Google)
Hey guys,

The netex service captures URLs entered in Hebrew and searches for a correct
term in English. Could this be a possible cause of the 404s? Are users
entering Hebrew in their URLs? If you have an example URL in Hebrew it would
be very helpful.


On Thu, Jul 8, 2010 at 10:30 AM, Alon Carmel a...@aloncarmel.me wrote:

 i got to tell you, im on bezeq int and im not seeing any problems accessing
 appspot.com domains.

 -
 Cheers,
 public static function AlonCarmel() {
 //Contact me
 var email = 'a...@aloncarmel.me';

 var twitter = '@aloncarmel';
 var web = 'http://aloncarmel.me';
 var phone = '+972-54-4860380';
 }

 * If you received an unsolicited email from by mistake that wasn't of your
 matter please delete immediately. All E-mail sent from Alon Carmel is
 copyrighted to Alon Carmel 2008. Any details revealed in e-mails sent by
 Alon Carmel are owned by the Author only. Any attempt to duplicate or
 imitate any of the Content is prohibited under copyright law 2008.



 On Mon, Jun 7, 2010 at 8:47 AM, rainmaker a.thesilent...@gmail.comwrote:

 This is becoming a major inconvenience...any thoughts?

 On May 15, 12:46 pm, Alon Carmel a...@aloncarmel.me wrote:
  im from israel with bezeq international and i can access all the domains
  mentioned with no problem.
  -
  Cheers,
  public static function AlonCarmel() {
  //Contact me
  var email = '@aloncarmel.me';
  var twitter = '@aloncarmel';
  var web = 'http://aloncarmel.me';
  var phone = '+972-54-4860380';
 
  }
 
  * If you received an unsolicited email from by mistake that wasn't of
 your
  matter please delete immediately. All E-mail sent from Alon Carmel is
  copyrighted to Alon Carmel 2008. Any details revealed in e-mails sent by
  Alon Carmel are owned by the Author only. Any attempt to duplicate or
  imitate any of the Content is prohibited under copyright law 2008.
 
 
 
  On Fri, May 14, 2010 at 11:10 AM, ori ori.re...@gmail.com wrote:
   I'm having the same problem
 
   My ISP is Bezeq International too.
 
   On May 14, 9:16 am, rainmaker a.thesilent...@gmail.com wrote:
Switching to Google's DNS didn't work for me.
ISP is Bezeq International
 
On May 12, 6:11 pm, Ikai L (Google) ika...@google.com wrote:
 
 Have we narrowed down the cause yet? Is this a DNS issue? Does
 using
   8.8.8.8
 resolve this (http://code.google.com/speed/public-dns/)?
 
 If it is a DNS issue, what ISP are you using?
 
 On Wed, May 12, 2010 at 10:08 AM, rainmaker 
 a.thesilent...@gmail.com
   wrote:
 
  I can confirm the same behavior.
 
  On Apr 26, 9:36 pm, Ikai L (Google) ika...@google.com
 wrote:
   Can anyone else having problems switch their DNS to 8.8.8.8
 and
   8.8.4.4?
   It's starting to seem like this may be an ISP DNS resolution
   problem.
 
   On Mon, Apr 26, 2010 at 2:03 AM, Zarko eladza...@gmail.com
   wrote:
There seems to be a problem with the SSL certificate on
*.appspot.com. The browser think it's a redirect to
 another
   site and
block it, but you can revoke it like you mentioned.
 
If you use secure connections try https directly, it will
give you a redirect warning, but will work.
 
Zarko
 
On Apr 26, 10:06 am, Lior Harsat lior.har...@gmail.com
 wrote:
 I have the same issue.
 I did notice that if I switch to https I can access my
 servers.
 I can also verify that after I started using google DNS
 the
   problem
 was gone.
 this is good for me but I cant tell my customers to change
   their dns
 settings.
 please resolve this issue promptly
 
 --
 You received this message because you are subscribed to
 the
   Google
  Groups
Google App Engine group.
 To post to this group, send email to
  google-appeng...@googlegroups.com.
 To unsubscribe from this group, send email to
google-appengine+unsubscr...@googlegroups.comgoogle-appengine%2bunsubscr...@googlegroups.com
 google-appengine%2bunsubscr...@googlegroups.comgoogle-appengine%252bunsubscr...@googlegroups.com
 
   google-appengine%2bunsubscr...@googlegroups.comgoogle-appengine%252bunsubscr...@googlegroups.com
 google-appengine%252bunsubscr...@googlegroups.comgoogle-appengine%25252bunsubscr...@googlegroups.com
 
 
  google-appengine%2bunsubscr...@googlegroups.comgoogle-appengine%252bunsubscr...@googlegroups.com
 google-appengine%252bunsubscr...@googlegroups.comgoogle-appengine%25252bunsubscr...@googlegroups.com
 
   google-appengine%252bunsubscr...@googlegroups.comgoogle-appengine%25252bunsubscr...@googlegroups.com
 google-appengine%25252bunsubscr...@googlegroups.comgoogle-appengine%2525252bunsubscr...@googlegroups.com
 
 
.
 For more options, visit this group athttp://
groups.google.com/group/google-appengine?hl=en.
 
--
You received this message because you are subscribed to the
   Google
  Groups
Google App Engine 

[google-appengine] Re: Does anyone have a code example of AES encryption in python?

2010-07-19 Thread Zarko
Hi Denis,

I don't have a solution for your need...
But if you just need AES for transmitting security you can just use
https.
It uses AES  it's built in with your app-name.appspot.com domain.

Good luck

On Jul 19, 11:24 am, Denis Hoctor denishoc...@gmail.com wrote:
 Hi,

 I have a query string I need to encrypt using AES in CBC mode with
 zero padding, before finally encoding it to base64 and I need to run
 this on Google App Engine in Python.

 I've had a look around and can't be sure what works in GAE and what
 doesn't, I'm also finding it hard to get example code of some of those
 I believe should work, such as (http://code.google.com/p/slowaes/).

 Does anyone have a code example or link to one for AES encryption in
 python on Google App Engine?

 I think AESSlow seems to be the one to use with App Engine but can
 find no examples of how to implement it.

 Thanks,
 Denis

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] image operations... sharpen, blur, etc

2010-07-19 Thread Robert S
Can anyone recommend an API (either Java or Python) that can
accomplish more advanced Image ops? Of course it should be able to run
with the minimal JDK classes that are whitelisted for the GAE
runtime :)

thanks!

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: Subcategory Capability with GAE Datastore Models?

2010-07-19 Thread Bill Edwards
Hi guys,

Thanks for the suggestions!  However, there is a slight detail that I
forgot to mention.  I need to be able to dynamically define the
subcategories, and I have literally hundreds of them already defined
(more to be added by users).  Storing the categories as a
StringListProperty seems promising.  That means that when I'm writing
an entity to the datastore with a specific supercategory, I have to
look for all subcategories and add those to the list as well.  Can you
guys suggest a schema that won't require an extra call to the database
by storing the relationships within the schema?

Thanks!

On Jul 19, 2:20 am, gops patelgo...@gmail.com wrote:
 you can achieve this in polymodel by adding all common properties to
 polymodel base class and specific property to the hierarchy.

 i.e.

 Class LivingThing(polymodel.PolyModel):
     Kingdom = db.StringProperty()
     Phylum = db.StringProperty()
     Subphylum = db.StringProperty()

 Class Mammal(LivingThing):
     noofbreast = db.IntegerProperty()

 class Monkey(Mammal):
    canjump = db.BooleanProperty()

 now you can create class monkey as,
 Monkey(Kingdom=Animal,canjump=True)

 and later query as LivingThing.filter(Kingdom =,Animal).fetch()

 can return Monkey.

 On Jul 19, 1:04 pm, Bill Edwards twmaf...@gmail.com wrote:

  Hi!

  I've been recently trying to wrap my head around GAE's datatypes.  Is
  there a model type in GAE that allows me to define subproperties?  For
  example, I want to have a category property where some categories
  fall under others, and when i query for all entities within a
  supercategory, i get the subcategories also.

  For example:
  class Animals(db.Model):
      type = db.StringProperty()

  Animals(type='mammal')
  Animals(type='chimpanzee')
  Animals(type='monkey')

  When I query for all animals with type mammal, i want to return all 3
  of the above objects.

  I've read through the documentation, and the PolyModel datastore model
  has struck my eye as being potentially helpful.  However, it doesn't
  seem to quite do the job.

  Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] LargeImageError resizing large images on the BlobStore

2010-07-19 Thread José Moreira
Hello,

i'm getting LargeImageError resizing large images on the BlobStore, using
the blob_key as param.
The docs state that the Exception is thrown when the Images API returns
image data above 1mb on a transform, but i'm getting this error, afaik,
resizing image blobs to sizes that, here manually,m result in file sizes
bellow 1mb.

Anyone experienced any problems with this? Am i missing something?

-- 
irc://josemore...@irc.freenode.net
http://pt.linkedin.com/in/josemoreira
http://djangopeople.net/josemoreira

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: URLConnection Cookie Issue

2010-07-19 Thread TL
When you print all the cookie values, try to print the header key as
well to make sure you actually get set-cookie header in the response.
HttpURLConnection.getHeaderFieldKey(int n)
I use the underlying service, URLFetchService annd I get the set-
cookie headers, though I have to warn you that set-cookie headers are
corrupted in both URLFetchService and HttpURLConnection. See issue
3379
http://code.google.com/p/googleappengine/issues/detail?id=3379

And please star it if you want it to be fixed. If you want login
cookies, you want it fixed :)

Either way, my preference is to use the google native api for URLs
intead of the java .net api. Much clearer programming API, especially
when it comes to error handling and resource cleanup.

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: How to access the source code I uploaded

2010-07-19 Thread TL
You should be able to see it in your source control system :)
If you are on a budget, I had good luck with xp-dev

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Re: HTTPS on my own domain

2010-07-19 Thread TL
A word of caution:

When using your own proxy, some of the performance advantages and
features of app engine will not be available.
For example, static files: “App Engine serves static files from
separate servers than those that invoke servlets”
http://code.google.com/appengine/docs/java/gettingstarted/staticfiles.html
Now its your proxy that is serving those static files, unless you use
different URL schemes for files. So if app engine has edge caching or
a CDN for those files, you will not benefit from it.

It is also unclear whether DOS attack will take into account proxied
IPs (set in X-Forwarded-For header). Whether it is or not, you need to
handle DOS attacks on your proxy yourself.

In other words, proxying diminishes some of the advantages of using
app engine over other hosting options. So the real solution is that
google supports HTTPS by allocating IPs to customers that opt in (as
opposed to TLS).

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



Re: [google-appengine] Domain name management

2010-07-19 Thread Edel SM
check your DNS if www.xxx.org pointed (as CNAME) to ghs.google.com.
you can check via dig or nslookup.

On Tue, Jul 20, 2010 at 1:58 AM, liquid solutions
liquidz.soluti...@gmail.com wrote:
 Thanks Barry,
  I have already followed those steps but it does not work . Infact now i get
 page not found error.Is it required that the hosted app is under the same
 id  as google app .
 eg
 my hosted web is at a...@gmail.com wherelese my google aps are at
 mydomain.org

 On Mon, Jul 19, 2010 at 11:11 PM, Barry Hunter barrybhun...@gmail.com
 wrote:

 http://code.google.com/appengine/articles/domains.html

 On 19 July 2010 12:52, liquid solutions liquidz.soluti...@gmail.com
 wrote:
  Hi Group
   I have registered a domain. Now i want the domain name www..org.
  should point to abaaaxx.appsoft.com.
  Right now it is forwarding it and hence when i type www..org it
  forwards to abaaaxxx.appsoft.com and i can see that on the browser. I
  should see only my domain name instead . Please suggest
 
  --
  You received this message because you are subscribed to the Google
  Groups Google App Engine group.
  To post to this group, send email to google-appeng...@googlegroups.com.
  To unsubscribe from this group, send email to
  google-appengine+unsubscr...@googlegroups.com.
  For more options, visit this group at
  http://groups.google.com/group/google-appengine?hl=en.
 
 

 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To post to this group, send email to google-appeng...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.


 --
 You received this message because you are subscribed to the Google Groups
 Google App Engine group.
 To post to this group, send email to google-appeng...@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-appengine?hl=en.




-- 
edel

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] CPU Time / cpu_ms and api_cpu_ms

2010-07-19 Thread Gordon
hi,

i'm pretty new to the app engine and encountered some problems on
which i've not been able to find any information.

i've created a test application fetching some webpage and parsing the
result into the datastore.

here i see a big difference in the cpu time which i am not able to
explain. i've been trying to profile the complete parsing without
revealing any clues.


this is the log entry
  /parse 200 5019ms 47102cpu_ms 46500api_cpu_ms 16kb AppEngine-Google;
(+http://code.google.com/appengine)

having the following internal result
  PUT cost -643 megacycles for loop number: 100
  complete cost (including PUT) -724 megacycles for a total rows of
100.


the script does nothing else but fetching a page (including 100 rows),
parsing the information and batch inserting it into the datastore.

is there any information available how to improve this behavior, or if
im doing something i should not do?


thanks a lot and with best regards

gordon

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.



[google-appengine] Data Migration

2010-07-19 Thread amos
Hi,
I'm trying to build a commercial application but I'm pretty stuck on
an approach for data migration between versions of my application.

I found this thread which seems to have ended in 2008. Any updates
from Google on this? Any ideas?

http://groups.google.com/group/google-appengine/browse_thread/thread/af31f013857f36ae#


-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine group.
To post to this group, send email to google-appeng...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.