[appengine-java] overcome onetomany limitation of 5000

2011-05-12 Thread lp
hi all
i am modelling a unowned one-to-many relationship using list properties. 

@Entity
public class User{

String name;

Boolean loggedIn;

@Basic
private ListKey friends;
}

all is good. i can run queries like 

query = Select p from PositionUser p where p.friends = :userKey and  +
AND p.loggedIn = true  

However there is a limit on the number of index available per entity of 
5000. (although i am hitting the limit at 2500 for some reason)

 i have 2 problems with the current approach

#1. below the 5000 limit each addition to the friend list will require a 
fetch of the entire list, then add item and then put to datastore.
this is rather expensive in CPU.

#2. How can i allow for 5000 in the onetomany?

any suggestion pls

-lp

-- 
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] Servlet Filter is receiving a null chain parameter from time to time

2011-05-12 Thread Stream18
Hi,

I wonder if somebody else has seen this error before. My application has a 
Servlet Filter (that sets Namespace) for all urls, and, from time to time, 
the Filter receives a null as value for chain parameter from the platform, 
so I get a NullPointerException as I try to follow the chain with 
chain.doFilter(req, resp).
I have seen this specially when accessing an RPC method.

Thanks,

Eduardo G.

-- 
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] Concurrent modification results in Entity being deleted

2011-05-12 Thread mscwd01
Hey

I have an Entity which contains a ListEntity property that stores
child entities. I have found a bug in my app where during concurrent
modification of child entities all of the children in the parent
entities list will be deleted.

Firstly, why does this happen? Surely it'd be better to throw an
exception rather than delete all child entities in the list?
Secondly, what is the solution to prevent concurrent modification of
entities? I understand normal Java synchronization/locking wont work
on 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-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] Should JDO use be synchronized in threadsafe=true application?

2011-05-12 Thread Juha K
I've been running an application successfully for some time on the app 
engine. During last week I've couple of times tried enabling threadsafe in 
my app. It seems to randomly cause issues with retrieving or storing data 
with JDO. What I see when I start to get these issues is this (I've replaced 
my apps class names with ---):
java.lang.UnsupportedOperationException
at 
org.datanucleus.store.appengine.EntityUtils.getPropertyName(EntityUtils.java:62)
at 
org.datanucleus.store.appengine.DatastoreFieldManager.storeObjectField(DatastoreFieldManager.java:839)
at 
org.datanucleus.store.appengine.DatastoreFieldManager.storeStringField(DatastoreFieldManager.java:474)
at 
org.datanucleus.state.AbstractStateManager.providedStringField(AbstractStateManager.java:1023)
at ---.jdoProvideField(VAJDO.java)
at ---.jdoProvideFields(VAJDO.java)
at 
org.datanucleus.state.JDOStateManagerImpl.provideFields(JDOStateManagerImpl.java:2715)
at 
org.datanucleus.store.appengine.DatastorePersistenceHandler.insertPreProcess(DatastorePersistenceHandler.java:341)
at 
org.datanucleus.store.appengine.DatastorePersistenceHandler.insertObjects(DatastorePersistenceHandler.java:251)
at 
org.datanucleus.store.appengine.DatastorePersistenceHandler.insertObject(DatastorePersistenceHandler.java:240)
at 
org.datanucleus.state.JDOStateManagerImpl.internalMakePersistent(JDOStateManagerImpl.java:3185)
at 
org.datanucleus.state.JDOStateManagerImpl.makePersistent(JDOStateManagerImpl.java:3161)
at 
org.datanucleus.ObjectManagerImpl.persistObjectInternal(ObjectManagerImpl.java:1298)
at 
org.datanucleus.ObjectManagerImpl.persistObject(ObjectManagerImpl.java:1175)
at 
org.datanucleus.jdo.JDOPersistenceManager.jdoMakePersistent(JDOPersistenceManager.java:669)
at 
org.datanucleus.jdo.JDOPersistenceManager.makePersistent(JDOPersistenceManager.java:694)

