[appengine-java] Re: Facebook/social website design problem

2010-05-19 Thread boustanihani
Take a look at this, I think it should help =

Google I/O 2009 - Scalable, Complex Apps on App Engine:

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




-- 
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: Junit Problem

2010-05-19 Thread Ravi
Finally found the problem that in documentation its not mentioned that
few of the jars need to be included. They did mention few but not all,
may be documentation need to be fixed.
So it worked now. but now getting another problem, data is not being
persisted in local file. I am using following code
testLocalDatastoreServiceTestConfig = new
LocalDatastoreServiceTestConfig();
testLocalDatastoreServiceTestConfig.setBackingStoreLocation(C:\
\test.bin);
testLocalDatastoreServiceTestConfig.setNoStorage(false);
testHelper = new
LocalServiceTestHelper(testLocalDatastoreServiceTestConfig);

It tells me
The backing store, c:\test.bin, does not exist. It will be created.
But it is never created and i can see through logs that entity i
created was actually worked as i could print Key id field of it. which
comes as User(1), but then i can not query it using Id or any other
field as it was never persisted on file system.

Can you please help. I am using SDK 1.3.3

Thanks,
Ravi.


On May 18, 8:25 pm, Ravi Sharma ping2r...@gmail.com wrote:
 Hi,
 First time i am trying to run local junit test in eclipse. I am following
 exactly what is written 
 herehttp://code.google.com/appengine/docs/java/tools/localunittesting.html

 but no use, i am getting following error.

 com.google.apphosting.api.ApiProxy$CallNotFoundException: The API package
 'datastore_v3' or call 'RunQuery()' was not found.
     at
 com.google.appengine.tools.development.ApiProxyLocalImpl$AsyncApiCall.call(ApiProxyLocalImpl.java:284)
     at
 com.google.appengine.tools.development.ApiProxyLocalImpl$AsyncApiCall.call(ApiProxyLocalImpl.java:264)
     at
 java.util.concurrent.Executors$PrivilegedCallable$1.run(Executors.java:463)
     at java.security.AccessController.doPrivileged(Native Method)
     at
 java.util.concurrent.Executors$PrivilegedCallable.call(Executors.java:460)
     at
 java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)Query Ran
 Succesfully
 Returning results
 Tear Down

     at java.util.concurrent.FutureTask.run(FutureTask.java:138)
     at
 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
     at
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
     at java.lang.Thread.run(Thread.java:619)

 I searched on GAE group and found few things like i need to include
 following code in the setup and tear method. I dont see these methodas in
 documentation.. Also i tried to add in my code but then i dont find in app
 engine jars. So dont know what to do.

 ApiProxy.setEnvironmentForCurrentThread(new TestEnvironment());
 and
 ApiProxy.setDelegate(new ApiProxyLocalImpl(new File(.)){});
 (Taken from this 
 linkhttp://groups.google.com/group/google-appengine-java/browse_thread/th...
 (Max Ross's Reply))

 Is any thing missing on Docs on this 
 linkhttp://code.google.com/appengine/docs/java/tools/localunittesting.html, 
 as i
 am following it exactly written or may be my eyes are not able to find what
 i am missing.

 Please help.

 Thanks,
 Ravi.

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

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



[appengine-java] XMPP -- GAE in outage for our application

2010-05-19 Thread Jerome
For at least two hours, most of our customers are unable to send XMPP
messages to our GAE application.

Checking in the logs, all the users unable to talk with our app do not
have their Gtalk requests logged in /_ah/xmpp/message/chat/, so
basically GAE does not receive or map the requests to the servlet.

Surprisingly, there are a very few customers for which it is working
ok, but again most of them are unable to reach the app.

Jerome

-- 
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: XMPP -- GAE in outage for our application

2010-05-19 Thread Terry
The same problem for my apps.

On May 19, 3:49 pm, Jerome jerome.mou...@gmail.com wrote:
 For at least two hours, most of our customers are unable to send XMPP
 messages to our GAE application.

 Checking in the logs, all the users unable to talk with our app do not
 have their Gtalk requests logged in /_ah/xmpp/message/chat/, so
 basically GAE does not receive or map the requests to the servlet.

 Surprisingly, there are a very few customers for which it is working
 ok, but again most of them are unable to reach the app.

 Jerome

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

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



[appengine-java] Datastore - update a non-root entity does nothing

2010-05-19 Thread Xuel
Hello everybody !

I've been working with the wicket-gae-template which provides a good
entry in gae, however I have a big issue :

I have 3 entities, Astre, Region and Colon ; Astre has a list of
Region ; Region has a list of Colon.

Astre {
@PrimaryKey
  @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
  private Key key;

  @Persistent(mappedBy = astre)
  @Element(dependent = true)
  private ListRegion listeRegion = new ArrayListRegion();
}

Region {
@Persistent
  private Astre astre;

@PrimaryKey
  @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
  private Key key;

@Persistent(mappedBy = region, defaultFetchGroup=true)
  @Element(dependent = true)
  private ListColon listeColons = new ArrayListColon();
}

and Colon {
@Persistent
  private Region region;

}
(with other fields)

so Astre is a root entity, Region is a child of Astre and Colon a
child of Region.

When I load an Astre, i can modify it, upload it. I can modify, say,
the name of the 1st region, and the name of its 1st colon ; when i
make a pmProvider.get().makePersistent(astre);  the astre is updated
(I can see it with the dataviewer)

When I load a Region with a Key ID and modify its name, the
pmProvider.get().makePersistent(region); seems to do nothing. same for
Colon.
I have another root entity UserData with which i have also no
problem for updates.

Is there something I am missing about the updates of non-root
entities ?

-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to google-appengine-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: Persistent Identity of JPA Entities

2010-05-19 Thread Ravi
Just to put my 2 cents...
Even in JDO same thing happening. I got frustrated first but then i
just accepted it/ignored it(5-6 months back)...that may be they wont
fix it or they are not able to do it on GAE... But yes you are right
frameworks like Hibernate does provide key as soon as you call the
persist/save method and doesn't wait for commit call.

And i hope datanucleus(id) is not the official representative of Data
Nucleus framework/company, and if that is the case then it is sad that
such harsh reply are coming from official representative. I have never
seen such reply from google guys, we ask so basic/absurd/stupid/naive
questions all the time and they always reply politely and definitely
don't end the discussion with END.

Ravi.

On May 19, 7:06 am, Luca luca.mas...@gmail.com wrote:
 End  Very kind from you !! And you haven't asked twice.

 Anyway I will be back on the main argument that is the fact that I
 think DataNucleus is not working like all other JPA engines.

 Those lines you reports only says that flush synchronize the state to
 the underling database, nothing strange on that, is the behaviour I
 expect. And regarding the footnote I think that this is a very
 subtle case.

 I'm talking about a simple code like

                         tx.begin();

                         Luogo luogo = new Luogo();
                         luogo.setDescrizione(Ulisse Dini);
                         em.persist(luogo);

                         System.out.println(Luogo Key: +luogo.getKey());

                         tx.commit();

 there null will be printed only by DataNucleus, so that I have to
 design my code in a way specific to that persistence provider. If this
 is what you desire, well, you are sure in the right way.

 And also notice that the reference implementation (EclipseLink) works
 the way I expect, so please take a look at it.

 On May 19, 7:26 am, datanucleus andy_jeffer...@yahoo.com wrote:





  I've already asked you twice to post your class. You haven't. That
  provides no context for any comment, and I've already told you why
  datastore operations are delayed until commit/flush. Why do you think
  there's a flush() method if you think things ought to go straight to
  the datastore ?

  JPA2 spec page 29 footnote 12.
  spec[12] If the application does not set the primary key attribute
  corresponding to the relationship, the value of that attribute may not
  be available until after the entity has been flushed to the database./
  spec

  spec/**
  * Synchronize the persistence context to the underlying database.
  * @throws PersistenceException if the flush fails
  */
  public void flush();/spec

  spec• If X is a new entity, it becomes managed. The entity X will be
  entered into the database at or
  before transaction commit or as a result of the flush operation./
  spec

 http://www.datanucleus.org/products/accessplatform/jpa/transaction_ty...

  End.

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

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

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



[appengine-java] Re: Persistent Identity of JPA Entities

2010-05-19 Thread Luca
Thank you for your reply.

The fact is that yet we must switch from Relational to NoSQL, if also
I must understand tricky parts of a JPA engine that behave differently
from all the others, well, then I think I'll switch to Objectify or
something like this


On 19 Mag, 11:26, Ravi ping2r...@gmail.com wrote:
 Just to put my 2 cents...
 Even in JDO same thing happening. I got frustrated first but then i
 just accepted it/ignored it(5-6 months back)...that may be they wont
 fix it or they are not able to do it on GAE... But yes you are right
 frameworks like Hibernate does provide key as soon as you call the
 persist/save method and doesn't wait for commit call.

 And i hope datanucleus(id) is not the official representative of Data
 Nucleus framework/company, and if that is the case then it is sad that
 such harsh reply are coming from official representative. I have never
 seen such reply from google guys, we ask so basic/absurd/stupid/naive
 questions all the time and they always reply politely and definitely
 don't end the discussion with END.

 Ravi.

 On May 19, 7:06 am, Luca luca.mas...@gmail.com wrote:





  End  Very kind from you !! And you haven't asked twice.

  Anyway I will be back on the main argument that is the fact that I
  think DataNucleus is not working like all other JPA engines.

  Those lines you reports only says that flush synchronize the state to
  the underling database, nothing strange on that, is the behaviour I
  expect. And regarding the footnote I think that this is a very
  subtle case.

  I'm talking about a simple code like

                          tx.begin();

                          Luogo luogo = new Luogo();
                          luogo.setDescrizione(Ulisse Dini);
                          em.persist(luogo);

                          System.out.println(Luogo Key: +luogo.getKey());

                          tx.commit();

  there null will be printed only by DataNucleus, so that I have to
  design my code in a way specific to that persistence provider. If this
  is what you desire, well, you are sure in the right way.

  And also notice that the reference implementation (EclipseLink) works
  the way I expect, so please take a look at it.

  On May 19, 7:26 am, datanucleus andy_jeffer...@yahoo.com wrote:

   I've already asked you twice to post your class. You haven't. That
   provides no context for any comment, and I've already told you why
   datastore operations are delayed until commit/flush. Why do you think
   there's a flush() method if you think things ought to go straight to
   the datastore ?

   JPA2 spec page 29 footnote 12.
   spec[12] If the application does not set the primary key attribute
   corresponding to the relationship, the value of that attribute may not
   be available until after the entity has been flushed to the database./
   spec

   spec/**
   * Synchronize the persistence context to the underlying database.
   * @throws PersistenceException if the flush fails
   */
   public void flush();/spec

   spec• If X is a new entity, it becomes managed. The entity X will be
   entered into the database at or
   before transaction commit or as a result of the flush operation./
   spec

  http://www.datanucleus.org/products/accessplatform/jpa/transaction_ty...

   End.

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

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

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

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



[appengine-java] Introducing - Objectify module for the Play Framework

2010-05-19 Thread Dave Cheong
Hi all,

I know on this forum there are some developers building apps with the
Objectify library, which provides a great abstraction when working
with the Datastore.

I'm not sure how many people out there have heard of the Play
Framework - it is a super lightweight application framework that makes
Java web development rapid and easy. Play already has support for GAE/
J, and I've just released a module to allow Play to work with
Objectify.

Homepage:
http://code.google.com/p/play-framework-objectify/

Sample application (need a Google Account to login):
http://play-framework-objectify.appspot.com/

If you want more information about the Play Framework, go here:
http://www.playframework.org/

I invite the GAE/J community to take a look and see what you think. If
you have suggestions for improvement, don't hesitate to forward it on
or create an issue.

dave

-- 
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: Facebook/social website design problem

2010-05-19 Thread Ravi
Thanks Tristan
I like the idea of UserRegistrar class, may be i will use this to keep
the Friend relation.

But still worried about UserActivity as GAE doesn't support more then
30 parameters in contains query. So i will be able to query
UserActivity only for 30 users at one time(then run remaining in the
batch of 30 each) and then i will need to sort them in memory for
latest activities and it will not be scalable solution.So as Baz said
need to look into write once kind of solution. And make sure data is
not being duplicated a lot but i will just keep ids in every user's
activity table.
So something liek this
class Acitivty
{
Key id;
String status;

}

Class UserAcitivity{
Key id;
Key actitityId; //Id of Activity Class
Key userId; //Id of User Classm whome this UserActivity belongs
boolean myUpdate;//it will distinguish if this activity is mine or my
friends/some group etc
}

So basically if i want to update my status as Hurray i got some
solution. Then i will create one row for class Activity where my
status will be saved.
Then i will create one row in UserActitvity where my userId,just
created activityId and myUpdate=true.
And say i have 500 Friends, then i will create 500 more rows with
userId as my friend's id, activityId as what i created above and
myUpdate as false;(And i hope i will be able to finish it before Big
Daddy DeadlineExceedException comes to me :) )

So when i want to see all updates including mine and friend's on my
wall, then i will query this table(UserActivity) with userId=myId
order by updationDate and according to my web page i may be interested
in top 30 or 50 or 100 results only and then for that i can lookup
Activity table to get exact data.
And if retrieval of data from Activity class is pain, then i may merge
it with the userActivity and duplicate the data like activityStaus in
500 rows(just to make retrieval faster).


Feel free to comment on this design.

(There is always a better solution)
Thanks,
Ravi.





On May 19, 1:13 am, Tristan tristan.slomin...@gmail.com wrote:
 What about doing this?

 Have your user activity object keep track of friends as well... So
 something like

 Class UserActivity
 {
 Key id;
 String statusMessage;
 Date time;
 User user;
 ListKey friends

 }

 Then when you want to display the wall, you just query all User
 Activity objects that have your user in it. (for one, I would not user
 ListKey because you have a potential of running out of space, ie 
 1MB and then you start getting errors, but it's a design decision).
 But the above saves you a lot of time... because when User Activity is
 generated by user1 (who is friends with user2), you just copy the
 user1's friend list into it while you're creating it, so just 1 write
 operation. Then if you're user2 and want to see your wall, just run a
 query against User Activity where friends = user2Key. 1 query
 operation.

 As far as how to be friends of friends, instead of storing the
 relationship in your User object, have something like UserRegistrar
 that is essentially this:

 UserRegistrar {
 ListKey users

 }

 Most of the time you will just have 2 users in that list, but what
 that buys you is being able to do 1 write and document relationship
 going both ways. Then if you want to find friends of user2, you just
 query UserRegistrar where friends = user2. When you have all those,
 combine the list and every user listed (except listing of user2) is a
 friend of user2. So again, 1 query operation.

 On May 18, 1:47 pm, Baz b...@thinkloop.com wrote:



  I think you're best bet is to do all the work in the write, and have each
  profile's page constantly updated and ready for an extremely simple read.
  For one, this will significantly reduce your costs, because everyone reads
  more than they write. Two, by the time you get big enough to surpass the 30
  second limit, you will probably be able to use Background servers capable
  of running for longer than 30s 
  (http://code.google.com/appengine/docs/roadmap.html)

  Cheers,
  Baz

  On Tue, May 18, 2010 at 8:43 AM, Ravi ping2r...@gmail.com wrote:
   Thanks Li for looking into it.
   For me 1-2 minute delay is fine, problem is like contains query(for
   finding friend's data), i can pass max 30 user id, so basically on one
   page i will be able to show max 30.
   But in other case where wall type data need to be saved queries need
   to perform faster and need to break the limit of 30 as i would like to
   get latest activity from all of my friends rather then first 30
   friends. So if i have 300 friends i may need to run such query 10
   times in the batch of 30 nad each time need to go through activties
   and sort them out which will be very time consuming and sure user will
   not like the response time.
   I am thinking why not do it at the write time that my updates goes to
   all of friend's domain but again in one 30 second request i will try
   to create/update my domain(user Data) + 300(assuming i have 300
   friends) other 

[appengine-java] Re: 500 Error Caused by: java.lang.NoSuchMethodException: org.codehaus.groovy.runtime.dgm$692.init()

2010-05-19 Thread Scott
Are you guys including the Httpbuilder jar?  Because my application
works perfectly until I add that monster, then I get the same errors
as you.  If I then remove it, they go away.

I have tried deploying several times with the only difference being
the HttpBuilder jar, thus I have concluded that that is the culprit.

On May 5, 6:42 am, Christian Goudreau goudreau.christ...@gmail.com
wrote:
 I have the same problem from time to time... It's anying every 60 secondes
 my app throw that message.

 Christian



 On Wed, May 5, 2010 at 2:29 AM, Daisy dguo2...@gmail.com wrote:
  A few minutes after I posted the previous message, the app started to
  work.  But that is a testing app, and the real one's app id is
  shijinxiaochu, which still has the same problem.  Could somebody
  please fix that as well?  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 
 athttp://groups.google.com/group/google-appengine-java?hl=en.

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



[appengine-java] Re: Facebook/social website design problem

2010-05-19 Thread Tristan
I think you misunderstand what I proposed

Class UserActivity {
Key id;
Key activityId; // id of activity class
Key userId; // id of User class whom this user activity belongs to
--- vvv ADD THIS vvv ---
ListKey friendIds; // list of all of userId's friends
}

When you create an update to your status Hurray I got some solution,
you wil create one row for class user activity where your status will
be saved (and that row will have a list of all your friend ids in it).
That's it.. stop adding 500 rows, you don't need them. (you need to
put a list of all of your friends into every activity you create)

When your friends look at their wall, you just query UserActivity
where friendIds = friendId. (list query returns true if one of the
items in the list equals friendId). This will give them your update
because they are contained in friendIds list of that user activity.

Another way of saying this. Stop looking at it from perspective of
distributing the information all over the place when you create it.
Instead, via friendIds list, you are marking that activity with the
people who have access, and then when they ask for their wall, they
say give me all activities I have access to arranged by date.

On May 19, 9:42 am, Ravi ping2r...@gmail.com wrote:
 Thanks Tristan
 I like the idea of UserRegistrar class, may be i will use this to keep
 the Friend relation.

 But still worried about UserActivity as GAE doesn't support more then
 30 parameters in contains query. So i will be able to query
 UserActivity only for 30 users at one time(then run remaining in the
 batch of 30 each) and then i will need to sort them in memory for
 latest activities and it will not be scalable solution.So as Baz said
 need to look into write once kind of solution. And make sure data is
 not being duplicated a lot but i will just keep ids in every user's
 activity table.
 So something liek this
 class Acitivty
 {
 Key id;
 String status;
 

 }

 Class UserAcitivity{
 Key id;
 Key actitityId; //Id of Activity Class
 Key userId; //Id of User Classm whome this UserActivity belongs
 boolean myUpdate;//it will distinguish if this activity is mine or my
 friends/some group etc

 }

 So basically if i want to update my status as Hurray i got some
 solution. Then i will create one row for class Activity where my
 status will be saved.
 Then i will create one row in UserActitvity where my userId,just
 created activityId and myUpdate=true.
 And say i have 500 Friends, then i will create 500 more rows with
 userId as my friend's id, activityId as what i created above and
 myUpdate as false;(And i hope i will be able to finish it before Big
 Daddy DeadlineExceedException comes to me :) )

 So when i want to see all updates including mine and friend's on my
 wall, then i will query this table(UserActivity) with userId=myId
 order by updationDate and according to my web page i may be interested
 in top 30 or 50 or 100 results only and then for that i can lookup
 Activity table to get exact data.
 And if retrieval of data from Activity class is pain, then i may merge
 it with the userActivity and duplicate the data like activityStaus in
 500 rows(just to make retrieval faster).

 Feel free to comment on this design.

 (There is always a better solution)
 Thanks,
 Ravi.

 On May 19, 1:13 am, Tristan tristan.slomin...@gmail.com wrote:



  What about doing this?

  Have your user activity object keep track of friends as well... So
  something like

  Class UserActivity
  {
  Key id;
  String statusMessage;
  Date time;
  User user;
  ListKey friends

  }

  Then when you want to display the wall, you just query all User
  Activity objects that have your user in it. (for one, I would not user
  ListKey because you have a potential of running out of space, ie 
  1MB and then you start getting errors, but it's a design decision).
  But the above saves you a lot of time... because when User Activity is
  generated by user1 (who is friends with user2), you just copy the
  user1's friend list into it while you're creating it, so just 1 write
  operation. Then if you're user2 and want to see your wall, just run a
  query against User Activity where friends = user2Key. 1 query
  operation.

  As far as how to be friends of friends, instead of storing the
  relationship in your User object, have something like UserRegistrar
  that is essentially this:

  UserRegistrar {
  ListKey users

  }

  Most of the time you will just have 2 users in that list, but what
  that buys you is being able to do 1 write and document relationship
  going both ways. Then if you want to find friends of user2, you just
  query UserRegistrar where friends = user2. When you have all those,
  combine the list and every user listed (except listing of user2) is a
  friend of user2. So again, 1 query operation.

  On May 18, 1:47 pm, Baz b...@thinkloop.com wrote:

   I think you're best bet is to do all the work in the write, and have each
   profile's page constantly updated and ready 

[appengine-java] Task queue with Spring Security 3

2010-05-19 Thread jt
Hi,
Can the task queue url access checks be integrated with Spring
Security 3 authentication and authorization instead of Google
Accounts?  I am currently developing an app with Spring 3 and Spring
Security 3 with authentication and authorization based on Spring
Security 3 users and roles (the login and authorization checks with
the Spring Security users are successful on standard pages).

I am trying to run a task with the queue url (/app/admin/task/
deleteitems) configured to hasRole(ROLE_ADMINISTRATOR).  However,
when I am logged on as a user with ROLE_ADMINISTRATOR and I try to
execute the task, the logs shows that the server is requesting for the
login page.

Any help on this is greatly appreciated.  Thanks.

Regard
jt

-- 
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: XMPP -- GAE in outage for our application

2010-05-19 Thread Mihai Parparita
I'm also seeing this for app IDs partychapp and push-bot. Most of the
XMPP requests do not make it to the app (i.e. they're logged as /_ah/
xmpp/message/chat/ requests).

Mihai

On May 19, 5:04 am, Terry yaoxing...@126.com wrote:
 The same problem for my apps.

 On May 19, 3:49 pm, Jerome jerome.mou...@gmail.com wrote:





  For at least two hours, most of our customers are unable to send XMPP
  messages to our GAE application.

  Checking in the logs, all the users unable to talk with our app do not
  have their Gtalk requests logged in /_ah/xmpp/message/chat/, so
  basically GAE does not receive or map the requests to the servlet.

  Surprisingly, there are a very few customers for which it is working
  ok, but again most of them are unable to reach the app.

  Jerome

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

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

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



[appengine-java] cannot email more than 10 people at a time in GAE

2010-05-19 Thread Pla Gong
Hi, I am new to Google Application Engine.  I have an application  that
gives me a string of email addresses, then I composes a message  and sent it
out to all 80+ email addresses in the list.  When I do this, I get I am
following error:

Error: Server Error
The server encountered an error and could not complete your request.
If the problem persists, please report your problem and mention this error
message and the query that caused it.

If I send a message to 10 people, it works fine but when I send to more than
10, I see the problem. I am following the tutorial online.  My code is as
followed:

try {
Properties props = new Properties();
Session session = Session.getInstance(props, null);

Message msg = new MimeMessage(session);
msg.setFrom(new InternetAddress(user));
msg.setSubject(subMsg);
msg.setText(msgBody);

msg.addRecipients(Message.RecipientType.TOhttp://message.recipienttype.to/,
InternetAddress.parse(elist));

Transport.send(msg);

errorObject = Mail sent successfully.;

} catch (AddressException e) {
errorObject = Message contains invalid email address:
Address Exception occurred;
} catch (MessagingException e) {
errorObject = Messaging Exception occurred.: temp = +
temp + except= + e.getMessage();
}

Please let me know if GAE support emailing to 10+ people at a time.  Thanks
in advance.

Pla

-- 
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: XMPP -- GAE in outage for our application

2010-05-19 Thread Ikai L (Google)
We're receiving an All clear from Jerome. Can anyone else confirm whether
the issue is still appearing?

On Wed, May 19, 2010 at 5:29 AM, Mihai Parparita
mihai.parpar...@gmail.comwrote:

 I'm also seeing this for app IDs partychapp and push-bot. Most of the
 XMPP requests do not make it to the app (i.e. they're logged as /_ah/
 xmpp/message/chat/ requests).

 Mihai

 On May 19, 5:04 am, Terry yaoxing...@126.com wrote:
  The same problem for my apps.
 
  On May 19, 3:49 pm, Jerome jerome.mou...@gmail.com wrote:
 
 
 
 
 
   For at least two hours, most of our customers are unable to send XMPP
   messages to our GAE application.
 
   Checking in the logs, all the users unable to talk with our app do not
   have their Gtalk requests logged in /_ah/xmpp/message/chat/, so
   basically GAE does not receive or map the requests to the servlet.
 
   Surprisingly, there are a very few customers for which it is working
   ok, but again most of them are unable to reach the app.
 
   Jerome
 
   --
   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 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.comgoogle-appengine-java%2bunsubscr...@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.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 Relations, Google App Engine
Twitter: http://twitter.com/ikai
Delicious: http://delicious.com/ikailan


Google App Engine links:
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] SDK 1.3.4 released!

2010-05-19 Thread Ikai L (Google)
Hello, App Engine developers!

Hopefully you're all following along the Google I/O keynote and seen our
blog posts with new App Engine annoucements. Well, we've got another
exciting announcement: SDK 1.3.4 is LIVE! Get it below:

http://code.google.com/appengine/downloads.html

Release notes are below:

Java
---
Version 1.3.4
=
- Client side bulkloader available with the Python SDK that has a new
  configuration syntax and wizard for easier import/export with the
datastore.
  Can be used by enabling remote_api in your Java application
- Applications can now be configured to authenticate with OpenID by
selecting
  the OpenID option when creating your application in the admin console
http://code.google.com/p/googleappengine/issues/detail?id=248
http://code.google.com/p/googleappengine/issues/detail?id=56
- New API to allow App Engine apps to act as OAuth service providers
http://code.google.com/p/googleappengine/issues/detail?id=919
- The version update check in the Java SDK now uses https
- Allow full access to javax.el.*
http://code.google.com/p/googleappengine/issues/detail?id=3157
- Increased the timeout during deployment to 15 minutes
- Fixed an issue with JPA where an illegal cast exception was thrown during
the
  fetch of integer fields
- MemcacheService.setNamespace() is deprecated in favor of
  MemcacheServiceFactory.getMemcacheManager(namespace)
- Support in the SDK for Java 1.5 is being deprecated. These warnings now
appear
  when starting the SDK

-- 
Ikai Lan
Developer Relations, Google App Engine
Twitter: http://twitter.com/ikai
Delicious: http://delicious.com/ikailan


Google App Engine links:
Blog: http://googleappengine.blogspot.com
Twitter: http://twitter.com/app_engine
Reddit: http://www.reddit.com/r/appengine

ppengine target=_blankhttp://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] Cross-browser testing with GAE

2010-05-19 Thread JavaJosh
I'm developing a webapp and want to test in different browsers, but
cannot test with IE. I am stymied by the GAE development server's
refusal to answer to any address other than localhost, which is
necessary to get my Windows VM to talk to the server. I have VMWare
Fusion running IE6 with a so-called Host Only mode virtual network
adapter and I want to connect to my GAE dev instance on port . I
successfully use this technique with Tomcat (on port 8080), so I know
that my setup is working.

The key thing, I think, is to configure Jetty to answer to something
other than either 'localhost' or '127.0.0.1'. A search through
documentation, this group, and the general web turned up nothing.
However I'd be surprised if this hadn't come up before.

The other option, (which I would like to avoid, thank you!) is to
write or install a reverse proxy server on my Mac that fools the GAE
server into thinking packets are coming from 'localhost'.

How do I get the GAE dev server to answer to something other than
'localhost'?

Thanks,
Josh

-- 
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] Google App Engine For Business

2010-05-19 Thread Corby
I've been reading about the partnership with VMWare to delivery Google
App Engine For Business. This product looks like it will address all
of the major issues that have kept us off of GAE/J so far (overly
restrictive whitelist classloader, lack of relational database).

Is the GAE/J team working on this as an additional offering /
evolution of the GAE/J service? Or is this a completely different
branded service with its own development/support team?

-- 
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: 1MB limit and multi-put in datastore bug?

2010-05-19 Thread Mouseclicker
Great Thanks for sharing this! First two short remarks: Your ...-
src.jar only contains the .class files and the URL pointing to the
subversion is wrong. But no problem I was able to get it with a
subversion client.
You have created a wrapper around the datastore service, hiding its
limitations. Interesting idea. I have done something similar but with
a different approach. I have implemented Java InputStream and
OutputStream classes that read/write from the datastore without 1MB
limit. It basically consists of two classes GoogleBlobOutputStream and
GoogleBlobInputStream working like this:

  byte[] buf1 = ...
  byte[] buf2 = ...

  // generate some test data
  RandomInputStream rs = new RandomInputStream();

  try {
rs.read(buf1);
  } catch (IOException e) {
e.printStackTrace();
fail(Failed to read from RandomInputStream);
  }

  // write buffer to output stream
  GoogleBlobOutputStream out = new GoogleBlobOutputStream(kind,
name);
  try {
out.write(buf1);
out.close();
_id = out.getId(); // Google Stream specific
  } catch (IOException e) {
e.printStackTrace();
fail(Failed to write to OutputStream);
  }
}

// read from input stream

try {
   GoogleBlobInputStream in = new GoogleBlobInputStream(_id); //
Google Stream specific ctor with id
   in.read(buf2);
   in.close();
} catch (IOException e) {
   ...
} catch (EntityNotFoundException e) {
   ...
}

Internally the data are held in memory until a threshold is exceeded
(max 1 MB) and then persisted in an entity with a  Blob, this repeats
until the stream is closed where the remaining data are persisted.

Your inner workings and calculations are quite complex and I did not
understand it yet in detail. Given your interface being the same as
Google's it should be easy to setup a test app and compare it.

I would be also interested to see if you face the same Blob
performance as I do. Storing a trivial Blob of 25K costs about
500ms-800ms of CPU time. This is terribly slow and quickly eats up
your quota. With increasing size the number does not increase very
much. With 500KB it is about 1000ms. Not sure how to improve this. You
have to do this on the production server, local dev store behaves
differently.

I will try your stuff and see how it compares. I will let you know
when I have news.

-- 
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: convertMegacyclesToCpuSeconds delivers wrong values

2010-05-19 Thread Torquester
This was a bug, fixed as of Version 1.3.3 - April 21, 2010 according
to release notes:

Fixed an error where QuotaService.getCpuTimeInMegaCycles() was
returning cycles instead of megacycles

On Mar 24, 1:32 am, Torquester christian.schloem...@gmail.com wrote:
 I get values around 100, but according to the doc the value should
 be in seconds. But I guess it's rather 1 / 10 seconds or 1 /
 100 seconds (where the latter one seems to be more reasonable).

 following code:

 long start = qs.getCpuTimeInMegaCycles();
 //do something long running
 long end = qs.getCpuTimeInMegaCycles();
 double cpuSeconds = qs.convertMegacyclesToCpuSeconds(end - start);
 log.info(Time elapsed:  + String.valueOf(cpuSeconds));

 will produce output: Time elapsed: 1775013.563332

-- 
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: Upload to Blob Storage from Silverlight 4

2010-05-19 Thread Patrick Brown
Hi

   Sorry to reply to my own message but I am a bit stuck for now, has
anyone done anything similar or have any pointers on where I should
research?

Thanks,
Patrick

On May 17, 2:13 pm, Patrick Brown patrickcbr...@gmail.com wrote:
 Hello

    I have a silverlight application hosted in my Index.html page that
 I am able to upload blobs through to the DevAppServer.  Last week I
 enabled billing in my application, when I attempt in production I
 receive a Not Found exception after post but prior to my success
 handler being called.  To make this work I am creating a multipart
 form in silverlight and posting to an attach servlet ( shown here ),
 I see all the log messages but my upload handler is not hit running
 under the AppEngine.  Any ideas where I am going wrong or is there a
 better approach?

   I should say, I am very new to all of the technologies I am using
 here so I am sorry if my description is a bit rough.

 Thank you for your time and ideas.
 Patrick

 public void doPost(HttpServletRequest req, HttpServletResponse resp)
 throws IOException
 {
   log.info(Post attachment started);
   BlobstoreService blobstoreService =
 BlobstoreServiceFactory.getBlobstoreService();
   String uploadUrl = blobstoreService.createUploadUrl(/upload);

   log.info(Upload URL created);
   RequestDispatcher dispatcher =
 req.getRequestDispatcher(uploadUrl);
   log.info(String.format(dispatcher for %s retrieved, uploadUrl));

   try {
      log.info(forwarding);
      dispatcher.forward(req, resp);
      log.info(forwarded);
   } catch (ServletException e) {
      e.printStackTrace();
      log.info(e.getMessage());
   }

 }

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

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



[appengine-java] Re: Datastore - update a non-root entity does nothing

2010-05-19 Thread BimboJones
Hi,

Did you close the PersistenceManager before making the changes?
Is the key generated by appengine?



On 19 Maio, 10:21, Xuel mjo...@gmail.com wrote:
 Hello everybody !

 I've been working with the wicket-gae-template which provides a good
 entry in gae, however I have a big issue :

 I have 3 entities, Astre, Region and Colon ; Astre has a list of
 Region ; Region has a list of Colon.

 Astre {
 @PrimaryKey
   @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
   private Key key;

   @Persistent(mappedBy = astre)
   @Element(dependent = true)
   private ListRegion listeRegion = new ArrayListRegion();

 }

 Region {
 @Persistent
   private Astre astre;

 @PrimaryKey
   @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
   private Key key;

 @Persistent(mappedBy = region, defaultFetchGroup=true)
   @Element(dependent = true)
   private ListColon listeColons = new ArrayListColon();

 }

 and Colon {
 @Persistent
   private Region region;

 }

 (with other fields)

 so Astre is a root entity, Region is a child of Astre and Colon a
 child of Region.

 When I load an Astre, i can modify it, upload it. I can modify, say,
 the name of the 1st region, and the name of its 1st colon ; when i
 make a pmProvider.get().makePersistent(astre);  the astre is updated
 (I can see it with the dataviewer)

 When I load a Region with a Key ID and modify its name, the
 pmProvider.get().makePersistent(region); seems to do nothing. same for
 Colon.
 I have another root entity UserData with which i have also no
 problem for updates.

 Is there something I am missing about the updates of non-root
 entities ?

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

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



Re: [appengine-java] SDK 1.3.4 released!

2010-05-19 Thread Ravi Sharma
I Downloaded the SDK and tried to create SDK 1.3.4 in eclipse. The Zip file
was unzipped as D:\library\appengine-java-sdk-1.3.4, so while adding SDK in
eclipse i choose this as Installation dir.
But after choosing it says failed to initialize App ENgine SDK at
D:\library\appengine-java-sdk-1.3.4.
Am i doing something wrong here?.
When this version will be available through eclipse site directly?

Thanks,
Ravi


On Wed, May 19, 2010 at 6:30 PM, Ikai L (Google) ika...@google.com wrote:

 Hello, App Engine developers!

 Hopefully you're all following along the Google I/O keynote and seen our
 blog posts with new App Engine annoucements. Well, we've got another
 exciting announcement: SDK 1.3.4 is LIVE! Get it below:

 http://code.google.com/appengine/downloads.html

 Release notes are below:

 Java
 ---
 Version 1.3.4
 =
 - Client side bulkloader available with the Python SDK that has a new
   configuration syntax and wizard for easier import/export with the
 datastore.
   Can be used by enabling remote_api in your Java application
 - Applications can now be configured to authenticate with OpenID by
 selecting
   the OpenID option when creating your application in the admin console
 http://code.google.com/p/googleappengine/issues/detail?id=248
 http://code.google.com/p/googleappengine/issues/detail?id=56
 - New API to allow App Engine apps to act as OAuth service providers
 http://code.google.com/p/googleappengine/issues/detail?id=919
 - The version update check in the Java SDK now uses https
 - Allow full access to javax.el.*
 http://code.google.com/p/googleappengine/issues/detail?id=3157
 - Increased the timeout during deployment to 15 minutes
 - Fixed an issue with JPA where an illegal cast exception was thrown during
 the
   fetch of integer fields
 - MemcacheService.setNamespace() is deprecated in favor of
   MemcacheServiceFactory.getMemcacheManager(namespace)
 - Support in the SDK for Java 1.5 is being deprecated. These warnings now
 appear
   when starting the SDK

 --
 Ikai Lan
 Developer Relations, Google App Engine
 Twitter: http://twitter.com/ikai
 Delicious: http://delicious.com/ikailan

 
 Google App Engine links:
 Blog: http://googleappengine.blogspot.com
 Twitter: http://twitter.com/app_engine
 Reddit: http://www.reddit.com/r/appengine

 ppengine target=_blankhttp://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.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: Bad Java latency today

2010-05-19 Thread François Masurel
Even worse today : 
http://code.google.com/status/appengine/detail/serving-java/2010/05/19

On 17 mai, 18:06, François Masurel fm2...@mably.com wrote:
 http://code.google.com/status/appengine/detail/serving-java/2010/05/17

 Seems to be a different problem from last week as the datastore seems
 to be going fine :

 http://code.google.com/status/appengine/detail/datastore/2010/05/17

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

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



[appengine-java] Re: 1MB limit and multi-put in datastore bug?

2010-05-19 Thread Mouseclicker
Not sure that I have understood your code correctly, but as expected I
get the same error:

com.google.apphosting.api.ApiProxy$RequestTooLargeException: The
request to API call datastore_v3.Put() was too large.
at com.google.appengine.tools.development.ApiProxyLocalImpl
$AsyncApiCall.call(ApiProxyLocalImpl.java:288)
at com.google.appengine.tools.development.ApiProxyLocalImpl
$AsyncApiCall.call(ApiProxyLocalImpl.java:264)
...

Here is my code (local unit test):

_ds = new
MindashDatastoreServiceImpl(_testUtil.getDatastoreService(), new
DatastoreHelperImpl());

@Test
public void testSimplePersist() {
int size = 10 * 1024 * 1000;
byte[] buf = new byte[size];
_generator.nextBytes(buf);

Key key = createEntity(buf);
byte[] buf2 = readEntity(key);
checkBuffersForEquality(buf, buf2);
}

 private Key createEntity(byte[] buf) {
Entity ent = new Entity(MY_KIND);
Blob blob= new Blob(buf);
ent.setProperty(MY_PROP, blob);
Key key = _ds.put(ent);
return key;
  }

private byte[] readEntity(Key key) {
Entity ent = null;
try {
ent = _ds.get(key);
} catch (EntityNotFoundException e) {
fail(Failed to read entity from key
(EntityNotFoundException) + key);
} catch (EntityCorruptException e) {
fail(Failed to read entity from key
(EntityCorruptException) + key);
}
Blob blob = (Blob) ent.getProperty(MY_PROP);
return blob.getBytes();
  }


-- 
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] SDK 1.3.4 released!

