The fields are static and the chunk of code I also static, so time will be same for all the instances of that class. I see only two problems here 1) as GAE do not allow load on starup so you need to make a call to some servlet which will atleast access this class. So the first time this class will be loaded in JVM and that time will be stored in static field, subsequent object/instance creation of that class will not change the time. 2) some times JVM unload rarely used classes, in that case next time your deployment time will be wrong. But if you put this code in some class which is frequently used, then you can overcome this problem
this is not a perfect solution, I will say it as workaround. Happy coding On Wednesday, July 1, 2009, Wooble <geoffsp...@gmail.com> wrote: > > That will tell you when a particular instance was started, but there's > no guarantee any request will hit an existing instance. It won't tell > you anything at all about when you deployed. > > On Jun 30, 5:20 pm, Ravi Sharma <ping2r...@gmail.com> wrote: >> what about using this code in any of your class >> >> public static Data deployTime; >> static >> { >> deployTime = new Date(); >> >> } >> >> I think after redeployment, server will reload your classes, and the above >> code will execute first time the class reloaded. I think currently in >> web.xml google app server dont support load on startup attribute, so you >> just have to find out which is the first class usually being used after >> redeployment and put this code in that class. >> Till the time google come up with proper solution, you may use this one. >> >> Ravi >> >> On Mon, Jun 29, 2009 at 11:18 PM, Sylvain <sylvain.viv...@gmail.com> wrote: >> >> > Currently : no answer. >> > We have to wait. >> >> > On 29 juin, 16:27, Mariano Benitez <mari...@benitez.nu> wrote: >> > > thanks sylvain, did you got any answer from google? at least an >> > > unsupported way of getting it? it's that or running some script in my >> > > machine just before uploading to set the current date in a file... >> > > have you got any workaround? >> >> > > Regards, >> >> > > On Jun 29, 5:13 am, Sylvain <sylvain.viv...@gmail.com> wrote: >> >> > > > star this : >> >http://code.google.com/p/googleappengine/issues/detail?id=952 >> >> > > > On 29 juin, 03:58, Mariano Benitez <mari...@benitez.nu> wrote: >> >> > > > > Hello, >> >> > > > > I want to use the version deploy time as my sitemap last modified >> > > > > date. The fact is that I don't find a way to do it. >> > > > > I know that the CURRENT_VERSION_ID variable holds something >> > related... >> >> > > > > Is there a way to obtain the deploy time from CURRENT_VERSION_ID? >> >> > > > > Thanks, > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---