Re: [appengine-java] Quiz

2011-09-29 Thread Stephen Johnson
So the answer is false. Forgot to actually state that. On Thu, Sep 29, 2011 at 3:44 PM, Stephen Johnson wrote: > That's easy. You are not supposed to return a value in the finally block > since it overwrites any previous return values and also any exceptions that > are thrown. Ret

Re: [appengine-java] Quiz

2011-09-29 Thread Stephen Johnson
That's easy. You are not supposed to return a value in the finally block since it overwrites any previous return values and also any exceptions that are thrown. Return statements in a finally block are a big NO-NO. Stephen CortexConnect.com On Thu, Sep 29, 2011 at 3:36 PM, gk wrote: >

Re: [appengine-java] Cronjob "every 1 minutes" executes every 2 minutes

2011-09-28 Thread Stephen Johnson
Great! Glad it worked for you. On Wed, Sep 28, 2011 at 10:38 AM, dimi wrote: > Thanks Stephen, works like a charm! > > I don't really understand the explanation about synchronized in the manual, > so I didn't try it out. > > But it works,... as long as the request do

Re: [appengine-java] Cronjob "every 1 minutes" executes every 2 minutes

2011-09-28 Thread Stephen Johnson
Sounds like you need to add "synchronized" to the schedule, thus "every 1 minutes synchronized", to get it what you want to do if I'm understanding you correctly. Stephen CortexConnect.com On Wed, Sep 28, 2011 at 8:38 AM, dimi wrote: > Hi guys, > > I defin

Re: [appengine-java] Servlet Mapping not working as expected

2011-09-26 Thread Stephen Johnson
nfig.html Also, I put my JSP files in my WEB-INF and you may want to do that as well with your vm files. Then there shouldn't be any way they will be served as static files by Google. Stephen CortexConnect.com On Sun, Sep 25, 2011 at 11:50 AM, Andrew Ducker wrote: > I'm trying to

Re: [appengine-java] how to set text to the com.google.appengine.api.datastore.Text in app engine

2011-08-29 Thread Stephen Johnson
Uh...perhaps you might want to say what the error is or per chance even a stack trace or should we get out the crystal ball. Stephen www.cortexconnect.com On Fri, Aug 26, 2011 at 7:27 AM, Sundi wrote: > i am trying to append charcters to the > com.google.appengine.api.datastore.Text

Re: [appengine-java] Re: GWT will serialize java.util.Hashet and won't serialize org.datanucleus.sco.backed.HashSet from JDO. Why?

2011-08-23 Thread Stephen Johnson
Good to know. Not sure what all the low-level difference between the two is either but glad one of them worked. On Tue, Aug 23, 2011 at 3:19 PM, Brandon Donnelson wrote: > Ah, I thought they were both the same at first, so after you said that I > tried pm.makeTransient(j); and it won't work for m

Re: [appengine-java] Re: GWT will serialize java.util.Hashet and won't serialize org.datanucleus.sco.backed.HashSet from JDO. Why?

2011-08-23 Thread Stephen Johnson
I wasn't sure detachCopy would work but I figured makeTransient should. Glad to see detachCopy does the trick for you! On Tue, Aug 23, 2011 at 3:08 PM, Brandon Donnelson wrote: > Wow, that worked, your my best friend :) > > How I got it to work: > > if (j != null) { > classJ

Re: [appengine-java] Upload attachments Google Sites

2011-08-23 Thread Stephen Johnson
pportedOperationException("No associated file object for memory source"); } } On Tue, Aug 23, 2011 at 2:53 PM, Ikai Lan (Google) wrote: > Hah, I should have looked at the code. Yeah, my example writes the thing to > disk. Thanks for the catch, Stephen! > > The GData protoco

Re: [appengine-java] Re: GWT will serialize java.util.Hashet and won't serialize org.datanucleus.sco.backed.HashSet from JDO. Why?

2011-08-23 Thread Stephen Johnson
Brandon, did you try making your object transient by using the makeTransient call? Not sure if that would do the trick for you or not. Just curious. Stephen www.cortexconnect.com On Tue, Aug 23, 2011 at 2:43 PM, Brandon Donnelson wrote: > The workaround for GWT HashSet transport. > >

Re: [appengine-java] Upload attachments Google Sites

2011-08-23 Thread Stephen Johnson
you can create your own multi-part http request and post it using the protocol instead of the API using URLFetch. An example from the docs is shown below. Definitely not as easy as the API. Stephen www.cortexconnect.com POST /feeds/content/domainName/siteName HTTP/1.1 Host: sites.google.co

Re: [appengine-java] appengine complained can't seriialize javax.faces.component.UIParameter object???

2011-08-22 Thread Stephen Johnson
methods that may be what you are supposed to use. Stephen www.cortexconnect.com On Sun, Aug 21, 2011 at 4:49 AM, nella wrote: > Hi, I have a JSF2 app that is able to run on my local instance. However, > after I deployed to GAE, i encountered an object serialization runtime error > on

