Re: [appengine-java] max keys for memcache

2012-02-22 Thread Kesava Neeli
We would like to have a map of all users in datastore in mem cache so that 
we can look up for any username/email/number to verify if he is already an 
user of our app. Ex: A user wants to send some message to an email address 
from our mobile app. We want to find if there is any user in our database 
with that email id and do something different. We could do a costly query 
all the time or do a quick lookup in MemCache if user exists. For each of 
our user account, we have a primaryKey but we cannot query with that field 
all the time. We would like to update the mem cache like once a day with 
all user accounts and tag them with multiple fields. So interested in the 
size of the mem cache for an app with 4-5 million records which are small 
key/value pairs. 

-- 
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/-/ssbcFx9IxmAJ.
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] max keys for memcache

2012-02-22 Thread Kesava Neeli
Jeff,
If you understood my requirement, I would love to hear any suggestions you 
have if you think MemCache is not a solution.  

-- 
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/-/blK7tIyiUhMJ.
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] max keys for memcache

2012-02-22 Thread Kesava Neeli
our user account has many fields like userName, email, number, alternate 
email list, ids from social networks like facebook, google, twitter, 
linkedin etc. The primary key is one of those fields. In realtime, we 
should be able to find if a user exists with any the fields and not just 
email. One thing I could do it td create a datastore index for each of the 
field that I want to lookup and then perform the query when needed. Having 
many indexes means more number of low level datastore write calls for each 
store hit. And the sql query won't be fast if there are are too many 
records. 

Anyway, thanks for your comments. I will look to see if I can design it 
differently. 

-- 
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/-/1u39C_iNYtIJ.
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] max keys for memcache

2012-02-21 Thread Kesava Neeli
Hi IKai,

Could you point me to the docs about the max memory for the app for 
MemoryCache? We have a mobile app with many user accounts and each account 
has a primary key. We expect to have 1-2million accounts in the datastore. 
We need to store many entries in mem cache to  find if account exists based 
on other fields in our user account data. i.e a map of 3 or 4 fields per 
account pointing to the primary key. So we will have 3-4 entries in mem 
cache for each user account. Each entry will be simple key/value string 
objects. Do you have any recommendations on how to use MemCache here? How 
do we need to handle the memory for 5 million entries in cache?  

Thanks
Neeli 

-- 
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/-/HmjI7KSoAz4J.
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: When will https support will be available for custom domains?

2012-01-25 Thread Kesava Neeli
Any comments from appengine team on this? 

-- 
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/-/p32icr9fCwAJ.
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] how to store java Date type in specific timezone?

2012-01-25 Thread Kesava Neeli
Hi,

I have a java.util.Date data type in my object. 

Date now = Calendar.getInstance(TimeZone.getTimeZone(America/Los_Angeles), 
Locale.US).getTime();
When I persist the object and look at the entity, I see the type stored as 
gd:when as the kind of element. 

I see the value as 2012-01-25 01:01:37.938000 which is UTC time. 

How can I save the time in my desired timezone? The java Date type has no 
timezone setting explicitly and appengine only allows java.util.Date as a 
valid date type from java. 

Thanks
Neeli 

-- 
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/-/__Q5MEGh6jwJ.
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] how to store java Date type in specific timezone?

2012-01-25 Thread Kesava Neeli
Thanks. That's what I was doing for some date fields now. Store the date in 
a well formatted string and then do conversions. But it becomes tough when 
you want to build a query get me all records in last day and the 
datastore for that object contains thousands of  records. With the strings, 
you need to iterate through all records, get a date and then do a 
comparison. 

With date data type, you can rely on appengine to return correct 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/-/7sg4mVI55SMJ.
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] how to store java Date type in specific timezone?

2012-01-25 Thread Kesava Neeli
Thanks Jeff. I used JodaTime before but I was stuck with java.util.Date 
since appengine allows only standard java data types. I don't think Joda 
Time object will work on appeninge. Will give a try. Have you stored 
JodaTime objects in datastore? 

-- 
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/-/vHFYiyYJGTkJ.
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] When will https support will be available for custom domains?

2011-12-19 Thread Kesava Neeli
Hi,

The appengine blog had a post on Oct 19th. Anyone has idea on when this 
will be available for public use? We have a public website running on 
appengine which talks to the backend via https url. We send some sensitive 
information and hence https was a must. But IE browser has a limitation 
that you cannot do a https hit from the application which has http url. So 
we are stuck with no support for IE browser. It would be great if we have 
this feature enabled.. Anyone encountered similar problem? 

Thanks
Neeli 

Wednesday, October 19, 2011 
  App Engine SSL for Custom Domains in 
