[appengine-java] Re: Session/Cookie problem with redirect

2011-08-28 Thread Anders
I found something. Maybe not significant but could be. I saw in the log that 
two of the last sign ins that failed had a call to /_ah/warmup just prior to 
them. With the log text:

This request caused a new process to be started for your application, and thus 
caused your application code to be loaded for the first time. This request may 
thus take longer and use more CPU than a typical request for your application.

Could the warmup call mess up the cookie and session values? Seems a bit 
unlikely but anyway.

-- 
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/-/Uxb5q76jK4gJ.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: Session/Cookie problem with redirect

2011-08-28 Thread Simon Knott
You're not placing anything in your session which isn't serializable are 
you?  

Given that everything seems to be failing when it's starting up a new 
instance, which is when it will attempt to read the session out of the 
datastore/memcache, it may be that it can't deserialize your data.

-- 
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/-/P2P8YInLG5gJ.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: Session/Cookie problem with redirect

2011-08-28 Thread Mike Lawrence
have you tried viewing the http headers in each request
using chrome, firebug, httpwatch, etc?
sunshine is the best disinfectant

I dont think redirects normally can set cookies
maybe the prod server is striping your
invalid host headers on a redirect

On Aug 28, 7:32 am, Simon Knott knott.si...@gmail.com wrote:
 You're not placing anything in your session which isn't serializable are
 you?  

 Given that everything seems to be failing when it's starting up a new
 instance, which is when it will attempt to read the session out of the
 datastore/memcache, it may be that it can't deserialize your data.

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



Re: [appengine-java] BigTable LIKE

2011-08-28 Thread Aswath Satrasala
Following is the solution I am planning to implement for a similar case in
my application.  But, it depends on your data.
*Method 1*
* Create 3-4 additional properties in the BOOK kind.  Like for example,
word1, word2, word3 properties etc.
* Split the book title into words and store each word into a property.
* With objectify, then you can do the above split login in the PrePersist
method
* Do the query with word1, word2 and word3 properties.  This means,
additional 2-3 queries will be performed.

*Method 2
** Create a KIND BookWords
{
   @Long id
   KeyBook bookKey
   String word
}

* Split the book tile and for each word add a row in the BookWords table.
* If, interested in case insensitive searches, convert the 1 letter of the
split word into upper/lower case and created additional rows in KIND
BookWords
* Do a query with the BookWords, and then get all the Book Keys.
* Now do a query with the Book

-Aswath
www.AccountingGuru.in

On Fri, Aug 26, 2011 at 9:55 PM, realdope rte...@gmail.com wrote:

 Hi,
 I know that you cannot do a LIKE clause in BigTable. How do you get
 around this issue?

 Suppose I'm making a book database, and I want to implement a search
 function that compares titles against a random string. What is a plausible
 mechanism with which to do so?

 Any help would be appreciated!

 --
 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/-/S3KWOBYjWuEJ.
 To post to this group, send email to
 google-appengine-java@googlegroups.com.
 To unsubscribe from this group, send email to
 google-appengine-java+unsubscr...@googlegroups.com.
 For more options, visit this group at
 http://groups.google.com/group/google-appengine-java?hl=en.


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



[appengine-java] Re: Session/Cookie problem with redirect

2011-08-28 Thread Anders
The object put into the session is serializable. The production server will 
throw an exception if the session is attempted to be set with a 
non-serializable object.

-- 
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/-/Wl6DhNA92pUJ.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: Session/Cookie problem with redirect

2011-08-28 Thread Anders
I haven't checked the http headers yet. The tricky thing is that it usually 
works fine even on the production server! It could be that I set the cookie 
in a non-standard way, but the session attribute is that a cookie too (I 
don't know fully how GAE manages sessions)?

On Sunday, August 28, 2011 3:46:10 PM UTC+2, Mike Lawrence wrote:

 have you tried viewing the http headers in each request 
 using chrome, firebug, httpwatch, etc? 
 sunshine is the best disinfectant 

 I dont think redirects normally can set cookies 
 maybe the prod server is striping your 
 invalid host headers on a redirect 

 On Aug 28, 7:32 am, Simon Knott knott...@gmail.com wrote: 
  You're not placing anything in your session which isn't serializable are 
  you?   
  
  Given that everything seems to be failing when it's starting up a new 
  instance, which is when it will attempt to read the session out of the 
  datastore/memcache, it may be that it can't deserialize your data.

-- 
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/-/Mpn_VNZhhUAJ.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: BigTable LIKE

2011-08-28 Thread Remy Gendron
You should read on list properties. This will allow you to store
keywords into a single property and search on them. You could manually
split your strings bu instead you can use an Analyser from Lucene or
Hibernate Search. The analyzer can be used without really using Lucene
or Hibernate.

You won't have much in the way of ranking but it is often good enough.
And with the query planner optimizations introduced in 1.5.2, you
won't even need to declare indices. That makes it less tricky too
implement

Remy

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



[appengine-java] Re: Session/Cookie problem with redirect

2011-08-28 Thread Anders
I noticed that when the sign in doesn't work the redirect goes to / the 
root. I have looked and looked for where this can happen in the code, but 
there is no place where the redirect can be / (unless I have missed finding 
it in the code). Can the sendRedirect() sometimes cause a redirect to / if 
something fails? Or can there be old versions of the application running in 
some instances (I doubt that)? 

-- 
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/-/CrIC8SWo2tsJ.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.