[appengine-java] doubt with detachable property...

2009-09-16 Thread Prashant
hi,


I tried the "Updating an Object" (using detachable property) example given
here.
Later I found that even if I do not add *detachable="true" *property to my
JDO class it works without any problem. Is it ok to work without detachable
property or it just worked with my case. Following is the code I tried :



@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Data{
@SuppressWarnings("unused")
@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Long id;

@Persistent
private String value;

public Data(String value){
this.value = value;
}

public void setValue(String value){
this.value = value;
}

public String getValue(){
return this.value;
}
}




public class Main extends HttpServlet {

public void doGet(HttpServletRequest req, HttpServletResponse resp)
throws IOException{
doReq(req, resp);
}

public void doPost(HttpServletRequest req, HttpServletResponse resp)
throws IOException{
doReq(req, resp);
}

private void doReq(HttpServletRequest req, HttpServletResponse resp)
throws IOException{
Data data = new Data("some value");
PrintWriter out = resp.getWriter();

PersistenceManager pm = PMF.get().getPersistenceManager();
pm.makePersistent(data);
pm.close();

chageValue(data);
out.close();
}

@SuppressWarnings("unchecked")
private void chageValue(Data data){
PersistenceManager pm = PMF.get().getPersistenceManager();
data.setValue("some other value.");
pm.makePersistent(data);
pm.close();
}
}

--~--~-~--~~~---~--~~
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: doubt with detachable property...

2009-09-16 Thread Prashant
one more doubt similar/related to previous one :

i want to fetch object(s) from datastore, cache it to Memcache and fetch it
from Memcache for further requests. and if any change happens to data i want
to update the object(s) to datastore straight away using cashed instance of
object instead of fetching it (again) form datastore and then updating it.
following is a code snippet:

Data data = cache.get("key");
data.setValue("new updated value");
pm.makePersistent(data);
cache.put("key", data);

thanks.



On Wed, Sep 16, 2009 at 5:49 PM, Prashant  wrote:

> hi,
>
>
> I tried the "Updating an Object" (using detachable property) example given
> here<http://code.google.com/appengine/docs/java/datastore/creatinggettinganddeletingdata.html#Updating_an_Object>.
> Later I found that even if I do not add *detachable="true" *property to my
> JDO class it works without any problem. Is it ok to work without detachable
> property or it just worked with my case. Following is the code I tried :
>
>
>
> @PersistenceCapable(identityType = IdentityType.APPLICATION)
> public class Data{
> @SuppressWarnings("unused")
> @PrimaryKey
> @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
> private Long id;
>
> @Persistent
> private String value;
>
> public Data(String value){
> this.value = value;
> }
>
> public void setValue(String value){
> this.value = value;
> }
>
> public String getValue(){
> return this.value;
> }
> }
>
>
>
>
> public class Main extends HttpServlet {
>
> public void doGet(HttpServletRequest req, HttpServletResponse resp)
> throws IOException{
> doReq(req, resp);
> }
>
> public void doPost(HttpServletRequest req, HttpServletResponse resp)
> throws IOException{
> doReq(req, resp);
> }
>
> private void doReq(HttpServletRequest req, HttpServletResponse resp)
> throws IOException{
> Data data = new Data("some value");
> PrintWriter out = resp.getWriter();
>
> PersistenceManager pm = PMF.get().getPersistenceManager();
> pm.makePersistent(data);
> pm.close();
>
> chageValue(data);
> out.close();
> }
>
> @SuppressWarnings("unchecked")
> private void chageValue(Data data){
> PersistenceManager pm = PMF.get().getPersistenceManager();
> data.setValue("some other value.");
> pm.makePersistent(data);
> pm.close();
> }
> }
>

--~--~-~--~~~---~--~~
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: doubt with detachable property...

2009-09-16 Thread Prashant
oh sorry, i forgot to add a point to the second post :

is it an acceptable practice to do so (second post) ? is it required for my
JDO class (Data, first psot) to extend Serialzable Class?

--~--~-~--~~~---~--~~
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] using a variable to buffer & cache data...

2009-09-16 Thread Prashant
hi,

my app needs to store some data to datastore for each & every request, say 1
object per request which causes high cpu usage per request. to minimize the
cpu usage per request, instead of adding the object directly to datastore i
add the object to a LinkedList (every request) and use a cron which moves
objects form the LinkedList to datastrore periodically, say every min.

I feel it is not a good practice. I don't want to use memcache (instead of
server ram) to store my LinkedList because delay in fetching and storing the
list form/to memcache may cause loss of data from upcomming requests (or
previous request). I don't want to use task queue either for some reasons.

Experts please comment on this kind of implementation. Losses & Benefits,
any alternative good practice.

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 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: [google-appengine] using a variable to buffer & cache data...

2009-09-16 Thread Prashant
thanks nick.

Actually I wanted to use Task Queue instead of Global LinkedList, but this
task queue quota is very limited. i am expecting my app to reach at least 5
to 10 lacks queues per day.


2009/9/16 Nick Johnson (Google) 

> Hi Prashant,
> In addition to what Barry says below, a couple of comments:
> - You can safely ignore the 'high cpu' warnings if you've already done what
> you can to optimize the page. You're not going to hit any invisible limits
> based on them, just the usual CPU quota etc.
> - If 'eventual' writes are good enough, you may want to look into using the
> task queue. You can enqueue the write in the task queue, which will do it
> offline and avoid making the user wait.
>
> -Nick Johnson
>
>
> On Wed, Sep 16, 2009 at 2:11 PM, Prashant  wrote:
>
>> hi,
>>
>> my app needs to store some data to datastore for each & every request, say
>> 1 object per request which causes high cpu usage per request. to minimize
>> the cpu usage per request, instead of adding the object directly to
>> datastore i add the object to a LinkedList (every request) and use a cron
>> which moves objects form the LinkedList to datastrore periodically, say
>> every min.
>>
>> I feel it is not a good practice. I don't want to use memcache (instead of
>> server ram) to store my LinkedList because delay in fetching and storing the
>> list form/to memcache may cause loss of data from upcomming requests (or
>> previous request). I don't want to use task queue either for some reasons.
>>
>> Experts please comment on this kind of implementation. Losses & Benefits,
>> any alternative good practice.
>>
>> Thanks.
>>
>>
>>
>
>
> --
> Nick Johnson, Developer Programs Engineer, App Engine
> Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number:
> 368047
>
> >
>

--~--~-~--~~~---~--~~
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: [google-appengine] using a variable to buffer & cache data...

2009-09-16 Thread Prashant
ohh sorry, my bad, I meant Lakhs (1Lakh = 100, 000).


2009/9/16 Nick Johnson (Google) 