I've seen the same exception also when calling 
PersistenceManager.getObjectById(). The call to these methods comes directly 
from servlet requests.

The error doesn't always happen, sometimes (especially for writes) when it 
starts to happen, it seems to happen to all writes. I've set threadsafe to 
false in my appengine-web.xml and the error goes away. But especially now 
knowing the upcoming change in the pricing, I'd like to be able to run my 
app multithreaded. My question is that is this a bug in the app engine, or 
should I be synchronizing JDO use in my app in order to run it with 
threadsafe=true?  


-- 
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] Unable to upload more than 1 Mb file in Google App engine 1.5

2011-05-12 Thread aptest1 actiprocess
Hi,
When i try to upload more than 1 MB (Around 2 Mb) i get an  error 

com.google.apphosting.api.ApiProxy$RequestTooLargeException: The request to 
API call urlfetch.Fetch() was too large.
at 
com.google.appengine.tools.development.ApiProxyLocalImpl$AsyncApiCall.callInternal(ApiProxyLocalImpl.java:439)

But in 1.5 release they stated that request URL fetch is increased to 32 MB

http://googleappengine.blogspot.com/2011/05/app-engine-150-release.html

Thanks
Mahesh.B

-- 
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: HTTP request and response sizes have been increased to 32 MB.... NOT

2011-05-12 Thread aptest1 actiprocess
Yes, we are also getting same problem.

We are updated latest Google app engine 1.5, then if we try to upload the 
file more than 1 MB Its throwing the following exception.

com.google.apphosting.api.ApiProxy$RequestTooLargeException: The request to 
API call urlfetch.Fetch() was too large.
at 
com.google.appengine.tools.development.ApiProxyLocalImpl$AsyncApiCall.callInternal(ApiProxyLocalImpl.java:439)
at 
com.google.appengine.tools.development.ApiProxyLocalImpl$AsyncApiCall.call(ApiProxyLocalImpl.java:412)
at 
com.google.appengine.tools.development.ApiProxyLocalImpl$AsyncApiCall.call(ApiProxyLocalImpl.java:391)

Please help us, whether Request size is increased to 32 MB or not ?

Thanks
Chandrashaker Gattu

-- 
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] Scripting disabled? Does not work after SDK-update to 1.5

2011-05-12 Thread Stefan Krecher
Hi,
creating a ScriptEngine in a servlet like this:
ScriptEngineManager factory = new ScriptEngineManager();
ScriptEngine engine = factory.getEngineByExtension(js);

(or using the String JavaScript instead of js)
does not work, engine is null.

doing: logger.warning(num engines= + factory.getEngineFactories().size());
displays: 0

This worked yesterday, still works in development mode (on jetty) but does 
not work when i deploy to app engine.
Any explanation? Do i need to configure the usage of scripting somehow?
Thanks,
Stefan Krecher

-- 
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] Backends Javadoc Reference not uploaded

2011-05-12 Thread blue
Hey google team, the backends javadoc reference hasn't been uploaded to the 
app engine docs area.  I just read it locally so it's not a big deal but 
thought you should know.

-- 
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] Backends Thread.sleep()? or similar?

2011-05-12 Thread blue
When running a backend, what is the suggested method for something like 
this:

while(true){
  doSomething();
  Thread.sleep(1000);
}

Do you have any tricks to replicate this behavior?


-- 
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] Will movement out of preview status give free access to SQL

2011-05-12 Thread powell...@gmail.com
The latest app engine announcement that most App Engine for Business 
functionality would be rolled in to App Engine. Does this mean that all 
current developers will have access to the SQL data store or will this just 
be for paying customers? If yes then will the access be through JPA or JDBC?

Dave

-- 
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] Backends.xml ERROR when deploying

2011-05-12 Thread JakeP
I want to try using backends with java, so I created this xml spec -
which I copied from the appengine docs and added my own name:

backends
  backend
namemother/name
classb4/class
instances1/instances
  /backend
/backends


I always results in this:

An internal error occurred during: Deploying xxx to Google.
XML error validating /xxx/xxx/xxx/xxx/xxx/xxx/war/WEB-INF/backends.xml
against /Applications/eclipse3.6/plugins/
com.google.appengine.eclipse.sdkbundle_1.5.0.r36v201105092302/
appengine-java-sdk-1.5.0/docs/backends.xsd

I also tried backends.yaml, but nothing shows up in the management
console.

any suggetions?

Considering that there are no javadocs for backends yet in the docs,
this feature seems like it might not be ready for java.

-- 
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] imagesService.applyTransform cannot transform some PNG ? Why ?

2011-05-12 Thread Teng Shiu Huang
I am evaluating imagesService.applyTransform() to transform images(from URL) 
to specific width/height.
It's documented that PNG is supported. But it seems it doesn't understand 
some PNG file.
for example :
http://destinyfab.appspot.com/resizer/resize?url=http://www.google.com.tw/intl/en_com/images/srpr/logo1w.pngw=500h=500
It works well , and can transform google's logo to 500x500.

BUT , this PNG :
http://destinyfab.appspot.com/resizer/resize?url=http://upload.wikimedia.org/wikipedia/commons/a/ac/Fairytale_firefox.pngw=500h=500


An error occurred , with this stacktrace :

Caused by: java.lang.IllegalArgumentException: Unknown
at 
com.google.appengine.api.images.ImagesServiceImpl.convertApplicationException(ImagesServiceImpl.java:306)
at 
com.google.appengine.api.images.ImagesServiceImpl.applyTransform(ImagesServiceImpl.java:73)
at 
com.google.appengine.api.images.ImagesServiceImpl.applyTransform(ImagesServiceImpl.java:50)
at 
com.google.appengine.api.images.ImagesServiceImpl.applyTransform(ImagesServiceImpl.java:39)
at controllers.Resizer.resize(Resizer.java:72)


I tried some PNGs , and many transparent PNG cannot be transformed . Is this 
GAE's limitation ?

The code is very simple , just grab the url's content , transform to byte[].


byte[] imageBytes = baos.toByteArray();
Logger.info(imageBytes.length = %s  , imageBytes.length);

ImagesService imagesService = ImagesServiceFactory.getImagesService();

Image oldImage = ImagesServiceFactory.makeImage(imageBytes);
Transform transform = ImagesServiceFactory.makeResize(w, h);
Image newImage = imagesService.applyTransform(transform, oldImage); 
//error occurs 
byte[] newImageData = newImage.getImageData();


-- 
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 remote api be used inside a GAE java app.

2011-05-12 Thread Ole Spielberg
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-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 remote api be used inside a GAE java app.

2011-05-12 Thread Didier Durand
Hi,

Don't know if what you do is possible but why don't you just obtain
the data that you need from the other application via simple requests
to servlets delivering the needed data.

By using Java standard object serialization, you can achieve what you
need whatever the object class via a unique and single servlet.

This way you stick to gae normal practices at minimum effort.

regards

didier

On May 12, 8:30 pm, Ole Spielberg ole.spielb...@gmail.com wrote:
 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-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: imagesService.applyTransform cannot transform some PNG ? Why ?

2011-05-12 Thread Didier Durand
Hi,


Do you have the issue on your dev machine or on productive
infrastructure: I remember having issues with PNGs on my dev machine
but that would work ok on live machines

regards

didier