Testinghttp://googleappengine.blogspot.com/2011/10/app-engine-ssl-for-custom-domains-in.html
 
 The long awaited SSL for Custom Domains is entering testing and we are now 
looking for trusted testers. If you are interested in signing up to test 
this feature, please fill in this 
formhttps://docs.google.com/a/google.com/spreadsheet/viewform?formkey=dHFoZFhlUTM1MUNpelFWcVJqcVAwckE6MQ
.
 
 We will be offering two types of SSL service, Server Name Indication 
(SNI)http://en.wikipedia.org/wiki/Server_Name_Indicationand Virtual IP (VIP). 
SNI will be significantly less expensive than VIP 
when this service is launched, however unlike VIP it does not 
workhttp://en.wikipedia.org/wiki/Server_Name_Indication#No_supportin all 
browsers that support SSL. VIP is a premium service with a dedicated 
IP and full browser support. Both VIP and SNI support wildcard certificates 
and certificates with alternate names.

We look forward to making this widely available as soon as possible and as 
always we welcome your feedback in the 
grouphttp://groups.google.com/group/google-appengine/browse_thread/thread/d7fb200cbe9d2010
.

-- 
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/-/aYjrF1JY0j4J.
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] unable to deploy applications to appengine

2011-12-06 Thread Kesava Neeli
Hi,

We are seeing 500 Internal Server errors on appengine while deploying 
applications. Anyone seeing similar issues? This is at 6:30 PM PST

Thanks
Neeli 

-- 
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/-/DZyb4ZwqizAJ.
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: unable to deploy applications to appengine

2011-12-06 Thread Kesava Neeli
Worked fine at 10:00 PM PST

-- 
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/-/KDRyiFN60H4J.
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] Mime message pase error on appeninge

2011-11-09 Thread Kesava Neeli
Hi,

I have a simple JavaMail code that reads a email message which contains 
text  html. Sample code below. When I test it with an email which contains 
HTML data, I consistently see this error. Any idea on how to read the 
MimeMultipart body correctly? I saw similar errors in old post 2yrs ago 
with very old appengine SDK versions.. But the code below should work for 
all email content.. 

java.io.IOException: Truncated quoted printable data
at 
org.apache.geronimo.mail.util.QuotedPrintableEncoder.decodeNonspaceChar(QuotedPrintableEncoder.java:597)
at 
org.apache.geronimo.mail.util.QuotedPrintableEncoder.decode(QuotedPrintableEncoder.java:584)
at 
org.apache.geronimo.mail.util.QuotedPrintableDecoderStream.read(QuotedPrintableDecoderStream.java:80)
at 
org.apache.geronimo.mail.handlers.TextHandler.getContent(TextHandler.java:107)
at 
javax.activation.DataSourceDataContentHandler.getContent(DataHandler.java:790)
at javax.activation.DataHandler.getContent(DataHandler.java:537)
at javax.mail.internet.MimeBodyPart.getContent(MimeBodyPart.java:392)


Properties props = new Properties(); 

Session session = Session.getDefaultInstance(props, null); 

 Object content = message.getContent();

if (content instanceof String) {

log.info(content =  + message.getContent());

} else {

MimeMultipart multiPart = (MimeMultipart)content;

printContent(multiPart); 

}

==

private static void printContent(Multipart emailBody) {

try {

 for (int i=0; iemailBody.getCount(); i++) {

BodyPart part = emailBody.getBodyPart(i);

log.info(i +  body part content type =  + part.getContentType());

 

Object obj = null;

try {

obj = part.getContent();

log.info( content object type =  + obj.getClass().getName());

} catch (IOException ioe) {

LogUtils.error(log, Error in printContent, ioe);

}

if (obj instanceof String) {

log.info(i +  content is =  + obj.toString());

} else if (obj instanceof MimeMultipart){

printContent((Multipart)obj);

} else if (obj != null){

log.info(obj class type is  + obj.getClass().getName());

}

}

} catch (Exception ex) {

 ex.printStackTrace();

}


-- 
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/-/VzjOXP3gOMEJ.
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: Mime message pase error on appeninge

2011-11-09 Thread Kesava Neeli
I am testing the sample code with some flight itinerary emails which 
contain test  html. If I forward the email from any gmail account to my 
app.appspotmail.com, the whole email is parsed as text with the code. If 
the email originates from hotmail, apple mac client I consistently see the 
error Truncated quoted printable data when reading the data with 
getContent() call. 

Anyone from appengine team could comment on how to handle this? Can we do 
some intermediate steps to decode the inputstream in the bodyPart of the 
mime message? 

Thanks
Neeli 

-- 
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/-/hCBlyNLYfLoJ.
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: A simple imap email connector doesn't work

2011-11-07 Thread Kesava Neeli
Yes, I have read the docs before. I actually use it to send email. But my 
usecase here is slightly different. I am trying to connect to imap gmail 
server and read user's emails and do some parsing and this requires 
connecting to a different imap port via secure connection. I believe there 
is no work around for this and this exercise needs to be done on cloud 
servers outside of appengine.  

Thanks
Neeli 

-- 
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/-/xXjczyGuE8cJ.
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] A simple imap email connector doesn't work