> Hi Prashant,
>
> On Wed, Sep 16, 2009 at 3:54 PM, Prashant  wrote:
>
>> thanks nick.
>>
>> Actually I wanted to use Task Queue instead of Global LinkedList, but this
>> task queue quota is very limited. i am expecting my app to reach at least 5
>> to 10 lacks queues per day.
>>
>
> How many is a 'lacks'?
>
> -Nick
>
>
>>
>>
>> 2009/9/16 Nick Johnson (Google) 
>>
>>>  Hi Prashant,
>>> In addition to what Barry says below, a couple of comments:
>>> - You can safely ignore the 'high cpu' warnings if you've already done
>>> what you can to optimize the page. You're not going to hit any invisible
>>> limits based on them, just the usual CPU quota etc.
>>> - If 'eventual' writes are good enough, you may want to look into using
>>> the task queue. You can enqueue the write in the task queue, which will do
>>> it offline and avoid making the user wait.
>>>
>>> -Nick Johnson
>>>
>>>
>>> On Wed, Sep 16, 2009 at 2:11 PM, Prashant  wrote:
>>>
>>>> hi,
>>>>
>>>> my app needs to store some data to datastore for each & every request,
>>>> say 1 object per request which causes high cpu usage per request. to
>>>> minimize the cpu usage per request, instead of adding the object directly 
>>>> to
>>>> datastore i add the object to a LinkedList (every request) and use a cron
>>>> which moves objects form the LinkedList to datastrore periodically, say
>>>> every min.
>>>>
>>>> I feel it is not a good practice. I don't want to use memcache (instead
>>>> of server ram) to store my LinkedList because delay in fetching and storing
>>>> the list form/to memcache may cause loss of data from upcomming requests 
>>>> (or
>>>> previous request). I don't want to use task queue either for some reasons.
>>>>
>>>> Experts please comment on this kind of implementation. Losses &
>>>> Benefits, any alternative good practice.
>>>>
>>>> Thanks.
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Nick Johnson, Developer Programs Engineer, App Engine
>>> Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration
>>> Number: 368047
>>>
>>>
>>>
>>
>>
>>
>
>
> --
> Nick Johnson, Developer Programs Engineer, App Engine
> Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number:
> 368047
>
> >
>

--~--~-~--~~~---~--~~
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: [google-appengine] using a variable to buffer & cache data...

2009-09-16 Thread Prashant
thanks a lot for your kind support.
I am almost done with my app and I am not in mood to rewrite it now. I will
surely use tasks for next and onwards versions and I will contact you as
soon as I enable billing for my app.



On Thu, Sep 17, 2009 at 1:34 AM, Nick Johnson (Google) <
nick.john...@google.com> wrote:

> Hi Prashant,
>
> The task queue quota for billed apps is currently set at 100,000. If you
> have a compelling use case for more tasks per day, we can increase your
> quota accordingly.
>
> -Nick
>
>
> On Wed, Sep 16, 2009 at 9:00 PM, Prashant  wrote:
>
>> ohh sorry, my bad, I meant Lakhs (1Lakh = 100, 000).
>>
>>
>>
>> 2009/9/16 Nick Johnson (Google) 
>>
>>> Hi Prashant,
>>>
>>> On Wed, Sep 16, 2009 at 3:54 PM, Prashant  wrote:
>>>
>>>> thanks nick.
>>>>
>>>> Actually I wanted to use Task Queue instead of Global LinkedList, but
>>>> this task queue quota is very limited. i am expecting my app to reach at
>>>> least 5 to 10 lacks queues per day.
>>>>
>>>
>>> How many is a 'lacks'?
>>>
>>> -Nick
>>>
>>>
>>>>
>>>>
>>>> 2009/9/16 Nick Johnson (Google) 
>>>>
>>>>>  Hi Prashant,
>>>>> In addition to what Barry says below, a couple of comments:
>>>>> - You can safely ignore the 'high cpu' warnings if you've already done
>>>>> what you can to optimize the page. You're not going to hit any invisible
>>>>> limits based on them, just the usual CPU quota etc.
>>>>> - If 'eventual' writes are good enough, you may want to look into using
>>>>> the task queue. You can enqueue the write in the task queue, which will do
>>>>> it offline and avoid making the user wait.
>>>>>
>>>>> -Nick Johnson
>>>>>
>>>>>
>>>>> On Wed, Sep 16, 2009 at 2:11 PM, Prashant  wrote:
>>>>>
>>>>>> hi,
>>>>>>
>>>>>> my app needs to store some data to datastore for each & every request,
>>>>>> say 1 object per request which causes high cpu usage per request. to
>>>>>> minimize the cpu usage per request, instead of adding the object 
>>>>>> directly to
>>>>>> datastore i add the object to a LinkedList (every request) and use a cron
>>>>>> which moves objects form the LinkedList to datastrore periodically, say
>>>>>> every min.
>>>>>>
>>>>>> I feel it is not a good practice. I don't want to use memcache
>>>>>> (instead of server ram) to store my LinkedList because delay in fetching 
>>>>>> and
>>>>>> storing the list form/to memcache may cause loss of data from upcomming
>>>>>> requests (or previous request). I don't want to use task queue either for
>>>>>> some reasons.
>>>>>>
>>>>>> Experts please comment on this kind of implementation. Losses &
>>>>>> Benefits, any alternative good practice.
>>>>>>
>>>>>> Thanks.
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Nick Johnson, Developer Programs Engineer, App Engine
>>>>> Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration
>>>>> Number: 368047
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>> --
>>> Nick Johnson, Developer Programs Engineer, App Engine
>>> Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration
>>> Number: 368047
>>>
>>>
>>>
>>
>>
>>
>
>
> --
> Nick Johnson, Developer Programs Engineer, App Engine
>
>
> >
>

--~--~-~--~~~---~--~~
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] My First App

2009-09-17 Thread Prashant
Hi all,

Yesterday I wrote an app which helps you meeting new friends on your Google
Talk ! I named it Chat Me.

When you use Chat Me, it picks another user at random and lets you have a
one-on-one chat with each other. All chats are completely anonymous,
although there is nothing to stop you from revealing personal details if you
would like to.

To use *Chat Me*, just logon to Google Talk and add *chat...@appspot.com* to
your friend list.

Please send me feedback if you try it.

Thanks & Happy Chatting :)

--~--~-~--~~~---~--~~
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] Using detachable property

2009-09-17 Thread Prashant
hi,


I tried the "Updating an Object" (using detachable property) example given
here.
While experimenting with it I found that even if I do not add
*detachable="true"
*property to my JDO class it works without any problem. Is it ok to work
without detachable property or it just worked with my case? Following is the
code I tried :



@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Data{
@SuppressWarnings("unused")
@PrimaryKey
*...@persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)*
private Long id;

@Persistent
private String value;

public Data(String value){
this.value = value;
}

public void setValue(String value){
this.value = value;
}

public String getValue(){
return this.value;
}
}




public class Main extends HttpServlet {

public void doGet(HttpServletRequest req, HttpServletResponse resp)
throws IOException{
doReq(req, resp);
}

public void doPost(HttpServletRequest req, HttpServletResponse resp)
throws IOException{
doReq(req, resp);
}

private void doReq(HttpServletRequest req, HttpServletResponse resp)
throws IOException{
Data data = new Data("some value");

*PersistenceManager pm = PMF.get().**getPersistenceManager();
pm.makePersistent(data); // NOTE: i am not detaching the object
pm.close();*

   * chageValue(data);*
}

@SuppressWarnings("unchecked")
private void chageValue(Data data){
*PersistenceManager pm = PMF.get().**getPersistenceManager();
data.setValue("some other value.");
pm.makePersistent(data);
pm.close();*
}
}


i want to fetch object(s) from datastore, cache it to Memcache and use the
same (cached object) for further uses (over requests). and if any change
happens to the object(s) i want to update the object(s) to datastore
straight away using cashed instance of object instead of fetching it (again)
form datastore and then updating it. following is a code snippet:

...
...
Data data = *cache*.get("key");
data.setValue("new updated value");
pm.makePersistent(data);
*cache*.put("key", data);
...
...
...

is it necessary to add *detachable="true"* to my JDO class (Data) ? is it
necessary to detach object before caching to Memcache? is it required for my
JDO class (Data) to extend Serialzable Class?


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 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] Doubt with detachable property of JDO (Experts please reply)

2009-09-17 Thread Prashant
hi,


I tried the "Updating an Object" (using detachable property) example given
here.
While experimenting with it I found that even if I do not add
*detachable="true"
*property to my JDO class it works without any problem. Is it ok to work
without detachable property or it just worked with my case? Following is the
code I tried :