2010-05-19 Thread Ravi Sharma
In my folder D:\library\appengine-java-sdk-1.3.4, i have following folders
bin
config
demos
docs
lib
src
and few files



On Wed, May 19, 2010 at 10:05 PM, Patrick Brown patrickcbr...@gmail.comwrote:

 Hi

I saw this problem when I installed, the sdk was actually in a sub
 folder of appengine-java-sdk-1.3.4, after moving it out it worked well.  Is
 this your issue also?

 Thanks,
 Patrick

 On Wed, May 19, 2010 at 4:38 PM, Ravi Sharma ping2r...@gmail.com wrote:

 I Downloaded the SDK and tried to create SDK 1.3.4 in eclipse. The Zip
 file was unzipped as D:\library\appengine-java-sdk-1.3.4, so while adding
 SDK in eclipse i choose this as Installation dir.
 But after choosing it says failed to initialize App ENgine SDK at
 D:\library\appengine-java-sdk-1.3.4.
 Am i doing something wrong here?.
 When this version will be available through eclipse site directly?

 Thanks,
 Ravi


 On Wed, May 19, 2010 at 6:30 PM, Ikai L (Google) ika...@google.comwrote:

 Hello, App Engine developers!

   Hopefully you're all following along the Google I/O keynote and seen
 our blog posts with new App Engine annoucements. Well, we've got another
 exciting announcement: SDK 1.3.4 is LIVE! Get it below:

 http://code.google.com/appengine/downloads.html

 Release notes are below:

  Java
   ---
 Version 1.3.4
 =
 - Client side bulkloader available with the Python SDK that has a new
   configuration syntax and wizard for easier import/export with the
 datastore.
   Can be used by enabling remote_api in your Java application
 - Applications can now be configured to authenticate with OpenID by
 selecting
   the OpenID option when creating your application in the admin console
 http://code.google.com/p/googleappengine/issues/detail?id=248
 http://code.google.com/p/googleappengine/issues/detail?id=56
 - New API to allow App Engine apps to act as OAuth service providers
 http://code.google.com/p/googleappengine/issues/detail?id=919
 - The version update check in the Java SDK now uses https
 - Allow full access to javax.el.*
 http://code.google.com/p/googleappengine/issues/detail?id=3157
 - Increased the timeout during deployment to 15 minutes
 - Fixed an issue with JPA where an illegal cast exception was thrown
 during the
   fetch of integer fields
 - MemcacheService.setNamespace() is deprecated in favor of
   MemcacheServiceFactory.getMemcacheManager(namespace)
 - Support in the SDK for Java 1.5 is being deprecated. These warnings now
 appear
   when starting the SDK

 --
 Ikai Lan
 Developer Relations, Google App Engine
 Twitter: http://twitter.com/ikai
 Delicious: http://delicious.com/ikailan

 
 Google App Engine links:
 Blog: http://googleappengine.blogspot.com
 Twitter: http://twitter.com/app_engine
 Reddit: http://www.reddit.com/r/appengine

 ppengine target=_blankhttp://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.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.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] java.lang.IllegalArgumentException: can't operate on multiple entity groups in a single transaction