2011-11-04 Thread Kesava Neeli
Hi,

A simple imap email program fails on appengine. The error message is clear 
that appengine does not allow socket classes. Can anyone suggest an option 
other than running the service outside appengine? 

Our app runs completely on GAE and it's painful to go for webservice from 
other cloud provider because of this. I wish google provides some secure 
wrappers to their own useful services.. 

java.lang.NoClassDefFoundError: javax.net.SocketFactory is a restricted class. 
Please see the Google App Engine developer's guide for more details.


public static void doit() {

Properties props = System.getProperties();

props.setProperty(mail.store.protocol, imaps);

try {

Session session = Session.getDefaultInstance(props, null);

Store store = session.getStore(imaps);

store.connect(imap.gmail.com, username, password);

System.out.println(store);


 Folder inbox = store.getFolder(Inbox);

inbox.open(Folder.READ_ONLY);

Message messages[] = inbox.getMessages();

System.out.println(Message count =  + messages.length);

 for(int i=0; i50; i++) {

System.out.println(Time =  + messages[i].getReceivedDate() + ; Subject = 
 + messages[i].getSubject());

}

} catch (NoSuchProviderException e) {

e.printStackTrace();

System.exit(1);

} catch (MessagingException e) {

e.printStackTrace();

System.exit(2);

}

}

-- 
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/-/cLUdlzUWQY4J.
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: Issues using JDO query in RemoteAPI

2011-11-04 Thread Kesava Neeli
GAE developers,

Anyone tried using java RemoteAPI on local servers and using the JDO object 
conversions? like in the example in this chain? I can only work with low 
level datastore Entity objects. If anyone has success with usage of JDO 
syntax on REmote API, your suggestions are much appreciated.. 

Thanks
Neeli 

-- 
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/-/andW9BCrtIgJ.
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: Issues using JDO query in RemoteAPI

2011-09-13 Thread Kesava Neeli
Hi 

Anyone has idea on how to make changes to appengine datastore from a java 
client running on your local desktop? My test app in the original post 
connects successfully to my remote app with Remote API. But the standard 
JDO persistence API calls fail. Am I missing any steps? The same code works 
when run on appengine. 

Does anyone have any java client sample code which interacts with appengine 
datastore? 

Thanks
Neeli 

-- 
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/-/xMaxMyP3MK4J.
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: Issues using JDO query in RemoteAPI

2011-09-03 Thread Kesava Neeli
Any one has suggestions? The JDO PersistenceManager api should work with 
remote api ?

-- 
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/-/h2Or6ESO6b8J.
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] How to export binary data fields from appengine datastore to other databases?

2011-09-02 Thread Kesava Neeli
 

I was using appengine python appcfg.py to do a bulk download/upload of data 
from my datastore. Works great. I had all my data in csv file when I did a 
download_data. My entities have hashmap properties (serialized data on 
datastore) which are saved in a base64 encoding in the csvfile. 

appcfg.py by default has these import_transform: 
transform.blobproperty_from_base64 export_transform: base64.b64encode When 
we import the data, python code has magic to convert it into blob object. 

I would like to use the generated csv file and write some scripts to migrate 
data to MySQL at some point. Anyone has thoughts on how to read the binary 
data and recreate a hashmap object? Either java/python api?   

-- 
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/-/PUmWdBcAXj0J.
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: Issues using JDO query in RemoteAPI

2011-08-31 Thread Kesava Neeli
Anyone has idea on what's wrong with the code?  The same code runs on 
appengine but not on my laptop via remote API. 

-- 
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/-/7PnqHki_PLUJ.
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] Issues using JDO query in RemoteAPI

2011-08-30 Thread Kesava Neeli
Hi,

I am trying to query my appengine data  datastore on my laptop using 
RemoteAPI. I am using JDO Query object to query the data. I have setup all 
the required datanuclues setup on my local box. When I run the following 
simple code I see the error. When I run the same Query on appengine as a 
servlet it looks ok but when I run it on my localbox, i have this error. Any 
thoughts?  

INFO: Listener found initialisation for persistable class 
com.neeli.data.EventTask

java.lang.ClassCastException: com.google.appengine.api.datastore.Blob cannot 
be cast to java.util.HashMap

