Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!

Rajagopal Mani

Ranch Hand
+ Follow
since Mar 24, 2011
Rajagopal likes ...
Eclipse IDE Java
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
2
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Rajagopal Mani

Hi,

Please correct if any concern in above approaches

Thanks,
Raj
6 years ago
Yes conversion to string not required. flaw there..

Below two ways would give proper time diff to show in any location irrespective of the sever locations or time zones. Out of two ways, without baseline with GMT would be more efficient than other until dates provides proper milliseconds from epoch. please correct if anything wrong here & suggest if anymore best.


Thanks
-Raj
6 years ago
First of all thank you both..

Have gone thru the link. Really useful in which my understanding some what narrowed down on java time.

With this, have come up with a way. below the psuedo code. please correct me if anything wrong in it



- Raj
6 years ago
Hello Rangers,

System need to show time diff in UI between 2 dates.

E.g.
Date1 -> Meeting start time(Possibly any timezone date) -> Getting this date from external source
Date2 -> Current time of the meeting location -> Finding current time based on concern time zone id

Both date is base lined with GMT and manipulate the time diff. This approach is working fine if both dates fall under same period(DST or Non-DST)

E.g. Issue scenario

Date1 -> Nov-3 6AM (Non-DST)
Date2 -> Nov-3 1AM (DST)

Vice-versa as well...

Note : Server & Desktop can be located in any timezone

Surfing to obtain posible solutions. Even found similar thread with subject "java.util.Calendar, setTime and DST" in this forum itself but couldnt get properly

There would be effective ways to calculate the time diff to handle all the scenarios. Really appreciable if anybody suggest on this.

Thanks in advance

- Raj
6 years ago
Thanks for your valuable replies & making understanding. Any more better link to refer in this regard would help to understand in detail.

-Raj
7 years ago

If there's any threading issues with that code it's in the Message objects, which may or may not be shared (it depends on how the method is called). And the StringBuffer doesn't have any effect there.



The "Message" which is passed is just a bean object. There are diff "Message" instances would be passed to this utility function from so many areas(eq. Services, Class run by threads). My doubt here is if any service invokes this method during another works on it, is it any possible to return improper id due to concurrency? Here, synchronized can be used to avoid concurrency issue. But, feel like synchronized may be overloaded in this case if no possibility of concurrency issue @ any time. Please provide your valuable suggestions :-)

-Raj
7 years ago
Hi Everyone,

This topic is being discussed multi time in this forum. However, I need to confirm the below piece of code against concurrency.



The above utility function is being used in multi thread environment. I dont declare this static method as synchronized one. I beleive that using StringBuffer enough to protect against concurrency issue. Can you please correct if am wrong.

-Raj
7 years ago
please share the XML data format which may lead to help you in detail.
8 years ago
JSP
Line9 - If map not contains key, new key added with corresponding MailItem in the form of List.
Line11 - If map contains the key, obtain existing List<MailItem> refrence to add another MailItem to list for the corresponding key/user
8 years ago
MailItem is added to whom mail? if possible to post with credentials, below code can be considered. Not able to visualize the requirements & scenarios that you working towards.

8 years ago
Thanks. It would be better if any sample application in this case regard. please share if any related link
Hi,

I am working with JPA+eXtreme scale which load relational java object to cache. I could achieve below.

[1] One to Many
[2] Many to One

But I am facing problem with Many to Many relationship object loading in cache. The JPAEntityLoader is used currently. Can anybody guide me to achieve this?

If need further details, please revert back.
JS files(wherever alert function) in commons-validator.jar needs to be modified with custom alert function.
8 years ago
Generally java.util.ConcurrentModificationException will occur when one thread to modify a Collection while another thread is iterating over it. Please check your code with this viewpoint. Below approach can be considered.

[1] Copy the collection object to be modified
[2] Modify the collection object inside the synchronized block
8 years ago
Are you getting index page?

If so, please share what kind of response that you receive on click of submit button. Moreover, please check the path of /success.jsp in application folder structure.
8 years ago