2010-05-19 Thread laurent
i've searched for this error but don't find what it is.

my code :
ObjectifyService.register(Lock.class);
ObjectifyService.register(Connection.class);
ObjectifyService.register(Assignment.class);

if (ObjectifyService.begin().query(Connection.class).countAll() 
==
0) {

Objectify obj = ObjectifyService.beginTransaction();
obj.put(new Connection(DE PESSEMIER, Johann, 
projet));
obj.put(new Connection(AUCQUIERE, Eric, projet));

obj.put(new Lock(1l));

obj.getTxn().commit();
}

com.google.gwt.user.server.rpc.UnexpectedException: Service method
'public abstract java.util.List
miro.shared.GreetingService.getConnections()' threw an unexpected
exception: java.lang.IllegalArgumentException: can't operate on
multiple entity groups in a single transaction. found both Element {
  type: Connection
  id: 5
}
 and Element {
  type: Connection
  id: 6
}

at
com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:
378)
at
com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:
581)
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.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)

Thanks for your request

-- 
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] SDK 1.3.4 released!

2010-05-19 Thread Patrick Brown
Hi Ravi

   After my ( it's ) initial failure I went back in and chose that
installation directory again a second time then was able to select it in the
Use specific SDK combobox.  I am very new to all these tools so I can't
help much more, hopefully someone else will jump in.  Let me know if you
want me to try anythign though.

Patrick

On Wed, May 19, 2010 at 5:12 PM, Ravi Sharma ping2r...@gmail.com wrote:

 In my folder D:\library\appengine-java-sdk-1.3.4, i have following folders
 bin
 config
 demos
 docs
 lib
 src
 and few files




 On Wed, May 19, 2010 at 10:05 PM, Patrick Brown 
 patrickcbr...@gmail.comwrote:

 Hi

I saw this problem when I installed, the sdk was actually in a sub
 folder of appengine-java-sdk-1.3.4, after moving it out it worked well.  Is
 this your issue also?

 Thanks,
 Patrick

   On Wed, May 19, 2010 at 4:38 PM, Ravi Sharma ping2r...@gmail.comwrote:

 I Downloaded the SDK and tried to create SDK 1.3.4 in eclipse. The Zip
 file was unzipped as D:\library\appengine-java-sdk-1.3.4, so while adding
 SDK in eclipse i choose this as Installation dir.
 But after choosing it says failed to initialize App ENgine SDK at
 D:\library\appengine-java-sdk-1.3.4.
 Am i doing something wrong here?.
 When this version will be available through eclipse site directly?

 Thanks,
 Ravi


 On Wed, May 19, 2010 at 6:30 PM, Ikai L (Google) ika...@google.comwrote:

 Hello, App Engine developers!

   Hopefully you're all following along the Google I/O keynote and seen
 our blog posts with new App Engine annoucements. Well, we've got another
 exciting announcement: SDK 1.3.4 is LIVE! Get it below:

 http://code.google.com/appengine/downloads.html

 Release notes are below:

  Java
   ---
 Version 1.3.4
 =
 - Client side bulkloader available with the Python SDK that has a new
   configuration syntax and wizard for easier import/export with the
 datastore.
   Can be used by enabling remote_api in your Java application
 - Applications can now be configured to authenticate with OpenID by
 selecting
   the OpenID option when creating your application in the admin console
 http://code.google.com/p/googleappengine/issues/detail?id=248
 http://code.google.com/p/googleappengine/issues/detail?id=56
 - New API to allow App Engine apps to act as OAuth service providers
 http://code.google.com/p/googleappengine/issues/detail?id=919
 - The version update check in the Java SDK now uses https
 - Allow full access to javax.el.*
 http://code.google.com/p/googleappengine/issues/detail?id=3157
 - Increased the timeout during deployment to 15 minutes
 - Fixed an issue with JPA where an illegal cast exception was thrown
 during the
   fetch of integer fields
 - MemcacheService.setNamespace() is deprecated in favor of
   MemcacheServiceFactory.getMemcacheManager(namespace)
 - Support in the SDK for Java 1.5 is being deprecated. These warnings
 now appear
   when starting the SDK

 --
 Ikai Lan
 Developer Relations, Google App Engine
 Twitter: http://twitter.com/ikai
 Delicious: http://delicious.com/ikailan

 
 Google App Engine links:
 Blog: http://googleappengine.blogspot.com
 Twitter: http://twitter.com/app_engine
 Reddit: http://www.reddit.com/r/appengine

 ppengine target=_blankhttp://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.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.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
 

Re: [appengine-java] java.lang.IllegalArgumentException: can't operate on multiple entity groups in a single transaction

2010-05-19 Thread Jeff Schnitzer
You can't work with more than one entity group in a single
transaction.  This is a limitation of GAE, although other people have
built distributed 2pc-style transactions on top of the datastore.

This should help:

http://code.google.com/p/objectify-appengine/wiki/Concepts#Transactions

Jeff

On Wed, May 19, 2010 at 2:16 PM, laurent bagno_laur...@hotmail.com wrote:
 i've searched for this error but don't find what it is.

 my code :
                ObjectifyService.register(Lock.class);
                ObjectifyService.register(Connection.class);
                ObjectifyService.register(Assignment.class);

                if 
 (ObjectifyService.begin().query(Connection.class).countAll() ==
 0) {

                        Objectify obj = ObjectifyService.beginTransaction();
                        obj.put(new Connection(DE PESSEMIER, Johann, 
 projet));
                        obj.put(new Connection(AUCQUIERE, Eric, projet));

                        obj.put(new Lock(1l));

                        obj.getTxn().commit();
                }

 com.google.gwt.user.server.rpc.UnexpectedException: Service method
 'public abstract java.util.List
 miro.shared.GreetingService.getConnections()' threw an unexpected
 exception: java.lang.IllegalArgumentException: can't operate on
 multiple entity groups in a single transaction. found both Element {
  type: Connection
  id: 5
 }
  and Element {
  type: Connection
  id: 6
 }

        at
 com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:
 378)
        at
 com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:
 581)
        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.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)

 Thanks for your request

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