at com.neeli.data.EventTask.jdoReplaceField(EventTask.java)

at com.neeli.data.EventTask.jdoReplaceFields(EventTask.java)

import com.google.appengine.tools.remoteapi.RemoteApiInstaller;

import com.google.appengine.tools.remoteapi.RemoteApiOptions;

import com.neeli.data.EventTask;

import java.io.IOException;


import javax.jdo.Query;

import javax.jdo.PersistenceManager;

import java.util.List;

public class RemoteApiTest {

public static void main(String[] args) throws IOException {

RemoteApiOptions options = new RemoteApiOptions()

.server(myapp.appspot.com, 443)

.credentials(username, password);

RemoteApiInstaller installer = new RemoteApiInstaller();

installer.install(options);

try {

PersistenceManager pm = PMF.get().getPersistenceManager();

//DatastoreService ds = DatastoreServiceFactory.getDatastoreService();

Query query = pm.newQuery(EventTask.class);

 ListEventTask results = (ListEventTask) query.execute();

if (!results.isEmpty()) {

for (EventTask task : results) {

System.out.println(taskId =  + task.getTaskId() + ; taskTitle =  + 
task.getTitle());

}

} else {

System.out.println(No data);

}

} catch (Exception e) {

e.printStackTrace();

} finally {

installer.uninstall();

}

}
}

-- 
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/-/MVNd9OxGQlMJ.
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: Failing to deploy my webapp to appengine

2011-08-25 Thread Kesava Neeli
Hi,

My app deployment worked from 9pm last night. I no longer have 500 error on 
index uploads. I wish google posts something to the news board if there are 
 known issues on appengine side. 

Thanks
Neeli 

-- 
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/-/i2Z9vi3xC80J.
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] Exporting and Importing data from Java application

2011-08-25 Thread Kesava Neeli
Hi,

I am exploring how to import/export data from appengine datastore. In Pyhton 
section of docs, there is good explanation on how to do this 
http://code.google.com/appengine/docs/python/tools/uploadingdata.html. I 
also found nice blog at 
http://ikaisays.com/2010/06/10/using-the-bulkloader-with-java-app-engine/. I 
hope this article would be included somewhere on google appengine docs. 

My question may be lame. I am wondering whether all the import/export 
functionality could be done entirely within a java application. The docs say 
that you can set up the RemoteApi part in java servlets and after that it's 
invoking 3-4 python commands to build the config file, download  upload 
data with various parameters. Can we do all those steps with some google 
java API? 

Thanks
Neeli 

-- 
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/-/PpPYugrjnwAJ.
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] Exporting and Importing data from Java application

2011-08-25 Thread Kesava Neeli
Hi IKai,

I haven't written anything concrete yet. I was playing around with the low 
level datastore API to retrieve and create new entities and following the 
steps in your blog. We are close to launching our mobile application with 
appengine serving as backend. We would like to have the capability of 
importing the data to CSV/XML and exporting too. The python command line 
tools seems to have the capability. Since our object schema is fluid, we 
would need to change the data frequently and we hope the import/export 
capability might help us. 

I also have a production deployment question. Say I have a app running on 
appengine and it's serving as abckend to my mobile application. It has lot 
of data from the customers. Say 6 months later, I have a major upgrade to my 
backend and create a completely new application. What's the easiest way to 
migrate all the data in the old app to new app? I guess we should use 
import/export capability or any other better way to handle data transfer 
between 2 apps in production scenario?

Thanks
Neeli 

-- 
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/-/SL4fM9QiJ2EJ.
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] Failing to deploy my webapp to appengine

2011-08-24 Thread Kesava Neeli
Hi,

I disabled my 2 old apps on appengine and created a new application. My 
deploy to appengine consistently fails with an error message 500 server 
error. The failure occurs during the step uploading index definitions. 
Anyone has thoughts on how to correct the error? 

Closing update: new version is ready to start serving.

Uploading index definitions.

java.io.IOException: Error posting to URL: 
https://appengine.google.com/api/datastore/index/add?app_id=my app 
nameversion=1

500 Internal Server Error


Thanks
Neeli 

-- 
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/-/6kvKuAhrEucJ.
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] deployment issues

2011-08-24 Thread Kesava Neeli
This is old post but I exactly have same problem. The deployment stalls 
whiel Uploading index definitions and can't get past that step for last 4 
hrs now. . Any thoughts? 
When I use my app, it complains about hte missing index and when I include 
it, the deployment hangs during that step. If I have empty index file, teh 
deployment is successful

Initiating update.

Cloning 5 static files.

Cloning 68 application files.

Uploading 1 files.

Uploaded 1 files.

