Grails on GAE/J

1,325 views

Published on

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,325
On SlideShare
0
From Embeds
0
Number of Embeds
15
Actions
Shares
0
Downloads
8
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Grails on GAE/J

  1. 1. import javax.cache.* class BootStrap { def init = { def manager = CacheManager.getInstance() def cache = manager.cacheFactory.createCache([:]) def value = ... // from datastore cache.put('key', value) manager.registerCache('mycache', cache) } } ※ Cron Job
  2. 2. import javax.cache.* class CacheController { def index = { def manager = CacheManager.getInstance() manager.getCache('mycache').get('key') } }
  3. 3. ≪grails-app/spring/resources.groovy≫ beans = { cacheManager(javax.cache.CacheManager) { it.factroyMethod = 'getInstance' } } ≪Controller≫ class SampleController { def cacheManager def someMethod = { def cache = cacheManager.getCache(‘mycache’) } }
  4. 4. http://code.google.com/appengine/docs/quotas.html#Memcache
  5. 5. class URLFetchController { def fetch = { new URL(‘http://...’).text } }
  6. 6. http://code.google.com/appengine/docs/java/urlfetch/overview.html#Quotas_and_Limits
  7. 7. http://code.google.com/appengine/docs/quotas.html#UrlFetch
  8. 8. From To/Cc/Bcc ReplyTo
  9. 9. http://code.google.com/intl/ja/appengine/docs/java/mail/overview.html#Quotas_and_Limits
  10. 10. http://code.google.com/appengine/docs/quotas.html#Mail
  11. 11. ≪grails-app/Config.groovy≫ google.appengine.sessionEnabled = true // default true google.appengine.enableSsl = true // default true google.appengine.security.useHttps = ["/secure"] google.appengine.security.requireAdmin = ["/admin", "notsecure"] google.appengine.security.requireLogin = ["/admin", "/"]
  12. 12. local GAE
  13. 13. import def loginUser = UserServiceFactory.userService.currentUser

×