[appengine-java] JDOQL 3.1

2011-08-22 Thread Stephen Foster
I was just wondering if anyone knew if there were any plans to support JDOQL 3.1 in app engine anytime soon. A couple of the features such as size() would be really useful. I've read through the release history of GAE and can't see anything obvious. -- You received this message because you are s

[appengine-java] Re: Receiving Server Errors

2011-08-19 Thread Stephen Crye
Getting same error trying to login to Panoramio. Steve -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/nfIQeT8Q36cJ. To post to this

Re: [appengine-java] Server error while doing a large loop

2011-07-28 Thread Stephen Johnson
speed bump once it has run several times. On Thu, Jul 28, 2011 at 4:30 PM, Stephen Johnson wrote: > You'll probably want to look at and test backends where you can pick your > processor speed to see what kind of performance you can get. I think the > front-end instances are configured s

Re: [appengine-java] Server error while doing a large loop

2011-07-28 Thread Stephen Johnson
B4. B1128MB600MHz$0.08B2 (default)256MB1.2GHz$0.16B4512MB2.4GHz$0.32B81024MB 4.8GHz$0.64 Stephen CortexConnect http://cortexconnect.appspot.com On Wed, Jul 27, 2011 at 5:00 PM, SudoKU wrote: > I am a new comer to the Google App Engine. I was testing whether I can use > Google app e

Re: [appengine-java] Re: Blobstore and upload question

2011-07-28 Thread Stephen Johnson
If your data is never more than 32K in size then the datastore is definitely the way to go. Way easier and simpler IMHO. On Thu, Jul 28, 2011 at 10:30 AM, GeorgeS wrote: > Stephen, thanks for the information! > > I had started to put the text into a Datastore but somehow the Blobstore

Re: [appengine-java] Re: Mining logs for performance data

2011-07-28 Thread Stephen Johnson
e the data to files in your own format. Maybe it will give you an idea of what you can do. It can be found at www.professionalintellectualdevelopment.com and there's a link to the code at Google Project Hosting there as well. Stephen CortexConnect cortexconnect.appspot.com On Thu, Jul 28, 20

Re: [appengine-java] Re: Blobstore and upload question

2011-07-28 Thread Stephen Johnson
nd can say whether or not it works. Well, I'm sure this is more info than you needed, but maybe it might help someone else someday that is trying to figure this same stuff out. Cheers, Stephen CortexConnect cortexconnect.appspot.com On Thu, Jul 28, 2011 at 6:55 AM, GeorgeS wrote: > Thanks

Re: [appengine-java] Reading static XML file on App Engine

2011-07-19 Thread Stephen Johnson
You need to get the real file path. Use: getServletContext().getRealPath("/WEB-INF/") Stephen On Mon, Jul 18, 2011 at 12:37 PM, bb wrote: > Hello, > I have a static XML file in my App Engine app that uploads just fine and I > am trying to read it for some rules based e

Re: [appengine-java] Why use servlets?

2011-07-11 Thread Stephen Johnson
ything, but most programmers prefer doing the heavy coding stuff in servlets and use the JSP for what they do best which is generating HTML. Stephen On Mon, Jul 11, 2011 at 9:11 AM, David Chandler wrote: > Hi Jack, > > You can use both servlets and JSPs with App Engine. > > To trans

Re: [appengine-java] Re: Re : Re: Best practice for importing a lot of data in the datastore

2011-07-03 Thread Stephen Johnson
You'll need to provide more specifics. How many entities did you add? How many indexes do you have on each entity. Remember, each indexed property requires two indexes, an ascending and descending index. This index creation could eat a lot of your CPU. Do you have composite indexes? And if so, how

Re: [appengine-java] Big Entities vs Small Entities