Initializing precompilation...

Deploying new version.

Will check again in 1 seconds.

Will check again in 2 seconds.

Closing update: new version is ready to start serving.

Uploading index definitions.

java.io.IOException: Error posting to URL: 
https://appengine.google.com/api/datastore/index/add?app_id=my 
appversion=1

500 Internal Server Error

-- 
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/-/Tf7ZMCSLTAAJ.
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: 500 error updating index definitions

2011-08-24 Thread Kesava Neeli
Hi,

I am having similar issue. My app deployment is failing always with 500 
server error when uploading index definitions. LAst 4 hrs it's been like 
this. My old app with same index file works file. I created a new version of 
app wit hsame index file and it fails consistently. 

I put an empty index file and the deployment is successful. But my app fails 
with a missing index. When I include it, the deployment hangs. I think there 
is some problem with appengine today with new apps and index files. Could 
someone in GAE team comment on this? 

Thanks
Neeli 

-- 
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/-/VqAucCAR4cQJ.
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] Simple Throttling filter doesn't work

2011-08-16 Thread Kesava Neeli
I have a simple filter defined in web.xml like this. 

filter

filter-nameThrottlingFilter/filter-name

filter-classcom.xyz.filters.ThrottlingFilter/filter-class

/filter

filter-mapping

filter-nameThrottlingFilter/filter-name