@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Data{
@SuppressWarnings("unused")
@PrimaryKey
*...@persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)*
private Long id;

@Persistent
private String value;

public Data(String value){
this.value = value;
}

public void setValue(String value){
this.value = value;
}

public String getValue(){
return this.value;
}
}




public class Main extends HttpServlet {

public void doGet(HttpServletRequest req, HttpServletResponse resp)
throws IOException{
doReq(req, resp);
}

public void doPost(HttpServletRequest req, HttpServletResponse resp)
throws IOException{
doReq(req, resp);
}

private void doReq(HttpServletRequest req, HttpServletResponse resp)
throws IOException{
Data data = new Data("some value");

*PersistenceManager pm = PMF.get().**getPersistenceManager();
pm.makePersistent(data); // NOTE: i am not detaching the object
pm.close();*

   * chageValue(data);*
}

@SuppressWarnings("unchecked")
private void chageValue(Data data){
*PersistenceManager pm = PMF.get().**getPersistenceManager();
data.setValue("some other value.");
pm.makePersistent(data);
pm.close();*
}
}


i want to fetch object(s) from datastore, cache it to Memcache and use the
same (cached object) for further uses (over requests). and if any change
happens to the object(s) i want to update the object(s) to datastore
straight away using cashed instance of object instead of fetching it (again)
form datastore and then updating it. following is a code snippet:

...
...
Data data = *cache*.get("key");
data.setValue("new updated value");
pm.makePersistent(data);
*cache*.put("key", data);
...
...
...

is it necessary to add *detachable="true"* to my JDO class (Data) ? is it
necessary to detach object before caching to Memcache? is it required for my
JDO class (Data) to extend Serialzable Class?


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 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] java.lang.IllegalArgumentException: Must set a body

2009-09-17 Thread Prashant
Hi,