2011-06-28 Thread Stephen Johnson
if modified property not equal to 0. Stephen On Tue, Jun 28, 2011 at 7:23 AM, gadev wrote: > Hi there, > Unfortunately, I have reached a dead-end, I have a number of entities, for > example: > @Entity > class MyEntity { >   @Id >   String uid; >   String value1; >

Re: [appengine-java] Problem with using OpenSSL-generated RSA key on App Engine Java

2011-06-27 Thread Stephen Johnson
Glad you were able to solve it. On Sun, Jun 26, 2011 at 2:16 PM, Dado Colussi wrote: > On 26 June 2011 11:36, Stephen Johnson wrote: >> >> If private.der is in binary format then why are you reading it in as a >> String using Scanner??? > > Because I'm an idi

Re: [appengine-java] Problem with using OpenSSL-generated RSA key on App Engine Java

2011-06-26 Thread Stephen Johnson
If private.der is in binary format then why are you reading it in as a String using Scanner??? On Sun, Jun 26, 2011 at 8:02 AM, Dado Colussi wrote: > On 25 June 2011 14:51, Stephen Johnson wrote: >> >> I'm no expert on this sort of thing, but I think you need to base-64 &

Re: [appengine-java] Problem with using OpenSSL-generated RSA key on App Engine Java

2011-06-25 Thread Stephen Johnson
I'm no expert on this sort of thing, but I think you need to base-64 decode your string. Stephen On Fri, Jun 24, 2011 at 5:27 PM, Dado Colussi wrote: > I have generated an RSA key pair with OpenSSL, and I am successfully using > it in App Engine Java SDK 1.5 on Mac OS X 10.5.8

Re: [appengine-java] two accounts

2011-06-18 Thread Stephen Johnson
Cool. Your welcome. On Sat, Jun 18, 2011 at 4:45 PM, Steve wrote: > Thank you.  I was able to remove the default site and add my app engine id > to my new domain. > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine for Java" group. > To view thi

Re: [appengine-java] two accounts

2011-06-18 Thread Stephen Johnson
Log into your apps account: www.google.com/a/YOURDOMAIN.com On your dashboard remove Google Sites, then click Add More Services to add your App Engine account On Sat, Jun 18, 2011 at 2:30 PM, Steve wrote: > I like the idea of switching some settings so I can use my original account > with my n

Re: [appengine-java] two accounts

2011-06-18 Thread Stephen Johnson
x27;t forgotten any steps. Stephen On Fri, Jun 17, 2011 at 4:10 PM, Steve wrote: > I created a Google App Engine application and deployed it at appspot.com. > Then I decided to buy a domain name through Google Apps and use that with > the site.  I cannot figure out how to use the new d

Re: [appengine-java] can i load web form and then submit it, after showing only form's captcha on screen?

2011-06-18 Thread Stephen Johnson
alternative is to store the submitted form values into the session object on first submit, then show captcha page and when they have submitted captcha successfully, you can process the form data. Stephen On Wed, Jun 15, 2011 at 8:30 PM, Arvind Chari wrote: > Hello > > I want to automate the s

[appengine-java] Re: Stop blob URL from expiring

2011-06-07 Thread Stephen Denne
You can create the form without the generated upload url, and before submitting that form, perform an ajax call to generate an upload url at that time, with the callback setting the form's action, and submitting it. -- You received this message because you are subscribed to the Google Groups "

Re: [appengine-java] Re: open source pdf engine for GAE

2011-05-20 Thread Stephen Johnson
("vik@gmail.com")); >>             msg.addRecipient(Message.RecipientType.TO, >>                         new InternetAddress("vik@gmail.com")); >> >> >>             msg.setSubject("testing PDF system"); >>             Transport.send(msg); &g

Re: [appengine-java] Re: open source pdf engine for GAE

