Re: [appengine-java] Where is the datastore file on windows?

2010-06-13 Thread Chau Huynh
It's located at Eclipse workspace\Your app\war\WEB-INF\appengine-generated ... On Sun, Jun 13, 2010 at 3:25 PM, quqtalk quqt...@gmail.com wrote: Use below Java code: private static final PersistenceManagerFactory pmfInstance = JDOHelper.getPersistenceManagerFactory(transactions-optional);

Re: [appengine-java] Records Count

2010-06-12 Thread Chau Huynh
Can you please try: select count (this) from entity? This topic was discussed once or more in the group... On Fri, Jun 11, 2010 at 5:39 PM, RAVINDER MAAN rsmaan...@gmail.com wrote: How can we get records count for a query in JDO. In sql we have select count(*) from table_name i want to get

Re: [appengine-java] Re: Transaction exception when not using a transaction ?

2010-06-04 Thread Chau Huynh
Did you have different entity groups inside a transaction? Google have a constraint of what can be done in a transaction here http://code.google.com/appengine/docs/python/datastore/transactions.html#What_Can_Be_Done_In_a_Transaction On Fri, Jun 4, 2010 at 5:45 PM, JD liva...@gmail.com wrote:

Re: [appengine-java] How to use Key as filter

2010-05-31 Thread Chau Huynh
Check this out http://gae-java-persistence.blogspot.com/2010/01/querying-with-key-parameters.html Key is special datatype and you will need to use help API by Google to re-create the key before passing it in. On Sun, May 30, 2010 at 9:47 PM, Dormand mfjhs...@gmail.com wrote: Hi, I have a

[appengine-java] Delete error version

2010-05-26 Thread Chau Huynh
Hello Google, Can you please help me to delete an error version in my app? When I tried to delete it, the system reported Server Error. A server error has occurred. My app id: gaepocdemo Error version: 3 Thanks -- You received this message because you are subscribed to the Google Groups

Re: [appengine-java] Re: AppEngine gets very slow when not used for some time

2010-05-24 Thread Chau Huynh
that it can be shared between the jvm instances. Any pointers or clues highly appreciated. Thanks, Rahul On May 22, 10:51 pm, Chau Huynh cmhu...@gmail.com wrote: It seems like loading request... http://code.google.com/appengine/kb/java.html#What_Is_A_Loading_Request On Sun, May 23, 2010

Re: [appengine-java] AppEngine gets very slow when not used for some time

2010-05-22 Thread Chau Huynh
It seems like loading request... http://code.google.com/appengine/kb/java.html#What_Is_A_Loading_Request On Sun, May 23, 2010 at 4:55 AM, Rahul rahul.jun...@gmail.com wrote: I have an application running on appengine and no doubt it works great. but when the application is not used for some

Re: [appengine-java] appengine unaware code!

2010-05-21 Thread Chau Huynh
You can take a look on 4 types of key on app engine and choose what you want: http://code.google.com/appengine/docs/java/datastore/creatinggettinganddeletingdata.html#Keys On Sat, May 22, 2010 at 5:35 AM, aijazzz aija...@gmail.com wrote: Hi, I was looking to some examples to start my work on

Re: [appengine-java] delete the entries in the datastore

2010-05-21 Thread Chau Huynh
Have you tried searching the groups, this topic was discussed in detail with experience shared.. http://groups.google.com/group/google-appengine-java/search?group=google-appengine-javaq=delete+all+entitiesqt_g=Search+this+group In summary, advise from the group is to use Task Queue to work on

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)

Re: [appengine-java] DateTime Comparison

2010-05-07 Thread Chau Huynh
Can you please try declare the date parameter and let the library help you pass it in? WHERE date :date query.setParameter(date, date); On Fri, May 7, 2010 at 12:19 PM, CodeMan chinu...@yahoo.com wrote: Hi, I am trying to fetch all records after a timestamp with this query select from