url-pattern/*/url-pattern

/filter-mapping

and my code looks like below. In my test below, i wanted to allow only 2 
simultaneous connections to my page. I put an artificial sleep in my 
servlets and made 5 concurrent requests but the filter logic doesn't kick 
in. The connectionCount seems to be 0 for all the servlet requests. Can 
anyone suggest what's wrong? 


public class ThrottlingFilter implements Filter

{

   private static final String 
CONNECTION_NOT_ALLOWED_REACHED_MAXIMUM_NUMBER_OF_CONNECTIONS =

   Connection not allowed: reached maximum number of connections;


   private static final Logger log = Logger.getLogger(ThrottlingFilter.class
.getName());

   private int connectionCount = 0;

   private int max_connection_count = 2;


   public void destroy()

   {}


   public void init(FilterConfig config)

   {}

   

   @Override

   public void doFilter(ServletRequest request, ServletResponse response, 
FilterChain chain)

   throws IOException, ServletException

   {

  final boolean allowed;

  final HttpServletRequest httpRequest = (HttpServletRequest) request;

  final HttpServletResponse httpResponse = (HttpServletResponse) 
response;

  

  synchronized (this)

  {

 allowed = connectionCount  max_connection_count;

 log.info(connectionCount =  + connectionCount + ; 
max_connection_count =  + max_connection_count);


 if (allowed)

 {

++connectionCount;

log.info(connectionCount =  + connectionCount + ; in allowed 
block);

 }

  }

  if (!allowed) {

  log.info(CONNECTION_NOT_ALLOWED_REACHED_MAXIMUM_NUMBER_OF_CONNECTIONS
);

  httpResponse.sendError(HttpServletResponse.SC_SERVICE_UNAVAILABLE, 
CONNECTION_NOT_ALLOWED_REACHED_MAXIMUM_NUMBER_OF_CONNECTIONS);

  return;

  }


  try

  {

 chain.doFilter(httpRequest, httpResponse);

  }

  finally

  {

 synchronized (this)

 {

if (--connectionCount  0)

{

   connectionCount = 0;

}

log.info(connectionCount =  + connectionCount + ; in finally 
block);

 }

  }

   }

}

-- 
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/-/ogFIUgw2wlEJ.
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: Simple Throttling filter doesn't work

2011-08-16 Thread Kesava Neeli
Team,

Anyone has thoughts on above problem? I tested the same code in Tomcat/Jboss 
and it works fine. I could see the filter kicking in correctly after 2 
concurrent active requests. Looks like it's not possible only in appengine. 
I was trying to safegaurd the application from any DOS kind of attacks. Can 
someone in GAE team confirm whether this should work on appengine or not? 

Thanks
Neeli 

-- 
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/-/iUJd_L4ZMp8J.
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: Simple Throttling filter doesn't work

2011-08-16 Thread Kesava Neeli
Thanks for the reply. I figured it that was the case. There's no way in GAE 
to know how many VMs are there for our app. I would need to run a much 
bigger load to make sure i hit the same server concurrently and see if I hit 
this. As you said, this code is not applicable on GAE in general. 

-- 
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/-/aI310RA6ppkJ.
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: secure appengine urls with security constraints

2011-08-15 Thread Kesava Neeli
Thanks. I already had https enabled. That was straightforward from GAE docs. 
What I was trying to do is to prevent anyone from hitting my appengine urls 
other than customers who use our mobile app on phones.  I could use some 
public/private key  on handset and server and control who can access the 
urls. I also successfully tried ClientLogin interface to use appengine's 
OAuth API and send a valid token as part of every request. 


-- 
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/-/A4QB6LWRXKUJ.
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: secure appengine urls with security constraints

2011-08-14 Thread Kesava Neeli
Anyone has ideas on this topic? I don't want my application on appengine to 
be publicly available to anyone who knows the url. My client app running on 
mobile handsets ONLY should be able to hit my app on appengine servers. 

-- 
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/-/MWUJofGeYZoJ.
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] secure appengine urls with security constraints

2011-08-12 Thread Kesava Neeli
Hi,

I have a mobile application running on handsets and the backend runs on 
appengine. My mobile applications makes various backend hits to google 
appengine servers. I am already using https urls. I also looked at the 
security constraint setup to protect the urls with google authentication. 

I would like my backend (on appengine) available ONLY to my mobile 
application running on various handsets. Is there a way I can pass the login 
credentials as part of standard http request headers and google auth can 
handle it? The documentation says about redirecting to google login pages 
when security constraint is enabled which works great for web applications. 
But my use case is http requests coming from my mobile app on handsets. 

Another question : Can we disable http completelyand ONLY allow https? 

Thanks
Neeli 

-- 
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/-/jGH9HXZFMqsJ.
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] appengine deploy fails with 409 error and rollback doesn't work

2011-08-10 Thread Kesava Neeli
Hi,

I was deploying my app to google appengine server and ran into 409 conflict 
error. I deployed the app hundred of times in last month. I ran into this 
409 conflict error sometimes and I just waited for 2-3 minutes and I could 
redeploy. This time the 409 error persists. I looked at similar posts and 
all point to appcfg rollback option. I followed the instructions and did a 
cmd line 

appcfg rollback my app name
appcfg rollback my app name/war

but I always get back the error saying 
Unable to find the webapp directory my app name 

Can someone help? I am stuck with this whole morning today. 


-- 
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/-/dJgzMA7vXOcJ.
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: appengine deploy fails with 409 error and rollback doesn't work

2011-08-10 Thread Kesava Neeli
Anyone from GAE team has any inputs? I am not sure why my appcfg rollback 
may appp id/war  command doesn't work. It's just painful to just move to 
another app id just because of this 409 conflict error. 

-- 
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/-/Fw9dvSkbzbEJ.
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] Re: Mining logs for performance data

2011-07-29 Thread Kesava Neeli
Thanks for the pointer. I wasn't aware of the the 'download logs' tool. I
will give that a try.

Thanks
Neeli

On Thu, Jul 28, 2011 at 6:28 PM, Nichole nichole.k...@gmail.com wrote:

 Or the script that's used to upload your application now offers the
 ability to
 download logs too:

 http://code.google.com/appengine/docs/java/tools/uploadinganapp.html

 You'd have to download frequently or not depending upon your log
 rate.

 Or you could create a servletrequestlistener to gather the
 stats you need and store them in the datastore or another datastore
 using
 the RemoteApiInstaller.

 On Jul 28, 10:18 am, Stephen Johnson onepagewo...@gmail.com wrote:
  I don't know if this will help you or not but you can read about a
 utility I
  wrote a while back that uses XMPP to send log info for real-time
 monitoring.
  These messages can be saved to files I believe by some of the chat
 clients
  out there or probably a custom chat client could be built to save the
 data
  to files in your own format. Maybe it will give you an idea of what you
 can
  do.
 
  It can be found atwww.professionalintellectualdevelopment.comand there's
 a
  link to the code at Google Project Hosting there as well.
 
  Stephen
  CortexConnect
  cortexconnect.appspot.com
 
 
 
 
 
 
 
  On Thu, Jul 28, 2011 at 9:40 AM, Kesava Neeli nke...@gmail.com wrote:
   Anyone from GAE team has better suggestions for this? Normally we setup
 a
   separate metrics logger in log4j which would log all metric events in a
   separate log file. Then we generate reports out of it. On GAE, we
 cannot
   define a logfile for a separate logger and don't have access to
 download any
   log file..
 
   --
   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/-/t63On0QqjvkJ.
 
   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.



-- 
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: Mining logs for performance data

2011-07-28 Thread Kesava Neeli
Anyone from GAE team has better suggestions for this? Normally we setup a 
separate metrics logger in log4j which would log all metric events in a 
separate log file. Then we generate reports out of it. On GAE, we cannot 
define a logfile for a separate logger and don't have access to download any 
log file.. 

-- 
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/-/t63On0QqjvkJ.
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: FK Maps not supported error when using HashMaps

2011-07-27 Thread Kesava Neeli
Any one has suggestions on this? GAE doc says A datastore property can have 
more than one value. In JDO, this is represented by a single field with a 
Collection type, where the collection is of one of the core value 
typeshttp://code.google.com/appengine/docs/java/datastore/entities.html#Properties_and_Value_Typesor
 a 
*Serializable class*.

When I use my HashMap, I do set the serialized flag. 

@Persistent(serialized = true, defaultFetchGroup = true)

private HashMapString, String myMap;


Thanks

Neeli 

-- 
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/-/g2L2QcLtSXMJ.
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: Mining logs for performance data

2011-07-26 Thread Kesava Neeli
Thanks but that means you are manually doing a cutpaste of the log from 
google logs viewer and then applying the rules. That cannot be autoamated. I 
like to run a cron job that can parse the log for my special log statements 
and then create a report of out of it. Anyone from appengine team has a 
recommendation on how to approach this? One extreme way is to post each of 
the performance log statement to public server outside appengine and then 
process it. Don't see it as a viable solution. 

Thanks
Neeli 

-- 
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/-/95C0OSQD48cJ.
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] FK Maps not supported error when using HashMaps

2011-07-26 Thread Kesava Neeli
Hi,

I am seeing the following stack trace when using HashMap in my persistable 
class. I have something like this in my app. 

@PersistenceCapable
public class MyClass {
...

ListClassA list1;
ListClass B list2;

...
}

@PersistenceCapable

public class ClassA {

//some fields


@Persistent(serialized = true, defaultFetchGroup = true)

private HashMapString, String myMap;

@Persistent(serialized = true, defaultFetchGroup = true)

private ListHashMapString, String myListMap; 

//getters  setters

}


When I persist my MyClass object, it looks ok. I can see all ListClassA 
being persisted correctly. I saw old post from 2 yrs ago where GAE team 
member showed the example on how to persist using HashMap (like above). 


When I retrieve my MyClass object with my key to update it, I see the 
exception trace below. Can't we use HashMap at all? It's NOT listed in GAE 
supported collection class list at 
https://code.google.com/appengine/docs/java/datastore/jdo/dataclasses.html#Collections.
 
Any good alternatives to use?  I need to use key/value pairs in that object. 
Any pointers are much appreciated. 

NestedThrowablesStackTrace:
java.lang.UnsupportedOperationException: FK Maps not supported.
at 
org.datanucleus.store.appengine.DatastoreManager.newFKMapStore(DatastoreManager.java:589)
at 
org.datanucleus.store.mapped.MappedStoreManager.getBackingStoreForMap(MappedStoreManager.java:766)
at 
org.datanucleus.store.mapped.MappedStoreManager.getBackingStoreForField(MappedStoreManager.java:637)

-- 
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/-/EOhGl49yIvQJ.
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] How to handle SNMP traps on appengine?

2011-07-25 Thread Kesava Neeli
Hi,

I just wanted to know what's the best process to handle SNMP traps from the 
application. Our app will be doing some critical third party backend hits 
and we need to alerts/notifications on any errors. One option is sto end 
SNMP traps to some SNMP sever outside appengine but I don't want to have 
SNMP server installed in EC2 or any other cloud just for that. I could send 
email notification on error conditions but that is lame. Any suggestions? 

Thanks
Neeli 

-- 
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/-/Gf_BGTf3opkJ.
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] Mining logs for performance data

2011-07-25 Thread Kesava Neeli
Hi,

My application writes timing information for the backend hits in the log 
using standard logger. I can see them in the logs using GAE dashboard 'Logs' 
tab. I would like to run a cron job to get these metrics and have a report. 
How can I mine the application logs? Any suggestions on how to handle this?

Thanks
Neeli 

-- 
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/-/z82OQfwZHGUJ.
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] How to run quatz(kind) of scheduler service on appengine?

2011-07-22 Thread Kesava Neeli
Yes.. I looked at Background instance. It allows to have long tasks but it 
doesn't allow to spawn threads. Quartz fires off events in threads. So I 
guess quartz is not an option on app-engine. We can use appengine cron jobs 
to some extent but if you need to fire an event at exact minute, it would be 
tough. 

It's tough to maintain 2 cloud providers for single product. Not sure how 
efficient it is to call appengine urls from EC2. May be move to EC2 
completely may be better solution. 

We need object datastore for our product. Has anyone has experience with EC2 
object datastore SimpleDB? Does it have same features and JPA/JDO interfaces 
like appengine. GAE datastore is pretty good but it doesn't give a VM 
ownership to the developer. The Backends in appengine still don't give any 
control of the server/instance to developer.  


-- 
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/-/nlrteFBD_2sJ.
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: JPA em.persist() saving old copies of nested Entity class

2011-07-21 Thread Kesava Neeli
Thanks a lot for taking time to create a test case. I think I know what I am 
doing wrong. I actually tried JDO interface too and saw the same issue. I 
realized the old data items The first time i pass a json string for 
list1, list2 items and they get saved into ListSmartItem data field in 
MyDataObject. 

Then I do a find for the same instance (passing same key) of MyDataObject. I 
set the ListSmartItem data to list1, list2, list3. I was expecting 
the MyDataObject to replace it's existing data list and substitute with my 
new list1, list2, list3 items.  When I did a find() again, I got back 
list1,list2,list1,list2,list3. I didn't realize the old items were 
objects that were tied to my MyDataObject and unless I remove them, they 
will persist and tied to my parent object. So I implemented a compare and 
SmartItem and do selective inserts and do selective inserts/updates. 

Thanks for trying it in a test case though. 

-- 
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/-/0SC4YpdFXzwJ.
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] How to run quatz(kind) of scheduler service on appengine?

2011-07-21 Thread Kesava Neeli
Hi,

I have a requirement to run a quatrz scheduler service and fire off jobs 
based on the contents in the appengine datastore objects. We cannot run any 
quarts service that's up all the time in appengine. The crontasks in 
appengien with it's limitations are the only option? 

Any plans to improve on this in the future? When will appengine become an 
official product? Will we be ever able to run third party software/packages 
(ex: data mining/analytics) on appengine in the future ?We are small early 
startup deciding on various cloud options. Any comments are welcome. 

-- 
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/-/WkhkP4cc-EoJ.
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] multiple relationship fields error in JDO

2011-07-20 Thread Kesava Neeli
Hi,

I have seen similar error message posted in groups. I just wanted to see if 
this is fixed in current release or we shouldn't use this paradigm at all..

class A{
}

class B extends class A {
}

class MyClass {

ListA aList;
Listb bList;
.
}

I get the error 

javax.jdo.JDOFatalUserException: Error in meta-data for 
com.xxx.persistence.XXX.data: Class com.xxx.persistence.XXX has multiple 
relationship fields of type com.xxx.persistence.SmartItem: data and 
birthdayData.  This is not yet supported.
at 
org.datanucleus.jdo.NucleusJDOHelper.getJDOExceptionForNucleusException(NucleusJDOHelper.java:354)
at 
org.datanucleus.jdo.JDOPersistenceManager.getObjectById(JDOPersistenceManager.java:1676)

I also see this property that we could set. 

property name=datanucleus.appengine.allowMultipleRelationsOfSameType 
value=true /

Should this work or we CANNOT have references to multiple fields of same type 
from my main class? Is this a limitation only on GAE? Any comments are 
appreciated.  

Thanks

Neeli 




-- 
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/-/oezgU5ze_pQJ.
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] JPA em.persist() saving old copies of nested Entity class

2011-07-19 Thread Kesava Neeli
Hi,

I have a question on nested Entity class using JPA framework on appengine. I 
have code liek this..

@Entity
public class MyDataObject {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
Key key;

// some persistent fields of standatd types

@Basic

@OneToOne(cascade={CascadeType.PERSIST,CascadeType.REFRESH,CascadeType.REMOVE})
ListSmartItemdata;

// standard getters/setters
}

One of the fields above is data which is a collection of a another Entity 
class SmartItem.  
@Entity
public class SmartItem implements java.io.Serializable{
private static final long serialVersionUID = 4428700412206745337L;

@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
Key key;
public Key getKey() {
return key;
}
//bunch of persistent fields
}

Key key = 
KeyFactory.createKey(MyDataObject.class.getSimpleName(), newData.deviceId); 
newData.key = key;
em.persist(newData);
//em.merge(newData);

When I call em.persist for first time, the data is saved correctly. I see a 
list of my SmartItem objects in the datastore. When I call em.persist 
again for the same entiry MyDataObject, the SmartItems are appended and 
not replaced. Ex: First item I have my List data as list1, list2. 
Next I add list3 to my list and call em.persist(..). Now I see list1, 
list2, list1, list2, list3 items.  Tried em.merge and still same 
behavior. 

Anyone has suggestions? When I call em.persist(), I would like my nested 
Entity field item ListSmartItem data to just contain the new list and not 
the old entities.. 

Thanks
Neeli 


-- 
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/-/jw2M2-7kSucJ.
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: JPA em.persist() saving old copies of nested Entity class

2011-07-19 Thread Kesava Neeli
Hi,
Any one has suggestions to my issue? 

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