2011-05-17 Thread Stephen Johnson
>             Session session = Session.getDefaultInstance(props, null); >             Message msg = new MimeMessage(session); >             msg.setContent(mp); >             msg.setFrom(new InternetAddress("vik@gmail.com")); >             msg.addRecipient(Message.RecipientType.

Re: [appengine-java] Simple Google App Engine Datastore operation taking too long: causing DeadlineExceededException/DatastoreTimeoutException

2011-05-17 Thread Stephen Johnson
I use JDO but I don't use the built in relationship handling. I manage my own relationships and use JDO just for the property/entity mapping part of it. It seems to make life a lot simpler when trying to get around these types of situations. If you can make the Orders not be children of the Accoun

Re: [appengine-java] Re: open source pdf engine for GAE

2011-05-17 Thread Stephen Johnson
Vik, Post your code where you're creating the ByteArrayOutputStream and creating the PDF with it. It'll be more helpful then what you've posted. I'm a little concerned you still don't have this part correct since you're still using "out" as a variable name. You're code should be similar to: ByteAr

Re: Vs: Re: Vs: Re: Vs: Re: [appengine-java] Should JDO use be synchronized in threadsafe=true application?

2011-05-16 Thread Stephen Johnson
Ah, I missed the point about it being tasks and didn't realize the threadsafe only applied to user requests and not tasks. If indeed that was the case. On Mon, May 16, 2011 at 10:44 PM, Juha K wrote: > The datanucleus issue has a comment "Then, when my tasks run in parallel, > initialisation ha

Re: [appengine-java] Simple Google App Engine Datastore operation taking too long: causing DeadlineExceededException/DatastoreTimeoutException

2011-05-16 Thread Stephen Johnson
ed up until now. Also, you are reducing the amount of concurrency that can take place on your Account class so if you are trying to have multiple orders that could be added to an Account simultaneously you're going to run in to contention issues. Stephen On Mon, May 16, 2011 at 10:30 PM, Ashley

Re: Vs: Re: Vs: Re: [appengine-java] Should JDO use be synchronized in threadsafe=true application?

2011-05-16 Thread Stephen Johnson
Thinking out loud...What's strange about that issue (not this current one but the one from the past) and the supposed solution is that until just recently with the introduction of the threadsafe property supposedly only one request could executing at a time and you can't create your own additional

[appengine-java] Map Reduce

2011-05-16 Thread Stephen Johnson
that as well? Thanks, Stephen -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this group, send email to google-appengine-java@googlegroups.com. To unsubscribe from this group, send email to google-appengine-jav

Re: [appengine-java] Re: open source pdf engine for GAE

2011-05-15 Thread Stephen Johnson
Great! Glad to hear you got it working. On Sun, May 15, 2011 at 7:18 PM, Vik wrote: > Thanks a lot Stephen ! I could complete the code and testing now. Your > great support will really help our cause to serve the needy. > > > > Thankx and Regards > > Vik > Found

Re: [appengine-java] Re: open source pdf engine for GAE

2011-05-15 Thread Stephen Johnson
hankx and Regards > > Vik > Founder > http://www.sakshum.org > http://blog.sakshum.org > > > On Sun, May 15, 2011 at 10:16 PM, Stephen Johnson > wrote: > >> Hi Vik, >> Call toByteArray() method on ByteArrayOutputStream when finished wi

Re: [appengine-java] Re: open source pdf engine for GAE

2011-05-15 Thread Stephen Johnson
mp.addBodyPart(attachment); See http://code.google.com/appengine/docs/java/mail/usingjavamail.html Stephen On Sun, May 15, 2011 at 9:34 AM, Vik wrote: > Hie Stephon > > Still I am not sure on the part that ultimately how will i use this stream > to attach the generated pdf as an

Re: [appengine-java] Re: how to transfer request to a different servlet ?

2011-05-15 Thread Stephen Johnson
You should be able to use the RequestDispatcher object to do what you want but you'll have to have mappings in web.xml for each of the servlets your forwarding to for instance MyGalleryApp would have mappings that all start with /MyGalleryApp/ (or something similar) so GalleryServlet would map to s

Re: [appengine-java] Re: open source pdf engine for GAE

2011-05-15 Thread Stephen Johnson
You're writing the PDF as your web page output. Use a ByteArrayOutputStream instead. On Sun, May 15, 2011 at 7:16 AM, Vik wrote: > Hie > > Just a little question. I am using this pdfJet thing. > The requirement for us is to create a pdf and then mail it to a user. > > So i am done with pdf creat

Re: [appengine-java] Object visibility between threads (running requests)

2011-05-13 Thread Stephen Johnson
There's no guarantee that both those threads are running on the same instance. They can be on two different machines in two different data centers. On Fri, May 13, 2011 at 5:22 AM, Samuel Erdtman wrote: > Hi > I have created an application that works fin in the eclipse app engine > development e

Re: [appengine-java] Vs: This application does not exist (app_id=u'application-id').

2011-05-13 Thread Stephen Johnson
Uh...check your spelling. You've got vph-epr and vph-erp On Fri, May 13, 2011 at 1:55 AM, Juha K wrote: > > > > java.io.IOException: Error posting to URL: >> https://appengine.google.com/api/appversion/create?app_id=vph-epr >> &version=6& >> >> *But*, it's exist now. http://vph-erp.appspot.com

Re: [appengine-java] This application does not exist (app_id=u'application-id').

2011-05-13 Thread Stephen Johnson
Uh...check your spelling. You've got vph-epr and vph-erp On Fri, May 13, 2011 at 1:23 AM, horid121 wrote: > Hello~ > > When I deploy to Google App Engine, I received a error message. > > Error message: > > java.io.IOException: Error posting to URL: > https://appengine.google.com/api/appversion/c

Re: [appengine-java] Use Array as a query filter - possible?

2011-05-08 Thread Stephen Johnson
BTW, I'm assuming by Int Array you actually meant ArrayList or multi-valued equivalent. Perhaps more info is needed for your particular situation and why it seems you think it can't be done. On Sun, May 8, 2011 at 5:41 PM, Stephen Johnson wrote: > Yes it's possible. Make su

Re: [appengine-java] Use Array as a query filter - possible?

2011-05-08 Thread Stephen Johnson
Yes it's possible. Make sure the property is indexed. From the data viewer you can perform the following query for example: select * from KIND where PROPERTY = NUMBER How you do it in code depends on if you're using JDO, Objectify, JPA, low-level API, etc. On Sun, May 8, 2011 at 5:14 PM, mscwd01

Re: [appengine-java] xml parsing on GAE servers acts weird

2011-05-06 Thread Stephen Johnson
lderFactory dbf = DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); DocumentBuilder docBuilder = dbf.newDocumentBuilder(); Document document = docBuilder.parse(inputStream); Stephen On Thu, May 5, 2011 at 9:16 AM, Richie wrote: > Hey guys, > > I created an app where a u