Re: [appengine-java] [JDO Paging] Getting a cursor BEFORE the end of results

2010-05-07 Thread Chau Huynh
QueryResultIterator so the getCursor() call will return the correct location. Jeff On Thu, May 6, 2010 at 8:48 PM, Chau Huynh cmhu...@gmail.com wrote: Hi Jeff, With JPA I will need to excute getResultList() to get a collection http://java.sun.com/javaee/5/docs/api/javax/persistence/Query.html

Re: [appengine-java] DataNucleus JPA Lifecycle Callbacks

2010-05-06 Thread Chau Huynh
My entity classes were annotated, and work both in local and appspot. Thanks On Thu, May 6, 2010 at 4:02 PM, Simon qila...@gmail.com wrote: Has anyone managed to get the JPA lifecycle callbacks to work? I've annotated methods with @PrePersist and @PostLoad and the methods just never get

Re: [appengine-java] Re: DataNucleus JPA Lifecycle Callbacks

2010-05-06 Thread Chau Huynh
share? On May 6, 10:15 am, Chau Huynh cmhu...@gmail.com wrote: My entity classes were annotated, and work both in local and appspot. Thanks On Thu, May 6, 2010 at 4:02 PM, Simon qila...@gmail.com wrote: Has anyone managed to get the JPA lifecycle callbacks to work? I've

Re: [appengine-java] Re: Is there any way that key name/id can be used in JPQL/JDQL?

2010-05-06 Thread Chau Huynh
Have you tried with KeyFactory? http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/datastore/KeyFactory.html In this post Max Ross of Google guided how to query with Key, may it help you.. http://gae-java-persistence.blogspot.com/2010/01/querying-with-key-parameters.html

Re: [appengine-java] [JDO Paging] Getting a cursor BEFORE the end of results

2010-05-06 Thread Chau Huynh
Hi Jeff, With JPA I will need to excute getResultList() to get a collection http://java.sun.com/javaee/5/docs/api/javax/persistence/Query.html#getResultList() Somehow org.datanucleus.store.appengine.query.getCursor(Iterator? iter) can not get the cursor in the middle of my iterator, a null value

Re: [appengine-java] [JDO Paging] Getting a cursor BEFORE the end of results

2010-05-06 Thread Chau Huynh
There's 1 typo in my message, please read org.datanucleus.store.appengine.query.CursorHelper.getCursor(Iterator? iter) Thanks On Fri, May 7, 2010 at 10:48 AM, Chau Huynh cmhu...@gmail.com wrote: Hi Jeff, With JPA I will need to excute getResultList() to get a collection http

[appengine-java] Versioning error using primitive int/Integer

2010-05-06 Thread Chau Huynh
Hello app engine team, It seems to me there is an issue trying to persist a @Version int field. System reports error ClassCassException from Long to Integer... java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer at test.TestEntity.jdoReplaceField(TestEntity.java)

[appengine-java] Common Annotations - javax.annotation.PostConstruct

2010-05-05 Thread Chau Huynh
Hello, Can anyone please advise how to get @PostConstruct invoked in App Engine (SDK version 1.3.3.1)? I tried with servlet and JPA/JDO but the conallback method was not triggered. Can you please take a look and let me know if I missed something? Thanks. public class TestServlet extends

Re: [appengine-java] Cursor support with JPA

2010-05-05 Thread Chau Huynh
Hi, Cursor provides a point so that query will execute after that. I don't think you can achieve the same thing with query.setFirstResult() Below is code I ran based on consulting JDO example and JPA javadocs. Hope this helps EntityManager em = ... Query query = em.createQuery(queryString);

Re: [appengine-java] [JDO Paging] Getting a cursor BEFORE the end of results

2010-05-05 Thread Chau Huynh
About JDO/JPA, I tried the same thing, and Google advised to make 2 calls: the first one is your query, the second one, which is a key-only single item query so that it can be cheap, to check if more data is available.