-- 
You received this message because you are subscribed to the Google Groups 
Google App Engine for Java group.
To post to this group, send email to 

Re: [appengine-java] java.lang.IllegalArgumentException: can't operate on multiple entity groups in a single transaction

2010-05-19 Thread Yasuo Higa
Hi laurent,

 You can't work with more than one entity group in a single
 transaction.  This is a limitation of GAE, although other people have
 built distributed 2pc-style transactions on top of the datastore.

Slim3 supports Global Transactions between multiple entity groups:
http://sites.google.com/site/slim3appengine/slim3-datastore/transactions/global-transaction

You may worry about the overhead of global transactions. Don't worry.
It is not very expensive.
We prepare the demonstration:
http://slim3demo.appspot.com/gtx/

Hope this helps,

Yasuo Higa

 This should help:

 http://code.google.com/p/objectify-appengine/wiki/Concepts#Transactions

 Jeff

 On Wed, May 19, 2010 at 2:16 PM, laurent bagno_laur...@hotmail.com wrote:
 i've searched for this error but don't find what it is.

 my code :
                ObjectifyService.register(Lock.class);
                ObjectifyService.register(Connection.class);
                ObjectifyService.register(Assignment.class);

                if 
 (ObjectifyService.begin().query(Connection.class).countAll() ==
 0) {

                        Objectify obj = ObjectifyService.beginTransaction();
                        obj.put(new Connection(DE PESSEMIER, Johann, 
 projet));
                        obj.put(new Connection(AUCQUIERE, Eric, 
 projet));

                        obj.put(new Lock(1l));

                        obj.getTxn().commit();
                }

 com.google.gwt.user.server.rpc.UnexpectedException: Service method
 'public abstract java.util.List
 miro.shared.GreetingService.getConnections()' threw an unexpected
 exception: java.lang.IllegalArgumentException: can't operate on
 multiple entity groups in a single transaction. found both Element {
  type: Connection
  id: 5
 }
  and Element {
  type: Connection
  id: 6
 }

        at
 com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:
 378)
        at
 com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:
 581)
        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.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)

 Thanks for your request

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