Re: [appengine-java] Re: pdfJet issue

2011-04-29 Thread Stephen Johnson
Maybe he used a ByteArrayOutputStream instead of FileOutputStream. The getInstance method doesn't required a FileOutputStream just an OutputStream. On Thu, Apr 28, 2011 at 11:05 PM, omer yaari wrote: > It does not work, GAE does not allow file stream to include the > project > this is a known i

Re: [appengine-java] Re: Datastore Stats for High Replication

2011-04-13 Thread Stephen Johnson
resh the page a few times they usually eventually disappear. So either I'm seeing things or this is because of the way HR works which I think it is or something else is going on. Have you seen this behavior? Thanks. On Wed, Apr 13, 2011 at 8:44 AM, Simon Knott wrote: > Hi Stephen, > >

[appengine-java] Re: Datastore Stats for High Replication

2011-04-13 Thread Stephen Johnson
8 MBytes even though it says it was last updated 3 hours ago. Thanks, Stephen On Apr 13, 2:16 am, Simon Knott wrote: > I get datastore stats on my HR apps.  They are updated every 5 or 6 hours - > is your app new? -- You received this message because you are subscribed to the Google Groups &q

Re: [appengine-java] Re: Sort function now throws an exception

2011-03-28 Thread Stephen Johnson
Awesome! Glad it worked! On Mon, Mar 28, 2011 at 3:14 AM, ZeroCool wrote: > Hi Stephen, > > Thank you very much. > I modified the code according to your suggestion and it worked. > > > On Mar 28, 8:13 am, Stephen Johnson wrote: > > Hi ZeroCool, > > I'm n

Re: [appengine-java] Sort function now throws an exception

2011-03-27 Thread Stephen Johnson
r multiple times and it is seeing this discrepancy. I think you should try re-coding your compare so that if groupRank and Rep are the same for both objects then you return 0 not a 1. I hope this helps, Stephen On Sun, Mar 27, 2011 at 1:19 AM, ZeroCool wrote: > Hi App Engine Team, > > I s

Re: [appengine-java] Sort function now throws an exception

2011-03-27 Thread Stephen Johnson
There have been some people that have been reporting code that was working for weeks, etc. not working in the last week or so. I'm beginning to wonder if maybe behind the scenes a switch to Java 7 or some other Java switch is occurring. In relation to your error, it looks like what I've found so fa

Re: [appengine-java] Re: uploading 100k lines into the datastore is enough to max out the CPU time?

2011-03-08 Thread Stephen Johnson
descending index on the other 11 non-key fields. This will take A LOT of CPU for each entity. Do you need them all indexed? If not, I would set them to unindexed. That should help a lot. Stephen 2011/3/7 Cláudio Coelho > Since the bottleneck occurs when making objects of Location > persistent, I

Re: [appengine-java] Is descending index still necessary with mapreduce.

2011-02-11 Thread Stephen Johnson
Great news! Thx! Sent from my iPhone On Feb 11, 2011, at 5:28 PM, "Ikai Lan (Google)" > wrote: Hi Stephen, Good observation! You're right. We don't need this property anymore. We'll update the docs. -- Ikai Lan Developer Programs Engineer, Goo

[appengine-java] Is descending index still necessary with mapreduce.

2011-02-11 Thread Stephen Johnson
h the first split containing 'a', 'ab', and 'ac', and the last split only containing 'e'. But I'm hoping someone knows if this has been removed since __scatter__ property seems to be the new splitting/sharding method. Thanks, Stephen --

Re: [appengine-java] Using 2 datastores in same App?

2011-02-11 Thread Stephen Johnson
You can't use two different datastores, but you can use multitenancy: http://code.google.com/appengine/docs/java/multitenancy/overview.html On Fri, Feb 11, 2011 at 9:02 AM, dudu wrote: > Is it possible? If i configure two persistence providers in > persistence.xml? > I need to separte my data pe

Re: [appengine-java] when to use memcache vs static variable

2011-02-10 Thread Stephen Johnson
No, that isn't how it works. Your app executes on a number of server instances. There could be 1 instance or a 1000 instances of your application serving your users. That's why you use memcache to share that type of information. On Thu, Feb 10, 2011 at 11:35 AM, repairman wrote: > in my servlet,

Re: [appengine-java] embedded unindexed fields

2011-02-08 Thread Stephen Johnson
Yes, it seems this is a bug. I'm sure (ok 95% sure) it was working at one point because I did this exact thing in one of my kinds and I'm sure I tested to make sure the fields weren't indexed because it has a lot of properties and I don't want them indexed. I just looked and yes the fields are bein

Re: [appengine-java] NPE at jsp:useBean with scope session