Re: [appengine-java] Datastore cursor return value question - CursorHelper.getCursor(List?)

2010-04-30 Thread Chau Huynh
the entities: http://code.google.com/appengine/docs/java/datastore/queriesandindexes.html#Queries_on_Keys On Wed, Apr 21, 2010 at 4:10 AM, Chau Huynh cmhu...@gmail.com wrote: Hello app engine team, I'd like to have a search form, which allows user to search next if more result available

Re: [appengine-java] Can you use cursors to go back?

2010-04-30 Thread Chau Huynh
You can find a more detailed discussion on this here http://groups.google.com/group/google-appengine-java/browse_thread/thread/da8b96441b0ae038/667aac2bb4109097?lnk=raot On Fri, Apr 30, 2010 at 1:17 AM, korey_sed kouro...@gmail.com wrote: I wonder if the java datastore API's cursor is a forward

Re: [appengine-java] Data store Low-level API and filters

2010-04-30 Thread Chau Huynh
Maybe Query.addFilter() can help you? http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/datastore/Query.html#addFilter%28java.lang.String,%20com.google.appengine.api.datastore.Query.FilterOperator,%20java.lang.Object%29 Just wonder if JPA/JDO can fit into your case:

Re: [appengine-java] Re: Querying child objects based on parent key

2010-04-30 Thread Chau Huynh
I think korey_sed wanted to share knowledge base on his hand on experience, his example should work... The point in his example is querying with key, whether it's in child on parent or child class http://gae-java-persistence.blogspot.com/2010/01/querying-with-key-parameters.html Obviously loading

Re: [appengine-java] Re: Data store Low-level API and filters

2010-04-30 Thread Chau Huynh
Hi, Query.addFilter() help to add filter, but not with OR operation as your need (sorry for my bad reading). http://gae-java-persistence.blogspot.com/2009/12/queries-with-and-in-filters.html This post explained that JPA/JDO (datanucleus-appengine) in fact break the query into multiple ones. If

Re: [appengine-java] Re: about count query

2010-04-28 Thread Chau Huynh
, Chau Huynh cmhu...@gmail.com wrote: On Wed, Apr 28, 2010 at 5:24 AM, Joe Fawzy joewic...@gmail.com wrote: select count (this) from User Since when app engine support group operation? ;-) On Wed, Apr 28, 2010 at 5:24 AM, Joe Fawzy joewic...@gmail.com wrote: Hi all i am

Re: [appengine-java] Re: Manually restart GAE on the cloud

2010-04-28 Thread Chau Huynh
it, then change to the new version, delete the old one. BaTien DBGROUPS and BudhNet On Wed, 2010-04-28 at 11:15 +0700, Chau Huynh wrote: Delete the version and redeploy, maybe? Or should Google hep you look into your case, as App Engine user do not have such direct control on their system

Re: [appengine-java] What happens when I don't close persistenceManagers?

2010-04-28 Thread Chau Huynh
Hi Jaroslav, I think the Article entity returned was detached already, right? In fact you can try a simple test by modifying the returned object and verify it value on Admin Console. The PersistenceManagerFactory takes time to init, but once only (

Re: [appengine-java] Specifying a date filter in a query

2010-04-27 Thread Chau Huynh
http://www.datanucleus.org/products/accessplatform_2_0/jdo/jdoql.htmlExample 3 is the right answer for you. It might be better if you could go through document to have an understanding on its concepts first. Thanks. On Wed, Apr 28, 2010 at 1:36 AM, Vinay vinaytand...@gmail.com wrote: Hi, I am

Re: [appengine-java] about count query

2010-04-27 Thread Chau Huynh
On Wed, Apr 28, 2010 at 5:24 AM, Joe Fawzy joewic...@gmail.com wrote: select count (this) from User Since when app engine support group operation? ;-) On Wed, Apr 28, 2010 at 5:24 AM, Joe Fawzy joewic...@gmail.com wrote: Hi all i am using JDO and i want to count the number of entities so which