[appengine-java] Re: Cross-browser testing with GAE

2010-05-19 Thread Thomas
Hi:

   I am using Eclipse 3.4 plugin for GAE/J. The steps to make
DevServer serving clients from any IP addresses are below:

. Project  Properties  Run/Debug Setting  [Choose the configuartion
of your project]  Edit  Arguments

. Add the '-a 0.0.0.0' (excluding the single quote) argument into
[Program Arguments] and click OK.

. Restarts your app

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



[appengine-java] Re: List all entitie kinds from the datastore

2010-05-19 Thread Didier Durand
Hi Ladislav

Did you try on GAE itself or on your local dev server: stats don't
work locally

see
http://groups.google.com/group/google-appengine-java/browse_thread/thread/f2595bcaa2256a93/68a5a9a28502410b?lnk=gstq=Statistics#68a5a9a28502410b
or
http://groups.google.com/group/google-appengine-java/browse_thread/thread/eb07eb384e0275a8/1770f5246c4d6dd7?lnk=gstq=statistics#1770f5246c4d6dd7

cheers
didier

On May 18, 10:06 pm, Laco Skokan sko...@gmail.com wrote:
 I have tried, but it does not. I have ro specify kind_name as a
 parameter. But I want to list all kinds. If I do not specify the
 parameter, the stat returns null.

 Ladislav.

 On 18 kvě, 11:16, Didier Durand durand.did...@gmail.com wrote:



  Hi,

  did you try the sample code 
  athttp://code.google.com/appengine/docs/java/datastore/stats.html
  with __Stat_Kind__ ? Should do what you want.

  didier

  On May 17, 10:51 pm, Laco Skokan sko...@gmail.com wrote:

   Hello,

   did anybody tried to list all entity kinds from the datastore? How can
   this be done?
   I try to use Datastore statistics, but it does not seems to be useful
   for this task.

   Any ideas? Thank you, Ladislav.

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

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

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

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



