I'm going to be doing some work with dates millions of times per day. I've created an XMLGregorianCalendar to handle the dates from an XML feed as such:
XMLGregorianCalendar xCalEst = null;
xCalEst = DatatypeFactory.newInstance().newXMLGregorianCalendar("2011-08-09T21:50:00Z");
Where the date string will be coming from another source. Since I need to be doing this a lot I'm thinking, for performance reasons, I should create the calendar as static and just create it once. The problem is that there is no (easy) way to reset the calendar with a new incoming date string.
IE: What I would like to be able to do is something like: xCalEst.reset("2011-08-09T21:55:00Z");
Am I overly concerned with performance and just let the objects get created and destroyed each time or is there a simple way to do this?
Please note I'm an old C programmer and just starting out with Java.