Re: [appengine-java] Re: After how much time of no traffic does GAE shut-down the instance

2010-01-11 Thread
my GAE app too shutdown every tow minutes when no request!
so when my app init that is terrible, because spring init need 15s!
so my answer is:
create a cron:every one minutes to run once,It's work very good!(every tow
minutes don't keep my app online, It's still shutdown!)
-- 

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] Eclipse plugin failure after log4j added to the classpath (WEB-INF/lib)

2010-01-11 Thread
*Check your Java Build Path of GAE App!*
notice that:add your log4j lib into your app build path

2010/1/11 杨浩 

> I have the slf4j + log4j in my GAE app, it's work fine!
> war/WEB-INF/lib/slf4j-log4j12-1.5.10.jar
> war/WEB-INF/lib/log4j-1.2.15.jar
> you can try version 1.2.15 of log4j!
> ^ ^
>
-- 

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] Eclipse plugin failure after log4j added to the classpath (WEB-INF/lib)

2010-01-11 Thread
I have the slf4j + log4j in my GAE app, it's work fine!
war/WEB-INF/lib/slf4j-log4j12-1.5.10.jar
war/WEB-INF/lib/log4j-1.2.15.jar
you can try version 1.2.15 of log4j!
^ ^
-- 

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: Task Queue problems

2010-01-12 Thread
在中国appspot的https无法正常工作,因为gfw屏蔽了这部分,你寻找一个https代理,然后再测试应该就没有问题了!
-- 

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: App instance recycling and response times - is there solution?

2010-01-12 Thread
create a cron:every one minutes to run for keep your app online in the GAE!
I try it,and it is work very good!
-- 

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: App instance recycling and response times - is there solution?

2010-01-14 Thread
治本只能等GAE的升级了,这样确实只能保证你的应用不会因为两分钟没有请求被关闭!
不知道GAE收费版本是不是没有这个问题

2010/1/13 yjun hu 

> 治标不治本
>
> On Wed, Jan 13, 2010 at 1:24 PM, 杨浩  wrote:
>
>> create a cron:every one minutes to run for keep your app online in the
>> GAE!
>> I try it,and it is work very good!
>>
>>
> --
> dream or truth
>
>
-- 

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: Task Queue problems

2010-01-14 Thread
代理 支持ssl:
proxy.kerkgroep-hopjestad.com 3128
jwe219.internetdsl.tpnet.pl 3128
webmail.mwit.ac.th 80

我一般用第一个,他不是很稳定!

2010/1/13 yjun hu 

> which proxy are u using now?
>
> 2010/1/12 杨浩 
>
>> 在中国appspot的https无法正常工作,因为gfw屏蔽了这部分,你寻找一个https代理,然后再测试应该就没有问题了!
>>
>
>
>
> --
> dream or truth
>
>
-- 

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: After how much time of no traffic does GAE shut-down the instance

2010-01-14 Thread
the other talk about your
problem!<https://groups.google.com/group/google-appengine-java/msg/2c425aa60b091f5d?dmode=print>
GROUPS Title:
 App instance recycling and response times - is there solution?
<https://groups.google.com/group/google-appengine-java/browse_thread/thread/bd5110b72b852e15/9f751301a9fb943c?q=App+instance+recycling+and+response+times+-+is+there+solution#9f751301a9fb943c>
2010/1/15 Ikai L (Google) 

> Hey everybody,
>
> 2 minutes is EXTREMELY aggressive. If you have evidence that your app is
> being cycled out this quickly, can you let us know your app ID? There may be
> something going on with your application. Our numbers indicate that even if
> you are getting a minute amount of traffic, you shouldn't not be cycled out.
>
> In general we discourage using cron to ping your application. Cold startup
> time is a very high priority for us.
>
> 2010/1/10 杨浩 
>
>> my GAE app too shutdown every tow minutes when no request!
>> so when my app init that is terrible, because spring init need 15s!
>> so my answer is:
>> create a cron:every one minutes to run once,It's work very good!(every tow
>> minutes don't keep my app online, It's still shutdown!)
>>
>
> --
> Ikai Lan
> Developer Programs Engineer, Google 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-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: the inappropriate encoding occured when store chinese characters to datastore