[appengine-java] Re: Persistent Identity of JPA Entities

2010-05-19 Thread Luca
Some more infos.

The behavious of DataNucleus depends on the strategy I choose to
generate the @Id field.

When I use GAE I always use the GenerationType.IDENTITY because I read
that on JDO docs (http://code.google.com/appengine/docs/java/datastore/
dataclasses.html:  Primary keys of type Key require a @PrimaryKey
annotation and a @Persistent(valueStrategy =
IdGeneratorStrategy.IDENTITY) annotation) and I saw that GAE
documentation about JDO is usually more deep that JPA documentation.

But If I choose GenerationType.AUTO then I see that also DataNucleus,
like all the other persistence provider, generate the key after the
persist and before the flush/commit. Very strange indeed because for
H2 DataBase the AUTO should choose IDENTITY generation.

I'm still more convinced this is a bug in DataNucleus that affect the
way we work on Google App Engine.

On 19 Mag, 07:26, datanucleus andy_jeffer...@yahoo.com wrote:
 I've already asked you twice to post your class. You haven't. That
 provides no context for any comment, and I've already told you why
 datastore operations are delayed until commit/flush. Why do you think
 there's a flush() method if you think things ought to go straight to
 the datastore ?

 JPA2 spec page 29 footnote 12.
 spec[12] If the application does not set the primary key attribute
 corresponding to the relationship, the value of that attribute may not
 be available until after the entity has been flushed to the database./
 spec

 spec/**
 * Synchronize the persistence context to the underlying database.
 * @throws PersistenceException if the flush fails
 */
 public void flush();/spec

 spec• If X is a new entity, it becomes managed. The entity X will be
 entered into the database at or
 before transaction commit or as a result of the flush operation./
 spec

 http://www.datanucleus.org/products/accessplatform/jpa/transaction_ty...

 End.

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

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