It seems like xmpp api is missing message body once every few requests. I am
getting following error repeatedly, saying "Must set a body", while parsing
the request to Message. I am not using */_ah/xmpp/message/chat/* url for
anything except for receiving xmpp messages. Neither this url is accessible
to anyone.





#
09-17 10:29PM 25.686

/_ah/xmpp/message/chat/
java.lang.IllegalArgumentException: Must set a body
at
com.google.appengine.api.xmpp.MessageBuilder.build(MessageBuilder.java:54)
at
com.google.appengine.api.xmpp.InboundMessageParser.parseMessage(InboundMessageParser.java:51)
at
com.google.appengine.api.xmpp.XMPPServiceImpl.parseMessage(XMPPServiceImpl.java:111)
at antshpra.chat.servlets.Main.doPost(Main.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)
at
com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:35)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at
com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
at
com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:237)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:313)
at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:830)
at
com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:76)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
at
com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:139)
at
com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:235)
at
com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:4950)
at
com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:4948)
at
com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingApplicationHandler.java:24)
at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:359)
at com.google.net.rpc.impl.Server$2.run(Server.java:823)
at
com.google.tracing.LocalTraceSpanRunnable.run(LocalTraceSpanRunnable.java:56)
at
com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan(LocalTraceSpanBuilder.java:516)
at com.google.net.rpc.impl.Server.startRpc(Server.java:778)
at com.google.net.rpc.impl.Server.processRequest(Server.java:351)
at
com.google.net.rpc.impl.ServerConnection.messageReceived(ServerConnection.java:437)
at
com.google.net.rpc.impl.RpcConnection.parseMessages(RpcConnection.java:319)
at
com.google.net.rpc.impl.RpcConnection.dataReceived(RpcConnection.java:290)
at com.google.net.async.Connection.handleReadEvent(Connection.java:428)
at
com.google.net.async.EventDispatcher.processNetworkEvents(EventDispatcher.java:762)
at
com.google.net.async.EventDispatcher.internalLoop(EventDispatcher.java:207)
at com.google.net.async.EventDispatcher.loop(EventDispatcher.java:101)
at
com.google.net.rpc.RpcService.runUntilServerShutdown(RpcService.java:251)
at
com.google.apphosting.runtime.JavaRuntime$RpcRunnable.run(JavaRuntime.java:392)
at java.lang.Thread.run(Unknown Source)

#
C 09-17 10:29PM 25.688

Uncaught exception from servlet
java.lang.IllegalArgumentException: Must set a body
at
com.google.appengine.api.xmpp.MessageBuilder.build(MessageBuilder.java:54)
at
com.google.appengine.api.xmpp.InboundMessageParser.parseMessage(InboundMessageParser.java:51)
at
com.google.appengine.api.xmpp.XMPPServiceImpl.parseMessage(XMPPServiceImpl.java:111)
at antshpra.chat.servlets.Main.doPost(Main.java:97)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)
at
com.google.appho

[appengine-java] can xmpp api send and receive messages using gmail ids?

2009-09-20 Thread Prashant
Hi,


is it possible to use xmpp api to send and receive messages using gmail ids
?


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 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: can xmpp api send and receive messages using gmail ids?

2009-09-21 Thread Prashant
no, no, no, i meant to say that i want to send/receive xmpp to my friends'
ids etc. form my gmail id using my app (instead of gTalk), say a kind of
automated replies. if it is possible then how?

--~--~-~--~~~---~--~~
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] reading file from file system

2009-09-22 Thread Prashant
Hi,

appengine docs says "An application can read its own files from the
filesystem using classes such as java.io.FileReader." but I am getting
"java.security.AccessControlException: access denied" while I try create a
new FileReader. following are the code I tried and error log. BTY how to
read resource files using Class.getResource() OR
ServletContext.getResource().


FileReader reader = null;
PrintWriter out = resp .getWriter();

try {
reader = new FileReader("/test/file.txt");
} catch (FileNotFoundException e) {
out.write(e.getMessage());
}

out.close();



   1. 09-22 02:57AM 05.253

   /
   java.security.AccessControlException: access denied
(java.io.FilePermission /test/file.txt read)
at java.security.AccessControlContext.checkPermission(Unknown Source)

at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkRead(Unknown Source)
at java.io.FileInputStream.(FileInputStream.java:133)

at java.io.FileInputStream.(FileInputStream.java:98)
at java.io.FileReader.(Unknown Source)
at antshpra.Main.doGet(Main.java:18)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:693)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
at 
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)

at 
com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:35)
at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at 
com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)

at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
at 
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
at 
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)

at 
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at 
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)

at 
com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:237)
at 
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:313)

at 
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
at 
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:830)
at 
com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:76)

at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
at 
com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:139)
at 
com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:235)

at 
com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:4950)
at 
com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:4948)
at 
com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingApplicationHandler.java:24)

at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:359)
at com.google.net.rpc.impl.Server$2.run(Server.java:823)
at 
com.google.tracing.LocalTraceSpanRunnable.run(LocalTraceSpanRunnable.java:56)

at 
com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan(LocalTraceSpanBuilder.java:516)
at com.google.net.rpc.impl.Server.startRpc(Server.java:778)
at com.google.net.rpc.impl.Server.processRequest(Server.java:351)

at 
com.google.net.rpc.impl.ServerConnection.messageReceived(ServerConnection.java:437)
at 
com.google.net.rpc.impl.RpcConnection.parseMessages(RpcConnection.java:319)
at 
com.google.net.rpc.impl.RpcConnection.dataReceived(RpcConnection.java:290)

at com.google.net.async.Connection.handleReadEvent(Connection.java:428)
at 
com.google.net.async.EventDispatcher.processNetworkEvents(EventDispatcher.java:762)
at 
com.google.net.async.EventDispatcher.internalLoop(EventDispatcher.java:207)

at com.google.net.async.EventDispatcher.loop(EventDispatcher.java:101)
at 
com.google.net.rpc.RpcService.runUntilServerShutdown(RpcService.java:251)
at 
com.google.apphosting.runtime.JavaRuntime$RpcRunnable.run(JavaRuntime.java:392)

at java.lang.Thread.run(Unknown Source)

   2.  C 09-22 02:57AM 05.268

   Uncaught exception fr

[appengine-java] Re: reading file from file system

2009-09-22 Thread Prashant
hi,

i have found out where i was wrong.
thanks anyway...


On Tue, Sep 22, 2009 at 3:37 PM, Prashant  wrote:

> Hi,
>
> appengine docs says "An application can read its own files from the
> filesystem using classes such as java.io.FileReader." but I am getting
> "java.security.AccessControlException: access denied" while I try create a
> new FileReader. following are the code I tried and error log. BTY how to
> read resource files using Class.getResource() OR
> ServletContext.getResource().
>
>
> FileReader reader = null;
> PrintWriter out = resp .getWriter();
>
> try {
> reader = new FileReader("/test/file.txt");
> } catch (FileNotFoundException e) {
> out.write(e.getMessage());
> }
>
> out.close();
>
>
>
>1. 09-22 02:57AM 05.253
>
>/
>java.security.AccessControlException: access denied 
> (java.io.FilePermission /test/file.txt read)
>   at java.security.AccessControlContext.checkPermission(Unknown Source)
>
>   at java.security.AccessController.checkPermission(Unknown Source)
>   at java.lang.SecurityManager.checkPermission(Unknown Source)
>   at java.lang.SecurityManager.checkRead(Unknown Source)
>   at java.io.FileInputStream.(FileInputStream.java:133)
>
>
>   at java.io.FileInputStream.(FileInputStream.java:98)
>   at java.io.FileReader.(Unknown Source)
>   at antshpra.Main.doGet(Main.java:18)
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:693)
>
>
>   at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
>   at 
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
>   at 
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)
>
>
>   at 
> com.google.apphosting.runtime.jetty.SaveSessionFilter.doFilter(SaveSessionFilter.java:35)
>   at 
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
>   at 
> com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
>
>
>   at 
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
>   at 
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
>   at 
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
>
>
>   at 
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
>   at 
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
>   at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
>
>
>   at 
> com.google.apphosting.runtime.jetty.AppVersionHandlerMap.handle(AppVersionHandlerMap.java:237)
>   at 
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
>   at org.mortbay.jetty.Server.handle(Server.java:313)
>
>
>   at 
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
>   at 
> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:830)
>   at 
> com.google.apphosting.runtime.jetty.RpcRequestParser.parseAvailable(RpcRequestParser.java:76)
>
>
>   at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
>   at 
> com.google.apphosting.runtime.jetty.JettyServletEngineAdapter.serviceRequest(JettyServletEngineAdapter.java:139)
>   at 
> com.google.apphosting.runtime.JavaRuntime.handleRequest(JavaRuntime.java:235)
>
>
>   at 
> com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:4950)
>   at 
> com.google.apphosting.base.RuntimePb$EvaluationRuntime$6.handleBlockingRequest(RuntimePb.java:4948)
>   at 
> com.google.net.rpc.impl.BlockingApplicationHandler.handleRequest(BlockingApplicationHandler.java:24)
>
>
>   at com.google.net.rpc.impl.RpcUtil.runRpcInApplication(RpcUtil.java:359)
>   at com.google.net.rpc.impl.Server$2.run(Server.java:823)
>   at 
> com.google.tracing.LocalTraceSpanRunnable.run(LocalTraceSpanRunnable.java:56)
>
>
>   at 
> com.google.tracing.LocalTraceSpanBuilder.internalContinueSpan(LocalTraceSpanBuilder.java:516)
>   at com.google.net.rpc.impl.Server.startRpc(Server.java:778)
>   at com.google.net.rpc.impl.Server.processRequest(Server.java:351)
>
>
>   at 
> com.google.net.rpc.impl.ServerConnection.messageReceived(ServerConnection.java:437)
>   at 
> com.google.net.rpc.impl.RpcConnection.parseMessages(RpcConnection.java:319)
>   at 
> com.google.net.rpc.impl.RpcConnection.dataReceived

[appengine-java] will it make any difference if i do not provide a separate class (PMF) for PersistentManagerFactory

2009-09-23 Thread Prashant
Hi,


Will it make any difference to the performance of the app if I do not write
a separate class (PMF, as suggested in GAE docs) for getting
PersistentManagerFactory instance, instead, I declare it as a variable in
the class where I want to use it, like

protected final PersistenceManagerFactory pmf =
JDOHelper.getPersistenceManagerFactory("transactions-optional");

// NOTE: I am not using *static* keyword.

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 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: can xmpp api send and receive messages using gmail ids?

2009-09-23 Thread Prashant
yes, exactly. I tried it and it is not allowing to me send message from my
gtalk id :(

On Wed, Sep 23, 2009 at 11:59 PM, Jason (Google) wrote:

> I think I understand what you're saying -- you want to send one or more
> updates via XMPP to your friends from your own GTalk ID through your App
> Engine application. This should work too because the MessageBuilder class
> allows you to specify a fromJid (your Gmail address) and an array of
> recipientJids (your friends' Jabber IDs, Gmail or otherwise). Is this what
> you're looking for?
> - Jason
>
> On Mon, Sep 21, 2009 at 9:29 PM, Prashant  wrote:
>
>> no, no, no, i meant to say that i want to send/receive xmpp to my friends'
>> ids etc. form my gmail id using my app (instead of gTalk), say a kind of
>> automated replies. if it is possible then how?
>>
>>
>>
>>
>
> >
>

--~--~-~--~~~---~--~~
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] how to get over 1 mb respose size url fetch api limit?

2009-09-25 Thread Prashant
Hi,

I want to fetch urls having more than 1mb response size. is there any way to
get around 1 mb response size limit?

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 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] Child Objects and Relationships (JDO)

2009-09-25 Thread Prashant
Hi,

I created a relationship similar to the one given
here.
Suppose fetched an *Employee*** entity from datastore, now, how to get *
Employee*'s *ContactInfo* entity?

I tries using *employee.myContactInfo* but it gives nullPointerException.

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 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: Child Objects and Relationships (JDO)

2009-09-25 Thread Prashant
still not working... :(

following are my classes...



@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Block implements Serializable {

@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Long block_id;

@Persistent
private String block_description;

@Persistent(defaultFetchGroup = "true")
private BlockModule block_module;






@PersistenceCapable(identityType = IdentityType.APPLICATION)
public abstract class BlockModule implements Serializable{

@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
protected Key key;

protected abstract String getTitle(HttpServletRequest req);

protected abstract String getContent(HttpServletRequest req);
}



@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class MyBlock extends BlockModule{

@Persistent
private String block_title;

@Persistent
private String block_content;

...



i am putting *MyBlock*'s instance in *Block*'s instance ...



On Sat, Sep 26, 2009 at 2:05 AM, objectuser  wrote:

>
> Put the myContactInfo property in the default fetch group (search for
> defaultFetchGroup in this group).
>
> On Sep 25, 2:32 pm, Prashant  wrote:
> > Hi,
> >
> > I created a relationship similar to the one given
> > here<
> http://code.google.com/appengine/docs/java/datastore/dataclasses.html...>.
> > Suppose fetched an *Employee*** entity from datastore, now, how to get *
> > Employee*'s *ContactInfo* entity?
> >
> > I tries using *employee.myContactInfo* but it gives nullPointerException.
> >
> > 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 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] little help with object child relationship...

2009-09-25 Thread Prashant
Hi,


I tried to create an object child relationship, both (object and child) are
getting saved properly but while retrieving them back I am getting
nullPointerException for child. Please help, following is my code:



@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Data{

@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
Long id;

@Persistent
MyData mydata;
}





@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class MyData{

@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key key;

@Persistent(defaultFetchGroup = "true")
String myValue;
}




public class Main extends HttpServlet {

public void doGet(HttpServletRequest req, HttpServletResponse resp)
throws IOException{
/*
Data data = new Data();
data.mydata = new MyData();
data.mydata.myValue = "some value";
PersistenceManager pm = PMF.get().getPersistenceManager();
pm.makePersistent(data);
resp.getWriter().print("Done");
*/

