Are you using virtualization?

Andreas

On Wed, Aug 19, 2009 at 13:20, Krystian
Szczesny<[email protected]> wrote:
>> -----Original Message-----
>> From: Krystian Szczesny [mailto:[email protected]]
>> Sent: 19 August 2009 11:07
>> To: [email protected]
>> Subject: Application Time out of sync from server time
>>
>> Hi,
>>
>> I know this is not a very Axis2 specific question, but since the app
> is
>> based on Axis2 I thought I would start in here.
>> We have an application, which for every call received by Axis2, calls
>> our system.
>> In the call it includes the current date, which is then treated by our
>> system as effective date of the call.
>> Although both: Axis2 app and our system are on the same server, the
>> java
>> app reports a different time than server time.
>> Depending on the environment, we have from 4 seconds "behind" server
>> time to 10 seconds "ahead" of server time.
>> Problem is, that we truncate the time to the nearest minute, and for
>> few
>> seconds during a minute, we will have a different time in our system
>> and
>> in the call from the java app.
>>
>> Could you please tell me where I should start looking for the cause of
>> this problem?
>> Code in the java app is extremely simple:
>> Request comes in->convert xml to map->get connection to our
> system->get
>> current time->call our system->convert returned map to xml->send
>> response
>>
>> This is how we get current date:
>> Date invokeDate = DateUtils.truncate(new Date(), Calendar.MINUTE);
>> Where DateUtils is:
>> org.apache.commons.lang.time.DateUtils;
>> and Date is:
>> java.util.Date
>>
>>
>> It's not like this date is only reported wrong when we make the call
>> out. For logging we use SLF4J with Logback, and the timestamp of the
>> log
>> entries is same as the new Date() in the java app code and different
>> from the server time.
>>
>> Could you please point me in some direction, where I should start
>> digging for answers?
>> App is deployed on HP-UX, we are using:
>>
>> $ java -version
>> java version "1.5.0.07"
>> Java(TM) 2 Runtime Environment, Standard Edition (build
>> 1.5.0.07-_20_mar_2007_05_31)
>> Java HotSpot(TM) Server VM (build 1.5.0.07 jinteg:03.20.07-11:05 IA64,
>> mixed mode)
>>
>> Axis2 1.4.1
>>
>> All help will be appreciated,
>> Thanks,
>> Krystian
>
> Hi again,
>
> Just to follow up:
> We have conducted an experiment: changed the server time by 10 seconds
> into the future and the date in the java app was not affected.
> This is something, as the changes might have been caused by NTP process.
> Is there any way I could sync the date in the java app with the server?
> I would have always though this is done automatically...
>
> Thanks,
> Krystian
> This e-mail and any attachments are confidential and may also be legally
> privileged and/or copyright material of Intec Telecom Systems PLC (or its
> affiliated companies).  If you are not an intended or authorised recipient
> of this e-mail or have received it in error, please delete it immediately
> and notify the sender by e-mail. In such a case, reading, reproducing,
> printing or further dissemination of this e-mail or its contents is strictly
> prohibited and may be unlawful.
> Intec Telecom Systems PLC does not represent or warrant that an attachment
> hereto is free from computer viruses or other defects. The opinions
> expressed in this e-mail and any attachments may be those of the author and
> are not necessarily those of Intec Telecom Systems PLC.
>

Reply via email to