Re: [appengine-java] Re: Persistent Identity of JPA Entities

2010-05-19 Thread Chau Huynh
I just wonder if you need an unique ID only, then you can let Google do it
for you (sorry if this interrupted your discussion)
http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/datastore/DatastoreService.html#allocateIds%28com.google.appengine.api.datastore.Key,%20java.lang.String,%20long%29

On Thu, May 20, 2010 at 11:45 AM, Luca luca.mas...@gmail.com wrote:

 Some more infos.

 The behavious of DataNucleus depends on the strategy I choose to
 generate the @Id field.

 When I use GAE I always use the GenerationType.IDENTITY because I read
 that on JDO docs (http://code.google.com/appengine/docs/java/datastore/
 dataclasses.htmlhttp://code.google.com/appengine/docs/java/datastore/%0Adataclasses.html:
  Primary keys of type Key require a @PrimaryKey
 annotation and a @Persistent(valueStrategy =
 IdGeneratorStrategy.IDENTITY) annotation) and I saw that GAE
 documentation about JDO is usually more deep that JPA documentation.

 But If I choose GenerationType.AUTO then I see that also DataNucleus,
 like all the other persistence provider, generate the key after the
 persist and before the flush/commit. Very strange indeed because for
 H2 DataBase the AUTO should choose IDENTITY generation.

 I'm still more convinced this is a bug in DataNucleus that affect the
 way we work on Google App Engine.

 On 19 Mag, 07:26, datanucleus andy_jeffer...@yahoo.com wrote:
  I've already asked you twice to post your class. You haven't. That
  provides no context for any comment, and I've already told you why
  datastore operations are delayed until commit/flush. Why do you think
  there's a flush() method if you think things ought to go straight to
  the datastore ?
 
  JPA2 spec page 29 footnote 12.
  spec[12] If the application does not set the primary key attribute
  corresponding to the relationship, the value of that attribute may not
  be available until after the entity has been flushed to the database./
  spec
 
  spec/**
  * Synchronize the persistence context to the underlying database.
  * @throws PersistenceException if the flush fails
  */
  public void flush();/spec
 
  spec• If X is a new entity, it becomes managed. The entity X will be
  entered into the database at or
  before transaction commit or as a result of the flush operation./
  spec
 
  http://www.datanucleus.org/products/accessplatform/jpa/transaction_ty...
 
  End.
 
  --
  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 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.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] jspx extension

