Re: [appengine-java] Re: Class XXX has multiple relationship fields of type YYYY

2010-01-16 Thread Daniel Benamy
One more thing- I get this error the first time I hit this code after idling or starting up, but subsequent runs work ok. Dan On Sat, Jan 16, 2010 at 2:51 AM, Daniel Benamy wrote: > I think I'm hitting this check since updating to 1.2.8. I've got > something like: > class A { >  B bVar; >  List b

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 wrote: > Isn't there any o

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

2010-01-16 Thread Sahil Mahajan
Isn't there any other way. I want to avoid toLowerCase(). I want String to be case insensitive for database, but while displaying String to user I would like it to conserve case.. I can compare strings through equalsIgnoreCase. But then I won't be able to make effective use of primary key. On J

[appengine-java] Re: Cannot have a java.lang.Long primary key and be a child object

2010-01-16 Thread jd
You cannot create a data model in JDO-GAE that is agnostic of its environment. Twig allows your domains classes to use any key type you want or even none at all. class Parent { String name; @Entity(relation=child) Child child; } class Child { String name; } This will be correctly sto

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

2010-01-16 Thread jd
Just String#toLowerCase() the key when you store them On Jan 17, 1:11 am, sahil mahajan wrote: > I am using String as primary key in JDO. But it is case sensitive. It > considers "name" and "NAME" as different. Can I make it case sensitive? > > -- > Regards > Sahil Mahajan -- You received this m

[appengine-java] Re: Class XXX has multiple relationship fields of type YYYY

2010-01-16 Thread Daniel Benamy
I think I'm hitting this check since updating to 1.2.8. I've got something like: class A { B bVar; List bList; } Should I be getting this error? I haven't noticed a problem with my app using this setup. Thanks! Dan On Dec 5 2009, 12:52 am, "Max Ross (Google)" wrote: > SDK 1.2.8 contains a new

[appengine-java] Re: Using GWT RPC for Browser client on GAE - and RESTful to access data from Android/iPhone

2010-01-16 Thread ChrisDane
Thanks for introducing me to Hessian - I just looked at the HessianKit: http://hessian.caucho.com Though I would love to do an opensource project, I am the only one working on the iPhone. And I am running short on time :-) I will let you know if I turn to an async Hessian. Sorry, my java is not t

[appengine-java] Re: RESTfull - JAX-RS and GAE/J

2010-01-16 Thread ChrisDane
Thanks Jeff, Thanks, I am just trying to set it up: 1) Downloaded the latest(1.2.1.GA) 2) In Eclipse created a new GAE Project 3) I have been looking in the book "RESTful Java with JAX-RS, 1st Edition" - found the sample code for "oreilly-workbook/ex03_1" 4) Copied the ( Customer.java & CustomerR

Re: [appengine-java] Re: Using GWT RPC for Browser client on GAE - and RESTful to access data from Android/iPhone

2010-01-16 Thread Jeff Schnitzer
I mentioned Resteasy in your other thread, but you might also want to consider Hessian. I recently patched the Caucho impl and now both client & server work on GAE (we use Hessian for server<->server RPC, and JAX-RS to the phones). If you're creating internal protocols, Hessian is way easier than

Re: [appengine-java] RESTfull - JAX-RS and GAE/J

2010-01-16 Thread Jeff Schnitzer
JBoss Resteasy works fine without any special customization for GAE. I use it extensively. http://www.jboss.org/resteasy Jeff On Sat, Jan 16, 2010 at 1:09 PM, ChrisDane wrote: > Hi there, > Has anyone seen any examples on using only JAX-RS on GAE. > > Implementing the javax.ws.rs.core.Applicati

[appengine-java] Re: Using GWT RPC for Browser client on GAE - and RESTful to access data from Android/iPhone

2010-01-16 Thread ChrisDane
Thanks Jason, Restlet seems to the choice for most. Have you seen any simple example using just JAX-RS? Thanks Regards ChrisDane On Jan 12, 10:01 pm, "Jason (Google)" wrote: > Hi ChrisDane. Certainly, there's nothing stopping you from deploying a > RemoteServiceServlet and HttpServlet to the sam

Re: [appengine-java] App Engine cold starts and overly aggressive cycling

2010-01-16 Thread Jeff Schnitzer
Should my application be cycling even if it receives steady traffic? I average about 1 hit per second, yet my app seems to bootstrap several times every hour at an erratic rate. Appid is mobca-st. Look in the logs for "ConfigurationBootstrap" at level Info. This is the Resteasy bootstrap. The cy

[appengine-java] RESTfull - JAX-RS and GAE/J

2010-01-16 Thread ChrisDane
Hi there, Has anyone seen any examples on using only JAX-RS on GAE. Implementing the javax.ws.rs.core.Application and A resource Class etc? Thanks in advance Regards ChrisDane -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To pos

Re: [appengine-java] Re: Can an Integer be a primary key for JDO?

2010-01-16 Thread Jeff Schnitzer
I don't know what JDO will do, but I can tell you that this won't help you reduce data storage requirements, if that is your goal. Some things to know about the Low-Level API, and thus any layer on top (JDO, JPA, Objectify, Twig, whatever): * Numeric keys will be persisted as a Long (or String).

Re: [appengine-java] Building Scalable Complex App

2010-01-16 Thread Duong BaTien
Hi: Following is my sketch for the Message and MessageIndex. Please advise and if possible, sketch out the Java version of set intersection from the presentation. Have not time to try anything yet; but the design is very significant for proper data modeling. The JDO version of the presentation use

[appengine-java] Using a Key in a query filter

2010-01-16 Thread tal
Hi, I'm trying to use a Key inside a query filter. I am using this to enforce uniqueness on a field (GAE does not support unique constraint) . In my query I try to fetch from ser a user with same name as the entered one, but with different key (if I get no result - user name is not taken). This app

[appengine-java] String as Primary key in JDO

2010-01-16 Thread sahil mahajan
I am using String as primary key in JDO. But it is case sensitive. It considers "name" and "NAME" as different. Can I make it case sensitive? -- Regards Sahil Mahajan -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to thi

[appengine-java] welcome-file-list not working on the appengine

2010-01-16 Thread aswath satrasala
Hello, My app-id is http://vs-accounting.appspot.com My welcomefile-list : /welcome.html I run the application locally, and it is fine, and welcome.html response is sent back. I enter the above URL in the firefox, I get back the response as "Oops, firefox cannot load this page

[appengine-java] Re: Can an Integer be a primary key for JDO?

2010-01-16 Thread Bert Peters
Thank you for that information, but that's not what i meant. What i did mean is whether this is correct/possible: @PrimaryKey @Persistent(idGeneratorStrategy=INCREMENT) private Integer id; On Jan 16, 2:25 pm, jd wrote: > Keys can either have a system generated long "id" (not set by you) or > a S

[appengine-java] Re: Can an Integer be a primary key for JDO?

2010-01-16 Thread jd
Keys can either have a system generated long "id" (not set by you) or a String "name". There used to be no way to create an Entity with a long - but now (as of 1.2.7?) there is a constructor Entity(Key) and you can create a key with a long. But the docs say: "Creating an entity for the purpose o

[appengine-java] Re: App Engine cold starts and overly aggressive cycling

2010-01-16 Thread Jorge
> - What is your application ID? wcondominios > - How do you know it is being cycled out? You'll need to insert some code > that only gets called when the app cold starts. I just see incredibly long response times. This, for instance: # 01-16 04:29AM 02.107 / 302 4752ms 6718cpu_ms 126api_cpu_ms

[appengine-java] Re: JDO analogue of GQL

2010-01-16 Thread Max
I found what was wrong. It is a really good reason never to use deprecated API anymore. 2009-12-1 is new Date(109, 11, 1); But not new Date(2009,12,1) or new Date(9,12,1) or new Date(109,12,1) On Jan 16, 2:17 pm, Max wrote: > I just seen that my last code is working! > > Only first filder is

[appengine-java] Re: JDO analogue of GQL

2010-01-16 Thread Max
I just seen that my last code is working! Only first filder is working. query.addFilter("cid", Query.FilterOperator.EQUAL, l); Second filter is ignored. query.addFilter("ctime", Query.FilterOperator.GREATER_THAN_OR_EQUAL, new Date(2009, 12, 1).getTime()); How

[appengine-java] Re: JDO analogue of GQL

2010-01-16 Thread Max
DatastoreService ds = DatastoreServiceFactory.getDatastoreService(); Query query = new Query("Table1"); query.addFilter("cid", Query.FilterOperator.EQUAL, l); // was not very clear documented how dates are saved in DB // query.add

[appengine-java] Can an Integer be a primary key for JDO?

2010-01-16 Thread Bert Peters
I was just wondering whether I could use an Integer for a primary key in JDO, as it would be a great convenience in my application. I couldn't really find an answer to this in the documentation, so I ask you. Can I? -- You received this message because you are subscribed to the Google Groups "Goo