2010-01-20 Thread
In developer server:_ah/admin watch the datastore viewer is not encode
utf8,so see ???
but in GAE server it's good!
-- 

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] java.security.AccessControlException: access denied java.net.NetPermission specifyStreamHandler

2010-01-30 Thread
It's not enough information!
Show the full stack trace,please!

2010/1/30 Andreas Blomqvist 

> Hi all
>
> I get this error:
>
> *java.security.AccessControlException: access denied
> java.net.NetPermission specifyStreamHandler*
>
>  when trying to connect to my GAE server. Anyone know how to grant
> permissions in GAE?
>
> 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] AppCfg error

2010-01-30 Thread
check your gae settings in the ant build file!
Good luck!
This is my gae set:

#GAE setting
gae.sdk.dir=/prog/eclipse/gae/eclipse/plugins/com.google.appengine.eclipse.sdkbundle.1.3.0_1.3.0.v200912141120/appengine-java-sdk-1.3.0












2010/1/30 Andreas Blomqvist 

> Hi
>
> I get this error when I try and deply to GAE.
>
> usage: dirname path
> Exception in thread "main" java.lang.NoClassDefFoundError:
> com/google/appengine/tools/admin/AppCfg
> Caused by: java.lang.ClassNotFoundException:
> com.google.appengine.tools.admin.AppCfg
> at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:315)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:330)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:398)
>
> Just installed the 1.3 SDK, and then this error began. Any thoughts?
>

-- 
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] AppCfg error

2010-01-30 Thread
after gae set,this is a e.x:


开始更新GAE...



-- 
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] java.security.AccessControlException: access denied java.net.NetPermission specifyStreamHandler

2010-01-30 Thread
tware.htmlunit.WebClient.(WebClient.java:161)
>  [java] ... 29 more
>  [java] Jan 30, 2010 11:38:45 AM
> com.google.apphosting.utils.jetty.JettyLogger warn
>  [java] WARNING: Nested in java.lang.ExceptionInInitializerError:
>  [java] java.security.AccessControlException: access denied
> (java.net.NetPermission specifyStreamHandler)
>  [java] at
> java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)
>  [java] at
> java.security.AccessController.checkPermission(AccessController.java:546)
>  [java] at
> java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
>  [java] at
> com.google.appengine.tools.development.DevAppServerFactory$CustomSecurityManager.checkPermission(DevAppServerFactory.java:151)
>  [java] at java.net.URL.checkSpecifyHandler(URL.java:629)
>  [java] at java.net.URL.(URL.java:501)
>  [java] at
> com.gargoylesoftware.htmlunit.util.UrlUtils.toUrlUnsafe(UrlUtils.java:91)
>  [java] at
> com.gargoylesoftware.htmlunit.util.UrlUtils.toUrlSafe(UrlUtils.java:62)
>  [java] at
> com.gargoylesoftware.htmlunit.WebClient.(WebClient.java:161)
>  [java] at
> com.onecoder.fs.FSServlet.processRequest(FSServlet.java:93)
>  [java] at com.onecoder.fs.FSServlet.doGet(FSServlet.java:257)
>  [java] at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:693)
>  [java] at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
>  [java] at
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
>  [java] at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)
>  [java] at
> com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:51)
>  [java] at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
>  [java] at
> com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
>  [java] at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
>  [java] at
> com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:121)
>  [java] at
> org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
>  [java] at
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
>  [java] at
> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
>  [java] at
> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
>  [java] at
> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
>  [java] at
> org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
>  [java] at
> com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:70)
>  [java] at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
>  [java] at
> com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:352)
>  [java] at
> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
>  [java] at org.mortbay.jetty.Server.handle(Server.java:313)
>  [java] at
> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
>  [java] at
> org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:830)
>  [java] at
> org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
>  [java] at
> org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
>  [java] at
> org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
>  [java] at
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:396)
>  [java] at
> org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
>
> On 30 January 2010 12:40, 杨浩  wrote:
>
>> It's not enough information!
>> Show the full stack trace,please!
>>
>> 2010/1/30 Andreas Blomqvist 
>>
>> Hi all
>>>
>>> I get this error:
>>>
>>> *java.security.AccessControlException: access denied
>>> java.net.NetPermission specifyStreamHandler*
>>>
>>>  when trying to connect to my GAE server. Anyone know how to grant
>>> permissions in GAE?
>>&

