Reputation: 809
I have a Java service running in SAP Cloud Platform and it is using java.util.TimeZone library to do timezone converting. But recently I knew that timezone converting rule may change, for example the Central European Time Zone may be changed form UTC+01:00 to UTC+02:00 someday. I know perhaps this won't happen in hundreds of years but there's a possibility. If such thing happens, data in my service might be wrong.
Oracle has a timezone updater tool (http://www.oracle.com/technetwork/java/javase/tzupdater-readme-136440.html) which is able to update the JDK with the recent timezone data. To run it I have to:
Stop all the running JDK/JRE instances.
Run command "java -jar tzupdater.jar options" as admin.
My questions are:
Does Could Foundry already considered such problems? If yes, what should I do to use this feature?
Is it possible for me to update the JDK in Cloud Foundry for my service? If yes, how?
Thank you so much!
Upvotes: 0
Views: 423
Reputation: 15041
- Does Could Foundry already considered such problems? If yes, what should I do to use this feature?
In a way yes. Cloud Foundry, through it's Java Build Pack, will keep your JVM up-to-date. According to the following statement from the link you included that is the preferred way of getting up-to-date timezone data.
Oracle recommends that you use the latest Oracle Java SE platform JDK or JRE update release as the preferred means of delivering both timezone data updates and other product improvements, such as security fixes.
http://www.oracle.com/technetwork/java/javase/tzupdater-readme-136440.html#introduction
All you need to do to make sure your JVM stays up-to-date is to periodically cf push
or cf restage
your application. This will cause the build pack to run and produce a new droplet with the latest JVM on it.
- Is it possible for me to update the JDK in Cloud Foundry for my service? If yes, how?
Yes. Through the build pack. The Java build pack is responsible for installing a JVM. It will pick the latest one available at the time of staging (unless you tell it otherwise). So to update your JVM, you just need to restage your application.
Upvotes: 1