PersistenceManager pm = PMF.get().getPersistenceManager();
Data data = pm.getObjectById(Data.class, 3);
resp.getWriter().print(data.mydata.myValue); //
NullPointerException
pm.close();
}
}

--~--~-~--~~~---~--~~
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] little help with object child relationship...

2009-09-25 Thread Prashant
Hi,


I tried to create an object child relationship, both (object and child) are
getting saved properly but while retrieving them back I am getting
nullPointerException for child. Please help, following is my code:



@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Data{

@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
Long id;

@Persistent
MyData mydata;
}





@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class MyData{

@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Key key;

@Persistent(defaultFetchGroup = "true")
String myValue;
}




public class Main extends HttpServlet {

public void doGet(HttpServletRequest req, HttpServletResponse resp)
throws IOException{
/*
Data data = new Data();
data.mydata = new MyData();
data.mydata.myValue = "some value";
PersistenceManager pm = PMF.get().getPersistenceManager();
pm.makePersistent(data);
resp.getWriter().print("Done");
*/

PersistenceManager pm = PMF.get().getPersistenceManager();
Data data = pm.getObjectById(Data.class, 3);
resp.getWriter().print(data.mydata.myValue); //
NullPointerException
pm.close();
}
}

--~--~-~--~~~---~--~~
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: little help with object child relationship...

2009-09-25 Thread Prashant
sorry guys, my bad. again !

On Sat, Sep 26, 2009 at 10:20 AM, Prashant  wrote:

> Hi,
>
>
> I tried to create an object child relationship, both (object and child) are
> getting saved properly but while retrieving them back I am getting
> nullPointerException for child. Please help, following is my code:
>
>
>
> @PersistenceCapable(identityType = IdentityType.APPLICATION)
> public class Data{
>
> @PrimaryKey
> @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
> Long id;
>
> @Persistent
> MyData mydata;
> }
>
>
>
>
>
> @PersistenceCapable(identityType = IdentityType.APPLICATION)
> public class MyData{
>
> @PrimaryKey
> @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
> private Key key;
>
> @Persistent(defaultFetchGroup = "true")
> String myValue;
> }
>
>
>
>
> public class Main extends HttpServlet {
>
> public void doGet(HttpServletRequest req, HttpServletResponse resp)
> throws IOException{
> /*
> Data data = new Data();
> data.mydata = new MyData();
> data.mydata.myValue = "some value";
> PersistenceManager pm = PMF.get().getPersistenceManager();
> pm.makePersistent(data);
> resp.getWriter().print("Done");
> */
>
> PersistenceManager pm = PMF.get().getPersistenceManager();
> Data data = pm.getObjectById(Data.class, 3);
> resp.getWriter().print(data.mydata.myValue); //
> NullPointerException
> pm.close();
> }
> }
>
>

--~--~-~--~~~---~--~~
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: receiving mail demo

2009-10-18 Thread Prashant
i tried reading mail body using following code :

// print message.getContentType()
ByteArrayInputStream arrayStream = (ByteArrayInputStream)
message.getContent();
while(arrayStream.read(buffer) != -1)
// print new String(buffer)


i tested by sending a mail with following body :

this is great
this is great
this is great

following is what i got as output :


[image:
?ui=2&view=att&th=12468634e50e53d8&attid=0.1&disp=attd&realattid=ii_12468634e50e53d8&zw]

is this right way to read message body? why i am getting same body twice in
two different forms (plain text & html)?

--~--~-~--~~~---~--~~
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: receiving mail demo

2009-10-18 Thread Prashant
I used GMail to send mail...

--~--~-~--~~~---~--~~
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: Google Analytics tracking code on GAE

2009-10-18 Thread Prashant
you guys meant that GAE removes javascript from your code? i don't think GAE
does any such thing. Currently I am using only servlets (no JSP) on all apps
and all javasrcipts (including adsense & analytics) are working fine. I gave
up using JSPs long back and I don't remember if I have ever faced any such
issue.

--~--~-~--~~~---~--~~
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: receiving mail demo

2009-10-18 Thread Prashant
how do i separate both type msg bodies ?

--~--~-~--~~~---~--~~
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: Google Analytics tracking code on GAE

2009-10-18 Thread Prashant
I am using GWT, Adsense, Analytics and YUI, all of them are working fine
with 
Servlets
.

Anyway, today i tried javascript with JSP also and it works,
http://gaeapptest.appspot.com/test.jsp .

You guys must be doing something wrong or may be your builder is not
recompiling the JSPs every time you change your code and then you feel like
GWE removed JS code ! try creating a new project and share some code next
time if problem persists.

--~--~-~--~~~---~--~~
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: receiving mail demo

2009-10-19 Thread Prashant
msg.getContent ()  should return Multipart but here in GAE it returns
ByteArrayInputStream . i tried reading Object after wrapping
ByteArrayInputStream into ObjectStream but it doesn't work this way either.

--~--~-~--~~~---~--~~
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] about values

2009-10-19 Thread Prashant
hi,

i added a new column to my data table, as it is newly added it is showing
 as column values in datastore. now i want to initialize those
 values to some value, say 0. how do i do that programmatically? i
tried using "column == null" as filter but that doesn't work.

--~--~-~--~~~---~--~~
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: Task Queue Quota

2009-10-19 Thread Prashant
 i heard 100,000 is task queue quota when billing is enabled.

--~--~-~--~~~---~--~~
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: receiving mail demo

2009-10-19 Thread Prashant
yes, every thing is working fine except that I am not able to fetch message
body in suitable format.

--~--~-~--~~~---~--~~
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: about values

2009-10-20 Thread Prashant
the only way i could find is to fetch each and every entity and check if
"column == null". i ran a cron which checks 1 entity per min so that
initialization goes smoothly without putting extra load on app.

--~--~-~--~~~---~--~~
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: Can anyone provide me an example on add/remove tag to an Entity?

2009-10-22 Thread Prashant
good question ! i'm also waiting for it's answer.

--~--~-~--~~~---~--~~
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] inbound mail encoding problem

2009-10-24 Thread Prashant
Hi,

i want to get mail sender's name so i tried *message.getFrom()[0].toString()
*(followed by trimming out email id), it generally works but for some ids i
get a weird string like *=?UTF-8?B?QvKYiGd1cyAFeGNlcHRp4pi8bg==?=* i know
this is some encoding issue but i don't know how to fix this. if anyone have
any idea please share.


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 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: inbound mail encoding problem

2009-10-25 Thread Prashant
No :( .

For email body, i am still waiting for a working solution.

--~--~-~--~~~---~--~~
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] JDO preview release : child object is still null !

2009-10-26 Thread Prashant
Hi,