Re: [appengine-java] Re: Manually restart GAE on the cloud

2010-04-27 Thread Chau Huynh
Delete the version and redeploy, maybe? Or should Google hep you look into your case, as App Engine user do not have such direct control on their system to reboot. On Wed, Apr 28, 2010 at 10:54 AM, Phuong Nguyen phuongn...@gmail.comwrote: I think disable/enable your app doesnot reboot JVM.

Re: [appengine-java] Handling concurrent modification

2010-04-23 Thread Chau Huynh
Maybe you can look into low level API to obtain a lock http://code.google.com/appengine/docs/java/javadoc/com/google/appengine/api/memcache/MemcacheService.html#increment%28java.lang.Object,%20long%29 There're also sample implementation using this posted in the group

[appengine-java] Datastore cursor return value question - CursorHelper.getCursor(List?)

2010-04-21 Thread Chau Huynh
Hello app engine team, I'd like to have a search form, which allows user to search next if more result available by using a Cursor. My issue is, in the last chunk, I am not able to detect if it's. Therefore, I will need to execute one additional query to test if more data. Can you please advise

Re: [appengine-java] Re: One - Many Child Persistence help

2010-04-20 Thread Chau Huynh
On Tue, Apr 20, 2010 at 5:48 PM, DeliveryNinja noble1...@googlemail.comwrote: It seems that having any data in the ListComment comments in the Content.java causes the serialization error. Even when I've removed all the data from the Serializable class Comment.java. So it has nothing but a

Re: [appengine-java] Google App Engine for Java app couldn’t find javac ?

2010-04-20 Thread Chau Huynh
Please try verification step in Getting Java session from the tutorial http://code.google.com/appengine/docs/java/gettingstarted/installing.html java -version javac -version If error, it's likely you need to add {JAVA_HOME}\bin to Path variable. Typically you might need to remove bin out of your

Re: [appengine-java] Re: HTTP ERROR 405 with Guestbook Tutorial

2010-04-17 Thread Chau Huynh
()); if (user != null) { resp.setContentType(text/plain); resp.getWriter().println(Hello, + user.getNickname()); } else { resp.sendRedirect(userService.createLoginURL(req.getRequestURI())); } } } On Fri, Apr 16, 2010 at 12:16 PM, Chau Huynh cmhu

[appengine-java] Deployment Descriptor Filters: typo in example

2010-04-15 Thread Chau Huynh
Hello, It looks like a typo in http://code.google.com/appengine/docs/java/config/webxml.html#Filters Code: filterConfig.doFilter(request, response); Also sample LogFilterImpl does not implement all methods defined in javax. servlet.Filter Can you please take a look and update. Thanks -- You

Re: [appengine-java] Re: Objectify - Twig - SimpleDS articles

2010-03-30 Thread Chau Huynh
First of all, please accept big thanks, Andreas. Those knowledge sharing is helpful to me as well as other learners. Follow the thread, I think I was a bit misled on benefit of SQL/JDBC on GAE. In Andreas blog's, he mentioned on learning curve to deal with the mapping: Java classess -- JDO/JPA -

Re: [appengine-java] Adding, updating and deleting fields in app engine's datastore

2010-03-28 Thread Chau Huynh
You might want to use wrapper class (Long instead of long) to add new field to load existing data. To remove a property, you will need to update your Java class first, right? Later retrieval of an instance, the field is not get loaded, then you save/persist and the field is gone. About changing

Re: [appengine-java] Re: how to build same entity group

2010-03-25 Thread Chau Huynh
As a non native English speaker also, let me guess If I got you correctly, dreamy You want to manipulate Telephone separately, independent of its-owner-to-be, so you will have a Telephone class. Similarly, you will have another class for Person. Because there're no dependency between creating of