On May 12, 8:27 pm, Teng Shiu Huang small...@gmail.com wrote:
 I am evaluating imagesService.applyTransform() to transform images(from URL)
 to specific width/height.
 It's documented that PNG is supported. But it seems it doesn't understand
 some PNG file.
 for example 
 :http://destinyfab.appspot.com/resizer/resize?url=http://www.google.co...
 It works well , and can transform google's logo to 500x500.

 BUT , this PNG 
 :http://destinyfab.appspot.com/resizer/resize?url=http://upload.wikime...

 An error occurred , with this stacktrace :

 Caused by: java.lang.IllegalArgumentException: Unknown
         at 
 com.google.appengine.api.images.ImagesServiceImpl.convertApplicationException(ImagesServiceImpl.java:306)
         at 
 com.google.appengine.api.images.ImagesServiceImpl.applyTransform(ImagesServiceImpl.java:73)
         at 
 com.google.appengine.api.images.ImagesServiceImpl.applyTransform(ImagesServiceImpl.java:50)
         at 
 com.google.appengine.api.images.ImagesServiceImpl.applyTransform(ImagesServiceImpl.java:39)
         at controllers.Resizer.resize(Resizer.java:72)

 I tried some PNGs , and many transparent PNG cannot be transformed . Is this 
 GAE's limitation ?

 The code is very simple , just grab the url's content , transform to byte[].

         byte[] imageBytes = baos.toByteArray();
         Logger.info(imageBytes.length = %s  , imageBytes.length);

         ImagesService imagesService = ImagesServiceFactory.getImagesService();

         Image oldImage = ImagesServiceFactory.makeImage(imageBytes);
         Transform transform = ImagesServiceFactory.makeResize(w, h);        
         Image newImage = imagesService.applyTransform(transform, oldImage); 
 //error occurs
         byte[] newImageData = newImage.getImageData();

-- 
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: imagesService.applyTransform cannot transform some PNG ? Why ?

2011-05-12 Thread Teng Shiu Huang
sorry , I've found the reason. 
(the url is incorrectly toLowerCase)
Sorry to disturb you.

-- 
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: App engine SDK jars in WEB-INF/lib. Why???

2011-05-12 Thread arjan tijms
Hi ya!

On May 12, 1:05 am, Didier Durand durand.did...@gmail.com wrote:
 1 of the reasons is that all applications don't run all at the same
 version on the gae productive infrastructure. So, google would have to
 know which one you are using in order to put it for you in your war
 when you upload it.

Hmmm, there are two possible problems with that explanation:

1. Aren't the GAE jars in the war the ones for local simulation and
not the actual ones used by the live GAE production servers?
2. Why would Google need to put them into the war when we upload it?
Tomcat doesn't add the servlet-api jars to my war when I deploy it to
Tomcat, JBoss AS doesn't add the EJB, JPA, etc etc jars to a war being
deployed to it, Resin also doesn't do this. In fact, I've never
encountered any Java server that required jars for functionality that
the server provided to be put into the war. WEB-INF/lib is for extra
functionality that the server -does not- provide.

If they just use it for detecting the version for which you developed
your app, then why not just put that version number in appengine-
web.xml?

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



Re: [appengine-java] Re: App engine SDK jars in WEB-INF/lib. Why???

2011-05-12 Thread Toby Reyelts
arjan,

There are two sides to the App Engine API: the client and the server. The
client side (appengine-api.jar) lives entirely in user-land. If you so
chose, you could create your own version of these classes. In the end, the
client ends up talking to the server through a binary protocol in order to
fulfill much of the API.

Having this separation means that you can evolve the client and server
independently. For example, dev_appserver and prod obviously have two
different server backends for the same client API. You can take that one
step further and even independently implement your own server if you so
chose. It also means that its trivial to do things like test out and even
deploy hotfixes for individual applications instead of waiting for full
releases.

On Thu, May 12, 2011 at 4:31 PM, arjan tijms arjan.ti...@gmail.com wrote:

 Hi ya!

 On May 12, 1:05 am, Didier Durand durand.did...@gmail.com wrote:
  1 of the reasons is that all applications don't run all at the same
  version on the gae productive infrastructure. So, google would have to
  know which one you are using in order to put it for you in your war
  when you upload it.

 Hmmm, there are two possible problems with that explanation:

 1. Aren't the GAE jars in the war the ones for local simulation and
 not the actual ones used by the live GAE production servers?
 2. Why would Google need to put them into the war when we upload it?
 Tomcat doesn't add the servlet-api jars to my war when I deploy it to
 Tomcat, JBoss AS doesn't add the EJB, JPA, etc etc jars to a war being
 deployed to it, Resin also doesn't do this. In fact, I've never
 encountered any Java server that required jars for functionality that
 the server provided to be put into the war. WEB-INF/lib is for extra
 functionality that the server -does not- provide.

 If they just use it for detecting the version for which you developed
 your app, then why not just put that version number in appengine-
 web.xml?

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



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