I have following object child relationship. All the objects are getting
saved properly but when I try to fetch child object I am getting *null*.
This error is not because of lazy loading as I am accessing the child before
closing the PersistentManager.


 Parent Object Class ==
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Block implements Serializable {

@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
private Long block_id;

@Persistent(dependent = "true")
private BlockModule block_module;





= Child class hierarchy 
@PersistenceCapable(identityType = IdentityType.APPLICATION)
@Inheritance(customStrategy = "*complete-table*")
@Discriminator(strategy = DiscriminatorStrategy.CLASS_NAME)
public *abstract *class BlockModule extends Serializable{

@PrimaryKey
@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
protected Key key;

public *abstract *String getTitle(HttpServletRequest req);

public *abstract *String getContent(HttpServletRequest req);
}




@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class BlockTextHTML extends BlockModule{

@Persistent
private String block_title;

@Persistent
private String block_content;






I test by putting BlockTextHTML as child object of Block.

--~--~-~--~~~---~--~~
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: JDO preview release : child object is still null !

2009-10-26 Thread Prashant
Update: i test it on production server, child objects are not even getting
saved !

--~--~-~--~~~---~--~~
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: Access to "Show All Applications" from the App Engine Administration Console

2009-10-26 Thread Prashant
http://groups.google.com/group/google-appengine-java/subscribe

--~--~-~--~~~---~--~~
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: Incoming Email Service

2009-10-26 Thread Prashant
it works ! 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 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: JDO preview release : child object is still null !

2009-10-26 Thread Prashant
Thanks for your quick response !

I really need to use this kind of relationship, i am expecting it to be
supported in the upcoming version, will it be?

--~--~-~--~~~---~--~~
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: JDO preview release : child object is still null !

2009-10-26 Thread Prashant
what if i change the abstract class to a normal class? will it be
supported??

--~--~-~--~~~---~--~~
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: DeadlineExceededException not correctly thrown during a transaction

2009-10-28 Thread Prashant
facing similar problem. i tried catching the exception but it didn't work,
so the tried catching *Exception* and that didn't work either. any idea
what's going on???

--~--~-~--~~~---~--~~
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: DeadlineExceededException not correctly thrown during a transaction

2009-10-28 Thread Prashant
code snippet :



...
...
   query = pm.newQuery(Link.class);
try{
count = query.deletePersistentAll(); // getting
HardDeadlineExceededError here
}catch (Exception ex) {}
query.closeAll();
...
...

--~--~-~--~~~---~--~~
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] ResponseTooLargeException (url fetch) can't be caught ???

2009-10-29 Thread Prashant
Hi,

i am fetching a set of urls using task queues, my whole url fetch code is
between try-catch block but
*com.google.appengine.api.urlfetch.ResponseTooLargeException
*error is not getting caught by catch block, task fails every time logging
this error in log.

anyone facing similar error??

--~--~-~--~~~---~--~~
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: ResponseTooLargeException (url fetch) can't be caught ???

2009-10-30 Thread Prashant
i tried catching it on *catch(Exception e)* block, it doesn't work either.

how is it possible that an error escapes catch block. i am still confused
that it can be bug or not.

--~--~-~--~~~---~--~~
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: ResponseTooLargeException (url fetch) can't be caught ???

2009-10-30 Thread Prashant
Hi,

I rechecked it, it actually works for *catch(Exception e)* block.

--~--~-~--~~~---~--~~
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] very high error rate (88%) receiving XMPP & no error msg in the log !

2009-11-02 Thread Prashant
Hi,

I am getting very high error rate (88% of 794) while receiving XMPP msgs and
when I checked error log there were lots of entries with no error msg and
some with a warning, following are some entries from log:

   1.
  1.  11-02 07:26AM 38.117 /_ah/xmpp/message/chat/ 500 40924ms 75cpu_ms
  25api_cpu_ms 0kb
  


  0.1.0.10 - - [02/Nov/2009:07:27:19 -0800] "POST
/_ah/xmpp/message/chat/ HTTP/1.1" 500 0 - -




   1.
  1.  11-02 07:30AM 40.141 /_ah/xmpp/message/chat/ 500 10011ms 50cpu_ms
  0kb 


  0.1.0.10 - - [02/Nov/2009:07:30:50 -0800] "POST
/_ah/xmpp/message/chat/ HTTP/1.1" 500 0 - -
"emails.antshpra.appspot.com"

  2.  W 11-02 07:30AM 50.152

  Request was aborted after waiting too long to attempt to service
your request. Most likely, this indicates that you have reached your
simultaneous active request limit. This is almost always due to
excessively high latency in your app. Please see
http://code.google.com/appengine/docs/quotas.html for more details.



am I losing my msgs or system is just retrying for the same msgs failed
before? any idea???

I am sure that my app is not exceeding simultaneous request limit.

--~--~-~--~~~---~--~~
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: very high error rate (88%) receiving XMPP & no error msg in the log !

2009-11-03 Thread Prashant
anyone else facing same problem ? my app's today's error rate is 94% (of
832) !

--~--~-~--~~~---~--~~
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] all data suddenly disappeared from datastore

2009-11-04 Thread Prashant
Hi,

I had around 250,000 entities of a type, yesterday i wrote a cron to delete
them. Today, I notices that entities are not getting deleted, so, I stopped
the cron and started deleting entities manually, after deleting a number of
entities (around 50k), suddenly all the entities of all the types
disappeared !!! Where did other entities go??? Did Google vacuumed my
DataStore? Was I doing anything against ToC

--~--~-~--~~~---~--~~
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: why my app on GAE first access is so slow

2009-11-07 Thread Prashant
yes, your guess is right. if your app is inactive then app engine will
remove your app servlets from memory and reloads from datastore (or wherever
it is stored) when you access it first time.

--~--~-~--~~~---~--~~
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] java doubt : is there any way to get class instance from class' qualified name?

2009-11-07 Thread Prashant
Hi,

Suppose, I have a list of Qualified Names of a set of classes (say, in a
property or text file) and I want to call a method (pre-decided), from one
of the listed class, when required. Is there any way to do that? My
knowledge of java says NO, if you have any idea please reply.

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 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: java doubt : is there any way to get class instance from class' qualified name?

2009-11-07 Thread Prashant
got it. thanks a ton...

--~--~-~--~~~---~--~~
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] once per deployment?

2009-11-07 Thread Prashant
Hi,

I want to run a piece of code only once, every time I deploy a new version.
How do I do that?

--~--~-~--~~~---~--~~
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: java doubt : is there any way to get class instance from class' qualified name?

2009-11-08 Thread Prashant
thanks a lot...

--~--~-~--~~~---~--~~
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: once per deployment?

2009-11-09 Thread Prashant
hmm i was thinking of making use of application version, which should be
unique for each deployment, if I could find a way to get it.

--~--~-~--~~~---~--~~
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] query.deletePersistentAll() not working !

2009-11-12 Thread Prashant
Hi,

I used to delete entities using query.deletePersistentAll() but doesn't work
anymore! why?

--

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-j...@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=.




[appengine-java] Re: query.deletePersistentAll() not working !

2009-11-12 Thread Prashant
correction : earlier, even with DeadLineExceed Error
query.deletePersistentAll() used to delete entities, now, it doesn't. not
sure what happens if DeadLineExceed Error doesn't occur.

--

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-j...@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=.




Re: [appengine-java] Re: DeadlineExceededException not correctly thrown during a transaction

2009-11-12 Thread Prashant
now, the error is being thrown but entities are not getting deleted

--

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-j...@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=.




[appengine-java] JDO : setting filter ! MyList.contains(\"tag") OR MyList.doesnotcontains(\"tag")

2009-11-13 Thread Prashant
Hi,

is there any way to filter entities for not containing a tag like * !
MyList.contains(\"tag")  *OR*  MyList.doesnotcontains(\"tag")*

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 google-appengine-j...@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=.




[appengine-java] Dashboard showing wrong quota reset info...

2009-11-15 Thread Prashant
Quota is already reset but DashBoard still showing "Next reset: 1 hrs",
Googlers please check the issue

--

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-j...@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=.