Re: [appengine-java] Re: Discussion on will-it-play-in-app-engine

2010-03-16 Thread Chau Huynh
was wrong, and maybe it just needs a correction on the version number. thanks in advance! On Mar 15, 11:54 pm, Chau Huynh cmhu...@gmail.com wrote: Hi, The struts binaries can be found on Struts download page: http://struts.apache.org/download.cgi Although it's quite a bit difficult to find

Re: [appengine-java] FinalizableReferenceQueue

2010-03-03 Thread Chau Huynh
Quote: You can ignore it. It's a red herring http://tinyurl.com/y8tlejthttp://www.google.com/url?sa=Dq=http://tinyurl.com/y8tlejtusg=AFQjCNFIMnUbbdgwZwSca1czKxGrbQFz8Q. ( https://groups.google.com/group/google-appengine-java/browse_thread/thread/9d019bda2070e382 ) On Thu, Mar 4, 2010 at 12:04 AM,

Re: [appengine-java] Do I still need to use session if I use google user account to authenticate?

2010-02-28 Thread Chau Huynh
Perhaps you'd better use your own userssion with one pojo class I don't think you would sacrifice User service (and its scalability) to deal with the concern opok posted below. Hi opok, I notice that the user service does not need HttpServletRequest to get the current context, is that reliable?

Re: [appengine-java] I'm have a question about Java runtime

2010-02-22 Thread Chau Huynh
I think you can start reading the guide, let me google that for you... http://code.google.com/appengine/docs/java/datastore/ 2010/2/22 Ngô Chí Lê lengo...@gmail.com Hi, I'm a new IT, I'm working on Google App Engine using Eclipse, I have two questions for you: 1/I want to create two entities

Re: [appengine-java] Re: JPA with database

2010-02-21 Thread Chau Huynh
Beside useful hint from Jake, providing links by google search might be helpful to you http://tinyurl.com/cofmen Specifically, you might need to look into Get Started guide... On Fri, Feb 12, 2010 at 4:12 PM, maheswari maheswari rma...@gmail.comwrote: is their is any authentication required to

Re: [appengine-java] how to share local_db.bin to others

2010-02-05 Thread Chau Huynh
http://code.google.com/appengine/docs/java/howto/unittesting.html#Writing_Datastore_Tests I wonder if your team members can share same test case and local_db.bin in each of your environment can have similar record. I just read it, so please try and advise if it work. Thanks -Chau On Wed, Feb 3,

Re: [appengine-java] Question: best practice to persist medium-large data?

2010-01-26 Thread Chau Huynh
Thanks John and Jeff for sharing the knowledge. I've just quickly scanned your project home, and I have a novice question that needs your help: Is twig or Objectify direct replacement to JDO / JPA on GAE? I just need to use your framework alone, or should use in combination with JDO / JPA support?

Re: [appengine-java] Deploy from separated resources

2010-01-19 Thread Chau Huynh
I'm just curious how you share code among your team without using subversion? -Chau On Tue, Jan 19, 2010 at 10:38 PM, dominity domin...@gmail.com wrote: Hi, guys. I've got one simple question. There is team of developers that creates any kind of web application. Web application is hosted on

Re: [appengine-java] Re: String as Primary key in JDO

2010-01-16 Thread Chau Huynh
Queries must go with indexes ( http://code.google.com/appengine/docs/java/datastore/queriesandindexes.html) For the column, you can store it as lowercase/uppercase, For the display column, you can store the original value. On Sun, Jan 17, 2010 at 2:15 PM, Sahil Mahajan sahilm2...@gmail.com wrote:

Re: [appengine-java] jdoql contains method

2009-12-29 Thread Chau Huynh
http://code.google.com/appengine/docs/java/datastore/queriesandindexes.html#Introducing_Queries In Query Filters section, it mentions that A filter specifies a field name, an operator, and a value. The value must be provided by the app; it cannot refer to another field, or be calculated in terms