Re: [appengine-java] Log4j in production GAE

2010-02-01 Thread
I use slf4j!
use slf4j-log4j when development!
use slf4j-jdk log when GAE Server!(change slf4j-log4j to slf4j-jdk-log
before GAE appcfg update war)


2010/2/2 Alex 

> Hello,
>
> Has anyone tried to use Log4j in production GAE? Is it supported?
>
> According to Java GAE docs, only java.util.logging is fully supported.
> See http://code.google.com/appengine/docs/java/runtime.html#Logging
>
> [...]
>  Any logging framework (such as log4j) that logs to the output or
> error streams will work. However, for more fine-grained control of the
> Admin Console's log level display, the logging framework must use a
> java.util.logging adapter.
> [...]
>
> On the other hand, I see that log4j.properties is included into every
> project created by GAE Eclipse plugin.
>
> I tried Log4j in a test application and Lo4j is working fine in
> development environment. But it doesn't (just does nothing) when I
> deploy my test application into live GAE server.
>
> Thanks in advance for any info,
> Alex
>

-- 
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: Google Plugin for Eclipse 1.3 plans

2010-02-06 Thread
Where's the lastest plugin update sites for GAE Plugin?
I will to test it!

2010/2/6 Philippe Marschall 

> Sounds like a good start. Ideally the maven eclipse plugin [1] could
> be configured to automatically generate the configuration for the
> Google Plugin and M2Eclipse [2] picking that up as well. Also an
> archetype would help quick starting. I assume you're aware that you
> get the most benefit out of that only when there are up to date Maven
> artifacts wit good metadata in a publicly available repo, preferably
> Maven central.
>
>  [1] http://maven.apache.org/eclipse-plugin.html
>  [2] http://m2eclipse.sonatype.org/
>
> Cheers
> Philippe
>

-- 
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] Error; Transaction is not active.

2010-02-09 Thread
First it 's work ok!
but after tx.commit() the transaction is complete,so you must call
tx.begin() to start a transaction before tx.commit()!

Or invoke the tx.commit out of the while block!

I'm sorray for my English!

2010/2/10 Acerezo 

>
> Hello all, I can´t delete records of a table
>
> I'm using this code:
>
>  PersistenceManager pm =
> PersistenceManagerHelper.getPersistenceManager();
>
> Transaction tx = pm.currentTransaction();
> tx.begin();
> Extent ex = pm.getExtent(Robot.class, true);
> Iterator iter = ex.iterator();
> while (iter.hasNext())
> {
> Robot obj = (Robot)iter.next();
> pm.deletePersistent(obj);
> tx.commit();
> }
>
> And always delete only two records after I get this message in the
> log:
>
> Transaction is not active. You either need to define a transaction
> around this, or run your PersistenceManagerFactory with
> 'NontransactionalRead' and 'NontransactionalWrite' set to 'true'
>
>
> Anyone can help me, please?
>
> 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] Error; Transaction is not active.

2010-02-09 Thread
Yes!

2010/2/10 Andrés Cerezo 