Re: [appengine-java] JDO : setting filter ! MyList.contains(\"tag") OR MyList.doesnotcontains(\"tag")

2009-11-18 Thread Prashant
Thanks a lot...

--

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-j...@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=.




[appengine-java] Weird results for JOD query with List item filter (List.contains(....))

2009-11-24 Thread Prashant
Hi,

Following is a snippet of JDO class:


@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class _Contact{

@Persistent(primaryKey = "true")
private String EmailID;

@Persistent
private String Name;

@Persistent
private List Groups;



I am trying to display entities with pagination. Every thing is working fine
except for following query:


Query query = pm.newQuery(_Contact.class);
query.setOrdering("EmailID desc");
query.setRange("0,10");

String filter = "EmailID < '" + *cursor *+ "'";

if(groups != null)
   for(String group : *groups*){
filter += " && Groups.contains(\"" + group + "\")";
}

query.setFilter(filter);


For this query, some entities are not getting fetched which actually fall in
the selection criteria although it works fine for *EmailID > cursor &&
Groups.contains(group) ORDER BY EmailID asc* OR if there is no *
Groups.contains* filter.

One more thing I figured out that if I use* Groups.contains *filter
with *EmailID
> cursor*, entity *EmailID == cursor* is also being returned.


Any idea where I am wrong or is it a known bug?

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 google-appengine-j...@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: Weird results for JOD query with List item filter (List.contains(....))

2009-11-24 Thread Prashant
this is surely a bug following is my test case


PersistenceManager pm = pmf.getPersistenceManager();
Query query = pm.newQuery(_Contact.class);

query.setOrdering("EmailID");
query.setFilter("Groups.contains(\"mygroup\")");

int i = 1;
for(_Contact cont : (List<_Contact>) query.execute()){
resp.getWriter().print(i++ + " " + cont.getID() + "");
}

pm.close();


above code printed 23 contacts and when I replaced
*query.setOrdering("EmailID");
*by *query.setOrdering("EmailID desc"); *it printed 18 contacts only.

--

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-j...@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: Weird results for JOD query with List item filter (List.contains(....))

2009-11-24 Thread Prashant
Max please help me out, it is killing my app. :(

On Tue, Nov 24, 2009 at 8:45 PM, Prashant  wrote:

> this is surely a bug following is my test case
>
>
> PersistenceManager pm = pmf.getPersistenceManager();
>
> Query query = pm.newQuery(_Contact.class);
>
> query.setOrdering("EmailID");
> query.setFilter("Groups.contains(\"mygroup\")");
>
> int i = 1;
> for(_Contact cont : (List<_Contact>) query.execute()){
> resp.getWriter().print(i++ + " " + cont.getID() + "");
> }
>
> pm.close();
>
>
> above code printed 23 contacts and when I replaced  
> *query.setOrdering("EmailID");
> *by *query.setOrdering("EmailID desc"); *it printed 18 contacts only.
>

--

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-j...@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] (JDOQL) Is this a bug? (repost)

2009-11-25 Thread Prashant
following is my JDO class:

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class _Contact{

@Persistent(primaryKey = "true")
private String EmailID;

@Persistent
private String Name;

@Persistent
private List Groups;
}



following is my test case:


PersistenceManager pm = pmf.getPersistenceManager();

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

query.setOrdering("EmailID");
query.setFilter("Groups.contains(\"mygroup\")");

int i = 1;
for(_Contact cont : (List<_Contact>) query.execute()){
resp.getWriter().print(i++ + " " + cont.getID() + "");
}

pm.close();


above code printed 23 contacts and when I replaced  *
query.setOrdering("EmailID"); *by *query.setOrdering("EmailID desc"); *it
printed 18 contacts only. Is it a bug or I am missing something?

--

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-j...@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: JDO preview release : child object is still null !

2009-11-25 Thread Prashant
Is there any plan to support polymorphism in relationships? I tried it with
1.2.8 pre-release, felt disappointed seeing it is not supported yet. I was
expecting it to be supported in 1.2.8 release.

--

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-j...@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: Weird results for JOD query with List item filter (List.contains(....))

2009-11-25 Thread Prashant
no, I have tested it on Production Server and EmailID is a primary key so it
cannot be null

--

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-j...@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: Weird results for JOD query with List item filter (List.contains(....))

2009-11-25 Thread Prashant
actually, I didn't test it on dev server. app id - antshpra

--

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-j...@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: Weird results for JOD query with List item filter (List.contains(....))

2009-11-25 Thread Prashant
one more thing I want to ask, earlier I had *Group (String)* instead of *Groups
(List)* , after replacing *Group *by *Groups* my DataStore usage went 13
times of what it was earlier. of course I added more groups per contact,
take an average of 3 groups per contact. why using list makes an entity to
take 12 times more DataStore space? is it not a good practice to use list
property ?

--

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-j...@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: Weird results for JOD query with List item filter (List.contains(....))

2009-11-26 Thread Prashant
any update ? I'm desperately waiting for its solution..

--

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-j...@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 return a file from a servlet

2009-11-30 Thread Prashant
Hi,

I have a servlet with request handler */file/** . I want to return a file *
/theme/bg.gif* for all */file/*.gif *. I can check for .gif extension then
how do i send */theme/bg.gif*, for */file/*.gif* without sending a redirect
?

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 google-appengine-j...@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: How to return a file from a servlet

2009-11-30 Thread Prashant
thanks a lot guys.


is it necessary to use resp.setContentType("image/gif"); even if url end
with ".gif" ?

--

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-j...@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] (JDOQL) Is this a bug? (repost)

2009-11-30 Thread Prashant
Sorry Max, I Just changed my class design and moved all data to new one. I
guess there was some problem with indexes -
http://groups.google.com/group/google-appengine-java/browse_thread/thread/ce4ccf6fbc62d397/14bc40f42c99f100#14bc40f42c99f100

--

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-j...@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] (JDOQL) Is this a bug? (repost)

2009-11-30 Thread Prashant
And, I am using java sdk 1.2.6

--

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-j...@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] (JDOQL) Is this a bug? (repost)

2009-11-30 Thread Prashant
yeah, sure.

--

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-j...@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 Do I Use appcfg.cmd rollback

2009-11-30 Thread Prashant
appcfg.cmd rollback "C:\Documents and Settings\Darren\workspace\Sandpit\war"
-- put path between double quotes

--

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-j...@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: Delete task queue

2009-12-01 Thread Prashant
same here, app-id : antshpra & queue : default

--

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-j...@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: AppEngine needs an AppStore

2009-12-01 Thread Prashant
+1

--

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-j...@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: AppEngine needs an AppStore

2009-12-01 Thread Prashant
or I could be like, keeping app source closed and people pay for installing
app on there app id + support and all

--

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-j...@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 do i use "Admins Emailed" quota?

2009-12-01 Thread Prashant
Hi,

whosoever I send a mail it gets counted in "Recipients Emailed" quota, how
do I use "Admins Emailed" quota to send mails to admins.

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 google-appengine-j...@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: how do i use "Admins Emailed" quota?

2009-12-03 Thread Prashant
anyone???

--

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-j...@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: how do i use "Admins Emailed" quota?

2009-12-03 Thread Prashant
thanks a lot

--

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-j...@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: how do i use "Admins Emailed" quota?

2009-12-03 Thread Prashant
what if I want to send only one of the admins? there is no way, right?
does that work for XMPP also?

--

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-j...@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: how do i use "Admins Emailed" quota?

2009-12-03 Thread Prashant
no, no, I meat to say that, suppose there are 3 admins and I want to send
mail to only one admin using admin quota. this is not possible, rite?

And, does following work for XMPP?

XMPPServiceFactory.getXMPPService()
.sendMessage(
  new MessageBuilder()
.withRecipientJids(new JID(*"admins"*))
.withBody("some message")
.build());

--

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-j...@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] possible to split web.xml ?

2009-12-07 Thread Prashant
Hi,

I have some (eclipse) projects which extend a main project, in other words,
a project is sharing its source with all other projects (using junctions).
Hence, projects can use main project's source as if it belong to itself. The
advantage is that I can update main project's source in any project and it
gets updated in all apps, but not everything, if I add a new servlet I need
to manually append that servlet's mapping to each project's web.xml . Is any
way, like, I keep one web.xml for my main project and one web.xml for child
project (i.e. splitting web.xml into two files) and while in deploying
project App Engine use both web.xml files to build servlet mappings ?

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 google-appengine-j...@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] possible to split web.xml ?

2009-12-07 Thread Prashant
ok, thanks anyway.

--

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-j...@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] any header test for task queues (like "X-AppEngine-Cron: true" for crons)?

2009-12-14 Thread Prashant
Hi,

Requests from the Cron Service contains a HTTP header: X-AppEngine-Cron:
true
Is there any header added by Task Queue Service???

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 google-appengine-j...@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] any header test for task queues (like "X-AppEngine-Cron: true" for crons)?

2009-12-14 Thread Prashant
oh, thanks. i was searching it in
"Config<http://code.google.com/appengine/docs/java/config/queue.html>"
page.

On Tue, Dec 15, 2009 at 12:48 AM, Rusty Wright wrote:

> http://code.google.com/appengine/docs/java/taskqueue/overview.html
>
> Then search for the string
>
>  x-
>
> And it documents the 3 headers.
>
>
> Prashant wrote:
> > Hi,
> >
> > Requests from the Cron Service contains a HTTP header: X-AppEngine-Cron:
> > true
> > Is there any header added by Task Queue Service???
> >
> > 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
> google-appengine-j...@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-j...@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-j...@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] Custom pre-deploy or post-build step in Eclipse

2009-12-15 Thread Prashant
put a soft link in war pointing to the other build, if you are using vista,
*mklink /j link-name target-location *is the command.

--

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-j...@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: Introducing App Engine SDK 1.3.0

2009-12-15 Thread Prashant
+1, please do that.

--

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-j...@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] Federated Login Help

2010-06-12 Thread Prashant
Hi,

Docs says "If your app uses OpenID and the user must sign in, your app will
be redirected to the URL /_ah/login_required ." but it doesn't seem to be
redirected to /_ah/login_required. I have enabled Federated Login and I have
mapped the url too.

Please help me to find out where I am wrong.

Thanks,
Prashant

-- 
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-j...@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] Please help me with mapping

2010-06-12 Thread Prashant
you can keep a separate status class, which will store only one update per
class. Every time user updates her status, create a new update class and
persist it

Update {
private long userid;
private string status;
}

when you need to display update just fetch all update entities where userid
== User's id.

On 13 June 2010 11:44, nischalshetty  wrote:

> Hi All,
>
> I need to clear a few doubts. Let's take an example so that you know
> what my doubt is :
>
> I have a User object and each user performs an operation - say a
> status update.
>
> User {
>
> private Long id;
>
> private List updates;
>
> }
>
>
> Now this seems all good but if I'm not wrong Appengine has no
> provision for lazy loading. Now my problem is, when a users
> StatusUpdate reaches say 100k or more, the List in the above case
> would have so many objects in it which I obviously do not need.
>
> What solution is better? Make StatusUpdate as an unowned class and
> keeping a reference to User? Any thoughts, I hope I am clear with my
> requirement.
>
> -Nischal
>
> --
> 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-j...@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-j...@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: Please help me with mapping

2010-06-12 Thread Prashant
I am not sure, it depends on what you want to implement.

Anyway, storing 10k updates in a single entity will definitely exceed 1mb
limit. Moreover, you wouldn't be needing all the updates at a time, it will
be very inefficient implementation if you fetch all updates when you just
need a few (say 10 or 20).

Putting updates in a separate class will help you to implement efficient
pagination. It will be easy to add and delete an updates.

On 13 June 2010 11:54, nischalshetty  wrote:

> Thank you Prashant. I guess that's the second option of disowned
> entities that you are talking about. Is that the best way to do this?
>
> -N
>
> On Jun 13, 11:20 am, Prashant  wrote:
> > you can keep a separate status class, which will store only one update
> per
> > class. Every time user updates her status, create a new update class and
> > persist it
> >
> > Update {
> > private long userid;
> > private string status;
> >
> > }
> >
> > when you need to display update just fetch all update entities where
> userid
> > == User's id.
> >
> > On 13 June 2010 11:44, nischalshetty  wrote:
> >
> >
> >
> > > Hi All,
> >
> > > I need to clear a few doubts. Let's take an example so that you know
> > > what my doubt is :
> >
> > > I have a User object and each user performs an operation - say a
> > > status update.
> >
> > > User {
> >
> > > private Long id;
> >
> > > private List updates;
> >
> > > }
> >
> > > Now this seems all good but if I'm not wrong Appengine has no
> > > provision for lazy loading. Now my problem is, when a users
> > > StatusUpdate reaches say 100k or more, the List in the above case
> > > would have so many objects in it which I obviously do not need.
> >
> > > What solution is better? Make StatusUpdate as an unowned class and
> > > keeping a reference to User? Any thoughts, I hope I am clear with my
> > > requirement.
> >
> > > -Nischal
> >
> > > --
> > > 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-j...@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > google-appengine-java+unsubscr...@googlegroups.com 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-j...@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-j...@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] Problem persist JDO- one to many

2010-07-11 Thread Prashant
before returning b (Torneo), if you are closing PersistentManger you must
detach b including all of its collections of child entities.


-- 
Prashant
www.claymus.com

-- 
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-j...@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: Problem persist JDO- one to many

2010-07-11 Thread Prashant
you need to create a new method in Torneo which will detach collections
field. Now you just need to call this function with PersistenceManager as
argument.

public Torneo devolverTorneo(Long idTorneo) {

 Torneo b = pm.getObjectById(Torneo.class, idTorneo);

   b.detachFields(pm);
   b=pm.detachCopy(b);
   pm.close();

 return b;
 //The method return the object for update

}


public class Torneo implements Serializable{


public void detachFields(PersistenceManager pm) {

 pm.detachCopyAll(equiposTorneo);

}


}

-- 
Prashant
www.claymus.com

-- 
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-j...@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: Problem persist JDO- one to many

2010-07-12 Thread Prashant
Yes, it worked without explicitly detaching fields with just  defaultFetchGroup
set to "true".

btw,
mappedBy property is required only for bi-directional mapping.

-- 
Prashant
www.claymus.com

-- 
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-j...@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] Deleted all the data, but Storable Data summary still shows 72%

2010-07-13 Thread Prashant
wait for some time. it takes little time to update.

-- 
Prashant
www.claymus.com

-- 
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-j...@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] Updating multiple entities (in different entity groups) with transaction

2010-09-24 Thread Prashant
Hi,

I want to update 2 different entities of same type but in different entity
groups with transaction
i.e. either both entities should get updated or none.

Can we make 2 transaction instances (tx), one for each entity, update each
entity separately, if one transaction fails, rollback the other one ?


-- 
Prashant
www.claymus.com

-- 
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-j...@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] what if tx.commit() fails ?

2010-09-24 Thread Prashant
Hi,

I have a small doubt with transactions.

Suppose I am trying to update an entity using transaction and before I
commit my transaction, someone else updates the entity. Now what will happen
? Any exception will be thrown on tx.commit() call ?

-- 
Prashant
www.claymus.com

-- 
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-j...@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.



  1   2   >