2011-02-08 Thread Stephen Johnson
Glad to help! On Tue, Feb 8, 2011 at 3:16 AM, Louis H. wrote: > Indeed, I had sessions disabled. (I missed they are disabled by default). > Thanks for reply. > Problem solved. > > -- > You received this message because you are subscribed to the Google Groups > "Google App Engine for Java" group.

Re: [appengine-java] NPE at jsp:useBean with scope session

2011-02-07 Thread Stephen Johnson
Also, beans should implement the java.io.Serializable interface if you are going to store them in the Session object. On Mon, Feb 7, 2011 at 10:12 PM, Stephen Johnson wrote: > Do you have sessions enabled for your application? > > > On Mon, Feb 7, 2011 at 5:39 AM, Louis H. wrote: &

Re: [appengine-java] NPE at jsp:useBean with scope session

2011-02-07 Thread Stephen Johnson
Do you have sessions enabled for your application? On Mon, Feb 7, 2011 at 5:39 AM, Louis H. wrote: > Hi, > I am trying jsp form handling via bean and I am wondering why this jsp page > gives me an NPE after submitting. This happening with scope "session" (when > I change scope to "page" it's wor

Re: [appengine-java] Re: Just getting started with Datastore

2011-02-02 Thread Stephen Johnson
http://online.wsj.com/article/SB10001424052748704124504576118510340787364.html On Wed, Feb 2, 2011 at 10:34 PM, WillSpecht wrote: > Can you elaborate on pulling a Bing. > > On Feb 2, 4:01 pm, "Ikai Lan (Google)" > > > > wrote: > > Yep, entities are schemaless. This is both powerful and a bit o

Re: [appengine-java] Re: Semaphores/ LinkedBlockingQueue on GAE for java

2011-01-30 Thread Stephen Johnson
>> > > } >> > >> > > Side writing data >> > > == >> > >> > > write new data to datastore (with corresponding status showing that >> > > it's new and not read yet) >> > >> >

Re: [appengine-java] Re: Semaphores/ LinkedBlockingQueue on GAE for java

2011-01-29 Thread Stephen Johnson
r GAE channel API to communicate with it ? > > > > > > > > On Sat, Jan 29, 2011 at 9:49 PM, Stephen Johnson > wrote: > >> Sounds like you need more of a Push style. Checkout the Channel API or the >> XMPP api. >> >> > > >>On Sat, Jan 29, 20

Re: [appengine-java] Re: Semaphores/ LinkedBlockingQueue on GAE for java

2011-01-29 Thread Stephen Johnson
Sounds like you need more of a Push style. Checkout the Channel API or the XMPP api. On Sat, Jan 29, 2011 at 1:47 PM, Artur Downar wrote: > The external device polls for data from GAE. > It is not specified when the data arrives. To describe it more clearly. The > device is a GSM modem device tha

Re: [appengine-java] Just getting started with Datastore

2011-01-28 Thread Stephen Johnson
Hi Matt, There are several different ways to save/query objects from the datastore not just JDO or JPA. They are: 1. Low level api - work directly with the datastore's native (for lack of a better term) representation of an object. 2. JDO or JPA - work with these standards to abstract away the low-

Re: [appengine-java] Unindexed properties with JDO ?

2011-01-27 Thread Stephen Johnson
Add this annotation to properties you want unindexed. @Extension(vendorName = "datanucleus", key = "gae.unindexed", value="true") On Thu, Jan 27, 2011 at 4:00 AM, Fabrizio Accatino wrote: > Using the datastore low-level API I can set a property to "no indexed". > Entity.setUnindexedProper

Re: [appengine-java] Re: Can't fetch a dataset using primary key

2011-01-26 Thread Stephen Johnson
Yes, to use JDO your going to have to annotate the class and have the DataNucleus enhancer run over the classes. If you use the low-level API then you can just query for the Entity object itself. On Wed, Jan 26, 2011 at 3:09 PM, Marc Herber wrote: > Thanks for your hint. Meanwhile I debugged the

Re: [appengine-java] Re: Can't fetch a dataset using primary key

2011-01-26 Thread Stephen Johnson
Did quick check, Yes, KEY(' ') can be used if what's inside is an encoded key, but I assumed that by a plain 1 it was an unencoded ID value. On Wed, Jan 26, 2011 at 12:00 PM, Stephen Johnson wrote: > Minor minor point :) I believe Ikai if you look at your posted code you > f

Re: [appengine-java] Re: Can't fetch a dataset using primary key

2011-01-26 Thread Stephen Johnson
valid there. > > Java code in JDO uses JDOQL. > > > -- > Ikai Lan > Developer Programs Engineer, Google App Engine > Blogger: http://googleappengine.blogspot.com > Reddit: http://www.reddit.com/r/appengine > Twitter: http://twitter.com/app_engine > > > >

Re: [appengine-java] Re: Can't fetch a dataset using primary key

2011-01-26 Thread Stephen Johnson
Also, check that the PMF.getPersistenceManager() returns a non-null value. Perhaps with the changes you've been trying you don't have the "transactions-optional" name in the config file matching the code. On Wed, Jan 26, 2011 at 11:00 AM, Stephen Johnson wrote: > Well, you

Re: [appengine-java] Re: Can't fetch a dataset using primary key

2011-01-26 Thread Stephen Johnson
Well, you shouldn't be getting a NullPointerException if the entity is not found so something else is wrong. The correct exception would be JDOObjectNotFoundException. Are you sure the PageParameters parameters is not null or something else isn't null?? You don't use the 'a' variable in anyway in t

Re: [appengine-java] Re: Can't fetch a dataset using primary key

2011-01-25 Thread Stephen Johnson
Good to hear! On Tue, Jan 25, 2011 at 5:24 AM, hrbaer wrote: > Both the database query and the PMF singleton are working - 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 > goo

Re: [appengine-java] Can't fetch a dataset using primary key

2011-01-24 Thread Stephen Johnson
e it, just: PersistenceManager pm = PMF.getPersistenceManager(); Stephen On Mon, Jan 24, 2011 at 3:19 PM, Marc Herber wrote: > Meanwhile I tried this *java* code: > PersistenceManagerFactory pmf = JDOHelper.getPersistenceManagerFactory( > "transactions-optional" ); > PersistenceManage

Re: [appengine-java] Can't fetch a dataset using primary key

2011-01-24 Thread Stephen Johnson
Try changing Ikai's code to include the entity name like: SELECT * from DB WHERE __key__ = KEY('DB','1') if your key is a number then SELECT * from DB WHERE __key__ = KEY('DB',1) Documentation: an entity key literal, with either a string-encoded key

Re: [appengine-java] Key only query

2011-01-20 Thread Stephen Johnson
Yes, it works. I use key only queries a lot. I could help more if you posted the code with the query. On Wed, Jan 19, 2011 at 6:52 AM, Kenny wrote: > According to: > > http://code.google.com/appengine/docs/java/datastore/jdo/queries.html#Queries_on_Keys > > We are suppose to be able to get Key

Re: [appengine-java] Mutation pool bug?

2011-01-18 Thread Stephen Johnson
e: > Thank you, Stephen. This works. I could not locate this earlier in the > mapreduce documentation. > > Regards, > Arun > > ------ > *From:* Stephen Johnson > *To:* google-appengine-java@googlegroups.com > *Sent:* Sun, 16 January, 2011 1:33:31

Re: [appengine-java] can't retreive one-to-may objetcs, JPA

2011-01-18 Thread Stephen Johnson
option is lazy (any JPA people please chime in if I'm wrong or is different on GAE). It seems that the other option (which I'm not sure is supported on GAE with JPA) is to change the default loading by using FetchType.EAGER in your @OneToMany annotation. I hope this helps, Stephen On T

Re: [appengine-java] can't retreive one-to-may objetcs, JPA

2011-01-17 Thread Stephen Johnson
I don't do JPA, but If it's like JDO and you have lazy loading then don't you need to access the subjects field before you close your entity manager to get the subjects loaded? Just a thought. On Mon, Jan 17, 2011 at 3:51 PM, kidowell wrote: > I cannot retreive the List from book. The save and u

Re: [appengine-java] Mutation pool bug?

2011-01-15 Thread Stephen Johnson
Do you have this defined in your mapper class? @Override public void taskCleanup(Context context) { try { // make sure to call super classes taskCleanup so that the DatastoreMutationPool // gets flushed properly otherwise puts/deletes can be lost; super.taskCleanup(context); } catch (Excepti

Re: [appengine-java] Filtering more than 3 parameters in JDOQL

2011-01-15 Thread Stephen Johnson
There's another function executeWithArray on the query object that you can use. Sent from my iPhone On Jan 15, 2011, at 5:08 AM, Vik wrote: Hie I am not able to pass more than 3 parameters using below code. So, how to pass more than 3 parameters? Query query = pm.newQue

Re: [appengine-java] Re: JDO - Set property question

2011-01-11 Thread Stephen Johnson
I never stated whether it was valid per JDO spec. I just stated that Matthew was incorrect and his explanation of why the syntax was incorrect was also incorrect. This is an app engine forum so it was implied that the incorrectness pertained to app engine. If you wish to point out differences betwe

Re: [appengine-java] Re: JDO - Set property question

2011-01-07 Thread Stephen Johnson
That is incorrect. You can specify a filter using the == with a single value and a list or set such as query.setFilter("keywords == keywordParam"); query.declareParameters("String keywordParam"); This works just fine in JDO on AppEngine. On Fri, Jan 7, 2011 at 8:06 AM,

Re: [appengine-java] Re: JDO - I can't update an object with One-to-One Relationships

2011-01-04 Thread Stephen Johnson
rning purpose, I've used some others methods. > I don't know why i can't update a children reference per another. > In fact, the new object is in the datastore. When I manually delete the > first reference, the parent now refer his new children. Weird. > > 2011/1/4 St

Re: [appengine-java] Re: JDO - I can't update an object with One-to-One Relationships

2011-01-04 Thread Stephen Johnson
Why do you have to delete the location entity? Why not just update the current location entity with the new coordinates? That would be much more efficient. On Tue, Jan 4, 2011 at 10:20 AM, yoyo wrote: > The update still don't works. I give up. > > I use the "@Persistent(dependent = "true")" and

Re: [appengine-java] passing multiple parameters to JDOQL

2010-12-29 Thread Stephen Johnson
You need to do it like this: query.declareParameters("Long bind_pocId, Date bind_startDate, Date bind_endDate"); However, unless you've normalized your dates on midnight or something I don't think this will work they way you want since date objects have millisecond precision. On Wed, Dec 29, 2

Re: [appengine-java] low-lewel put method outside of a transaction

2010-12-22 Thread Stephen Johnson
You might want to take a look at CommittedButStillApplyingException On Tue, Dec 21, 2010 at 1:08 PM, ss.require wrote: > Please, help! > According to this: > http://code.google.com/intl/uk-UA/appengine/articles/life_of_write.html. > > Let's suppose that I call the low-level put method outside of

Re: [appengine-java] Re: Customizing warmup with a Servlet mapped to _ah_warmup

2010-12-21 Thread Stephen Johnson
My bad, it should be: _ah_warmup com.your.servlet.Here On Tue, Dec 21, 2010 at 1:21 PM, Stephen Johnson wrote: > I should add that there is no need to invoke GAE's default warming. I'm > sure it's basically a no-op and just gets the basic servlet classes loaded &g

Re: [appengine-java] Re: Customizing warmup with a Servlet mapped to _ah_warmup

2010-12-21 Thread Stephen Johnson
I should add that there is no need to invoke GAE's default warming. I'm sure it's basically a no-op and just gets the basic servlet classes loaded that your own servlet will do by being invoked. On Tue, Dec 21, 2010 at 1:10 PM, Stephen Johnson wrote: > Just map a servlet to &

Re: [appengine-java] Re: Customizing warmup with a Servlet mapped to _ah_warmup

2010-12-21 Thread Stephen Johnson
Just map a servlet to /_ah/warmupin your web.xml. This will override the default one provided by app engine. On Tue, De

Re: [appengine-java] CPU time obtained via QuotaService much lower than CPU time reported in request logs

2010-12-14 Thread Stephen Johnson
You need to add the CPU and API times together from the QuotaService to get the CPU time in the log. The QuotaService keeps them separate while the log adds them together. So in the log the API time reported is the API time but the CPU time in the log is actually CPU + API time which is inconsisten

Re: [appengine-java] Re: Massive delete (mapreduce based) > Datastore viewer & Datastore statistics unavailable

2010-12-13 Thread Stephen Johnson
Thanks for the update. I'm glad it fixed itself. It's another little thing to remember about GAE and how it works. On Mon, Dec 13, 2010 at 6:51 AM, crllvnc wrote: > Hi Stephen, > > You were right! After a while (maybe 20/30 hours), the datastore > viewer became available a

Re: [appengine-java] Can you add Handlers to the root logger?

2010-12-12 Thread Stephen Johnson
Hi Andrew, Perhaps my write up on my XMPP Log Hander might help. It adds a log handler to GAE which sends log messages via XMPP. You can check it out at http://www.professionalintellectualdevelopment.com Hope it helps, Stephen On Sun, Dec 12, 2010 at 6:05 PM, Andrew wrote: > Hello, > &

Re: [appengine-java] Massive delete (mapreduce based) > Datastore viewer & Datastore statistics unavailable

2010-12-10 Thread Stephen Johnson
Are you still having this issue? I'm curious to learn if this has cleared up because here's a random guess. When entities are deleted they are just marked as deleted and then later garbage collected, so perhaps the datastore viewer has a very low timeout set and it is starting with the beginning of

Re: [appengine-java] JSF: sudden ViewExpiredException on GAE

2010-12-07 Thread Stephen Johnson
Well, I'll take a wild stab at it since I don't know Java Server Faces, but since you say it was working and now has stopped. Do you have true in your appengine-web.xml? If not, add it. As of 1.4 this is now being adhered to whereas prior to this sessions were enabled regardless. So perhaps even wi

Re: [appengine-java] jsessionid not present anymore

2010-12-03 Thread Stephen Johnson
Well, they just pushed version 1.4 and it may be that the sessions-enabled flag wasn't enforced and now with version 1.4 perhaps it is. Sounds like you may have to set the cookie yourself if you don't want to enable sessions for some reason. On Fri, Dec 3, 2010 at 12:13 AM, Ioan wrote: > I still

  1   2   >