> I don´t understand very well I think you are telling me:
>
> Transaction tx = pm.currentTransaction();
> // tx.begin(); old
> Extent ex = pm.getExtent(Robot.class, true);
> Iterator iter = ex.iterator();
> while (iter.hasNext())
> {
> tx.begin(); // new
> Robot obj = (Robot)iter.next();
> pm.deletePersistent(obj);
> tx.commit();
> }
>
> isn´t?
>
> 2010/2/10 杨浩 :
> > First it 's work ok!
> > but after tx.commit() the transaction is complete,so you must call
> > tx.begin() to start a transaction before tx.commit()!
> >
> > Or invoke the tx.commit out of the while block!
> >
> > I'm sorray for my English!
> >
> > 2010/2/10 Acerezo 
> >>
> >> Hello all, I can´t delete records of a table
> >>
> >> I'm using this code:
> >>
> >>  PersistenceManager pm =
> >> PersistenceManagerHelper.getPersistenceManager();
> >>
> >> Transaction tx = pm.currentTransaction();
> >> tx.begin();
> >> Extent ex = pm.getExtent(Robot.class, true);
> >> Iterator iter = ex.iterator();
> >> while (iter.hasNext())
> >> {
> >> Robot obj = (Robot)iter.next();
> >> pm.deletePersistent(obj);
> >> tx.commit();
> >> }
> >>
> >> And always delete only two records after I get this message in the
> >> log:
> >>
> >> Transaction is not active. You either need to define a transaction
> >> around this, or run your PersistenceManagerFactory with
> >> 'NontransactionalRead' and 'NontransactionalWrite' set to 'true'
> >>
> >>
> >> Anyone can help me, please?
> >>
> >> 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] How to clear logs?

2010-02-09 Thread
Now,there is not found the document about the logs!
Thanks Andrés Cerezo!
My solustion:
deploy another version as the default, and del the old version!
so the logs may be clear all!

2010/2/10 Andrés Cerezo 

> I've the same problem that you and looking in the documentation of
> google, I read that the logs can't be 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=en.



Re: [appengine-java] How to use junit test in the newest SDK1.3.1

2010-02-11 Thread
Thanks for your help! ^ ^

It's OK!

Where's the download of the  appengine-testing.jar sources?
It's a security?

Thanks!


在 2010年2月11日 上午8:25,Ikai L (Google) 写道:

> We've got a more simple interface for you now. Take a look:
>
> http://code.google.com/appengine/docs/java/tools/localunittesting.html
>
> 2010/2/10 时空之蕊 
>
> I found the class
>> com.google.appengine.tools.development.ApiProxyLocalImpl is not
>> public,but before 1.3.1 it's public!
>> In the JUnit document:
>>
>> import java.io.File;
>> import com.google.appengine.tools.development.ApiProxyLocalImpl;
>> import com.google.apphosting.api.ApiProxy;
>>
>> ApiProxy.setDelegate(new ApiProxyLocalImpl(new File(".")){});
>>
>> So I can't new a ApiProxyLocalImpl instance!
>> Any body know how to use JUnit?
>> 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] How to use junit test in the newest SDK1.3.1

2010-02-11 Thread
Hello Ikai L(Google)!
Thank you!

In the demo:
http://code.google.com/appengine/docs/java/tools/localunittesting.html

I have a idea about the JUnit4 testcase!

defined a Basic TestCase:

public class *GAETestCase* {
protected final LocalServiceTestHelper gaeHelper = new
LocalServiceTestHelper(new LocalDatastoreServiceTestConfig());
@Before
public *final* void *setUpForGAEEvn*() throws Exception {
gaeHelper.setUp();
}

@After
public *final* void *tearDownForGAEEvn*() throws Exception {
gaeHelper.tearDown();
}
}

public class OtherTestCase extends *GAETestCase* {
……
@Test
public void myTest() {
……
}
}

the another testcase OtherTestCase extends GAETestCase,
so It's will never forget invoke the *LocalServiceTestHelper.setUp* and *
LocalServiceTestHelper.tearDown* method!
(Krishna Caldas  forgot to invoke *
LocalServiceTestHelper.setUp and **LocalServiceTestHelper.tearDown*,others
may be will forget invoke it!)



在 2010年2月11日 上午8:25,Ikai L (Google) 写道:

> We've got a more simple interface for you now. Take a look:
>
> http://code.google.com/appengine/docs/java/tools/localunittesting.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-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] AppCfg error

2010-02-16 Thread
you can see:Using Apache
Ant<http://code.google.com/appengine/docs/java/tools/ant.html>


在 2010年2月16日 上午5:40,Andreas Blomqvist 写道:

> Hi
>
> Still has this problem. Using Netbeans 6.8 on SnowLeopard 10.6 (OSX)
> What build file are you refering to? The build-impl.xml or the
> ant-deploy.xml ?
>
> Thanks
>
>
> 2010/1/30 杨浩 
>
>> after gae set,this is a e.x:
>>
>> 
>> 开始更新GAE...
>> 
>> 
>>
>

-- 
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 to delete all entities of a kind with the datastore viewer

2010-03-11 Thread
in the admin console:clike the next 20 entity,then change the brower's
location.href set *size=200* and *offset=0*, enter^ ^
The offset's max is *1000*
Good luck!

2010/3/12 Spines 

> I'm only able to delete 20 entities at a time,  I have over 500
> entities of a certain kind. Is there a  way I can delete them all from
> the admin console?
>

-- 
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 delete all entities of a kind with the datastore viewer

2010-03-13 Thread
*In my store,have more than 100,000 entities here,but i find delete(limit
400) it's cost > 26s*
my datas is wrong so i must delete all entities of the kind(no index in the
kind)!

*1. first i use:*
Query q = pm.newQuery(query);
   q.setRange(0, 400);
int count = 0;
   try {
   resultList = (List) q.execute();
   for (T t : resultList) {
   pm.deletePersistent(t);
   count++;
   }
   return count;
   } finally {
   q.closeAll();
   }
I found that:every time it's delete only few entity(<100)!(I watch 200
entities of the kind with GAE Datastore Viewer)

*2 second i use:*

UtilGAE.howTimer(true),return how time cost with a threadlocal var store a
start millionseconds,arg is a flag(true if cost time>26second throw a
IllegalStateException("it's cost more than limit 26s");

DatastoreService ds = DatastoreServiceFactory.getDatastoreService();
Query query = new
Query(Section.class.getSimpleName()).setKeysOnly();
int count = 0;
try {
Iterable iter =
ds.prepare(query).asIterable(FetchOptions.Builder.withLimit(400));
logger.info("query cost time:{}s",
UtilGAE.howTimer(true)/1000d);
for (Entity entity : iter) {
Key key = entity.getKey();
ds.delete(entity.getKey());
count++;
UtilGAE.howTimer(true);
}
if (count != 0) throw new IllegalStateException("next continue
to delete...");
} finally {
logger.info("delete:{},cost time:{}s", count,
UtilGAE.howTimer()/1000d);
}
so it's work fine(it's real delete entity from my store) and a most of cost
time in the 26s!

I say there have most of limited in the GAE Stored!you must to be carefull
when you have a larger datastore!

2010/3/12 Toby 

> Hello,
>
> deleting 500 should not take a lot of time. Did you try the
> deletePersistentAll method?
>Query q = pm.newQuery(persistentClass);
>q.deletePersistentAll();
>
> otherwise what I do is using the task queue. I delete 1000 entities
> and then put a task in the queue to delete another 1000. In that case
> you can not use the deletePersistentAll. You need to query by object
> type and limit:
>
>Query q = pm.newQuery(query);
>q.setRange(0, size);
>
>try {
>resultList = (List) q.execute();
>resultSize = resultList.size();
>for (T t : resultList) {
>pm.deletePersistent(t);
>}
>return resultSize;
>} finally {
>q.closeAll();
>}
>
> since I return the size I see how much records where affected. If it
> is less than 1000 I know that I can stop doing the queuing.
> This is a bit difficult to set up but works fine. I believe there is
> not better way to do that but I am happy about any other suggestions.
>
> Cheers,
> Toby
>

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