2010-05-19 Thread Michael B
I'm sure I'm making an obvious mistake here, but it seems my jspx
files don't seem to get compiled while my jsp do even if I fill them
with jspx-type content. How do I get the GAE to also compile my jspx
files?

Other then renaming jspx to jsp being a hassle it also seems very
dirty.

-- 
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: Persistent Identity of JPA Entities

2010-05-19 Thread Luca Masini
You're completely right, but I want the JPA provider to do that for me :)

Thank you for your help.

On 5/20/10, Chau Huynh cmhu...@gmail.com wrote:
 I just wonder if you need an unique ID only, then you can let Google do it
 for you (sorry if this interrupted your discussion)
 http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/datastore/DatastoreService.html#allocateIds%28com.google.appengine.api.datastore.Key,%20java.lang.String,%20long%29

 On Thu, May 20, 2010 at 11:45 AM, Luca luca.mas...@gmail.com wrote:

 Some more infos.

 The behavious of DataNucleus depends on the strategy I choose to
 generate the @Id field.

 When I use GAE I always use the GenerationType.IDENTITY because I read
 that on JDO docs (http://code.google.com/appengine/docs/java/datastore/
 dataclasses.htmlhttp://code.google.com/appengine/docs/java/datastore/%0Adataclasses.html:
  Primary keys of type Key require a @PrimaryKey
 annotation and a @Persistent(valueStrategy =
 IdGeneratorStrategy.IDENTITY) annotation) and I saw that GAE
 documentation about JDO is usually more deep that JPA documentation.

 But If I choose GenerationType.AUTO then I see that also DataNucleus,
 like all the other persistence provider, generate the key after the
 persist and before the flush/commit. Very strange indeed because for
 H2 DataBase the AUTO should choose IDENTITY generation.

 I'm still more convinced this is a bug in DataNucleus that affect the
 way we work on Google App Engine.

 On 19 Mag, 07:26, datanucleus andy_jeffer...@yahoo.com wrote:
  I've already asked you twice to post your class. You haven't. That
  provides no context for any comment, and I've already told you why
  datastore operations are delayed until commit/flush. Why do you think
  there's a flush() method if you think things ought to go straight to
  the datastore ?
 
  JPA2 spec page 29 footnote 12.
  spec[12] If the application does not set the primary key attribute
  corresponding to the relationship, the value of that attribute may not
  be available until after the entity has been flushed to the database./
  spec
 
  spec/**
  * Synchronize the persistence context to the underlying database.
  * @throws PersistenceException if the flush fails
  */
  public void flush();/spec
 
  spec• If X is a new entity, it becomes managed. The entity X will be
  entered into the database at or
  before transaction commit or as a result of the flush operation./
  spec
 
  http://www.datanucleus.org/products/accessplatform/jpa/transaction_ty...
 
  End.
 
  --
  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 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.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.




-- 

http://www.lucamasini.net
http://twitter.com/lmasini
http://www.linkedin.com/pub/luca-masini/7/10/2b9


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