[appengine-java] Re: After upgrade to GAE SDK 1.5.0 - Cache is not working

2011-05-12 Thread Nichole
I've been programming to the jcache interface that's included in the
appengine sdk
javax.cache.Cache and that still works in SDK 1.5.0.

appengine's service locator (MemcacheService) finds the implementation
for the interface.

import javax.cache.Cache;
import javax.cache.CacheException;
import javax.cache.CacheFactory;
import javax.cache.CacheManager;

CacheFactory cacheFactory =
CacheManager.getInstance().getCacheFactory();
cache = cacheFactory.createCache(Collections.emptyMap());


On May 11, 7:03 pm, luka uluk...@gmail.com wrote:
 I have found a workaround until a new zip will be released.

 I have taken the

 appengine-jsr107cache-1.4.3.jar from a former SDK installation
 renamed it to appengine-jsr107cache-1.5.0.jar and placed it under

 C:\Google-Apps\SDK\1.5.0\lib\user

 I have checked it on local  production environment and it works like
 a charm

 On May 12, 1:24 am, Scott shathaw...@gmail.com wrote:



  I am having the same issue this:

   CacheFactory factory =
  net.sf.jsr107cache.CacheManager.getInstance().getCacheFactory();

  Throws a CacheException with no stack trace and the message:

  net.sf.jsr107cache.CacheException: Could not find class:
  'com.google.appengine.api.memcache.jsr107cache.GCacheFactory'

  On May 11, 6:03 pm, Don Schwarz schwa...@google.com wrote:

   What is the NullPointerException that you are getting?

   You shouldn't need to change your GCacheFactory.  Nothing changed with 
   that
   in 1.5.0, and the new package you are using is not correct.
    com.google.appengine.api.memcache.jsr107cache.GCacheFactory is the one 
   you
   want.  It is in appengine-jsr107cache-1.5.0.jar.

   On Wed, May 11, 2011 at 5:00 PM, luka uluk...@gmail.com wrote:
I have recently upgraded from GAE 1.4.3 to 1.5.0 and the MemCache 
service I
work with stop working.
When I try to reach it, I get NullPointerException

I saw that the package of GCacheFactory was changed
to com.google.appengine.api.memcache.stdimpl although besides of that 
I am
not sure what is wrong.

I have a simple cache implementation using Spring beans which worked 
well
during the last year:

(Please help, my service has customers waiting for solution)

import java.util.HashMap;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;

import com.google.appengine.api.memcache.stdimpl.GCacheFactory;

import net.sf.jsr107cache.Cache;
import net.sf.jsr107cache.CacheException;
import net.sf.jsr107cache.CacheManager;

public class OnLoad {
 private static Logger logger =
Logger.getLogger(com.lugo.server.utils.OnLoad);

Cache cache;
 /**
 * Create Cache ( MemCache )
 */
 public void onStartup(){
try {
Map props = new HashMap();
 int expire = 3600 * 192 ; // 8 Days
        props.put(GCacheFactory.EXPIRATION_DELTA, expire);
 cache = 
CacheManager.getInstance().getCacheFactory().createCache(props);
        } catch (CacheException e) {
        logger.log(Level.WARNING,onStartup(), e);
        }
}
 public Cache getCache(){
return cache;
 }

}

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

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



[appengine-java] Re: After upgrade to GAE SDK 1.5.0 - Cache is not working

2011-05-12 Thread DanielP
I have the same issue:

Eclipse cannot find:
com.google.appengine.api.memcache.jsr107cache.GCacheFactory 
.. and if I change it to
com.google.appengine.api.memcache.stdimpl.GCacheFactory
.. then I get the exception.

I need the GCacheFactory when I set the expiration:

props.put(GCacheFactory.EXPIRATION_DELTA, 3600);



-- 
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: Backends.xml ERROR when deploying

2011-05-12 Thread JakeP

I see now that the documentation online is erroneous.

I found the sample xml file in the sample Hello project and copied it.

backends
  backend name=mother
classB4/class
options
  publicfalse/public
/options
  /backend
/backends

-- 
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: App engine SDK jars in WEB-INF/lib. Why???

2011-05-12 Thread Nichole
Just a quick summary, the servlet spec requires that a servlet
container such as appengine
provider an implementation for a service.  Those jars such as servlet-
api-2.4.jar are needed
at compile time.  They are sometimes provided by the servlet container/
engines at run time
in a global directory that is found by the container/engine
classloader.  appengine provides
the servlet, jsp implementations for us at runtime.

The appengine specific service implementations are also needed at
runtime and compile
time and are present in the appengine-api-1.0-sdk-ver.jar.
They've chosen not to add the latest sdk to the container global
classpath, so yes, the
application must provide it.
That may be an assumption that all builds are not required to be
backwards compatible.
Note that the application loader is now checking for the sdk version
before upload too, so
there's a rough check for compatibility in place.  I think I had one
app that was using 1.3.8
and was no longer able to deploy it with version 1.4.3.


On May 12, 2:56 pm, Toby Reyelts to...@google.com wrote:
 arjan,

 There are two sides to the App Engine API: the client and the server. The
 client side (appengine-api.jar) lives entirely in user-land. If you so
 chose, you could create your own version of these classes. In the end, the
 client ends up talking to the server through a binary protocol in order to
 fulfill much of the API.

 Having this separation means that you can evolve the client and server
 independently. For example, dev_appserver and prod obviously have two
 different server backends for the same client API. You can take that one
 step further and even independently implement your own server if you so
 chose. It also means that its trivial to do things like test out and even
 deploy hotfixes for individual applications instead of waiting for full
 releases.



 On Thu, May 12, 2011 at 4:31 PM, arjan tijms arjan.ti...@gmail.com wrote:
  Hi ya!

  On May 12, 1:05 am, Didier Durand durand.did...@gmail.com wrote:
   1 of the reasons is that all applications don't run all at the same
   version on the gae productive infrastructure. So, google would have to
   know which one you are using in order to put it for you in your war
   when you upload it.

  Hmmm, there are two possible problems with that explanation:

  1. Aren't the GAE jars in the war the ones for local simulation and
  not the actual ones used by the live GAE production servers?
  2. Why would Google need to put them into the war when we upload it?
  Tomcat doesn't add the servlet-api jars to my war when I deploy it to
  Tomcat, JBoss AS doesn't add the EJB, JPA, etc etc jars to a war being
  deployed to it, Resin also doesn't do this. In fact, I've never
  encountered any Java server that required jars for functionality that
  the server provided to be put into the war. WEB-INF/lib is for extra
  functionality that the server -does not- provide.

  If they just use it for detecting the version for which you developed
  your app, then why not just put that version number in appengine-
  web.xml?

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

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



[appengine-java] Re: Can remote api be used inside a GAE java app.

2011-05-12 Thread Max Ross
This is on our radar but it's not yet supported.

Max


-- 
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: Will movement out of preview status give free access to SQL

2011-05-12 Thread Max Ross
We don't have anything to announce related to SQL pricing and quotas, but 
the access for Java apps will be through JDBC.

Max

-- 
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: Backends Javadoc Reference not uploaded

2011-05-12 Thread Max Ross
I see it here in com.google.appengine.api.backends:
http://code.google.com/appengine/docs/java/javadoc/

Where are you looking?

Max

-- 
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: Backends Javadoc Reference not uploaded

2011-05-12 Thread blue
The link from the main app engine docs webpage links to this:

http://code.google.com/appengine/docs/java/com/google/api/backends/package-summary.html


Start here:
http://code.google.com/appengine/docs/

Go to Java -- Backends -- Javadoc Reference

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