Anubhav Anand

Ranch Hand
+ Follow
since May 18, 2007
Anubhav likes ...
Firefox Browser Java Spring
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
(keep public parts private until JForum day)
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt
Moderation Tools

Recent posts by Anubhav Anand

Thanks Seetharaman.
Is there a way to also achieve if-else. Precisely what if say the name was unique as well independently. Because the actual key bean has a lot of attributes say 10, and the combination of all 10 would be unique, but at times even 6 may be able to provide the required unique constraint.
So, i want to achieve something like the nvl function in SQL.

So, in this case make it work for say name, or age, or both.

Thanks,
Anubhav
6 years ago
Lets say for this example, age will always be unique. But I don't want to maintain the same set of vales for age and name keys into multiple maps.
So, in this case I want K3 to return the value same as K2.

Thanks,
Anubhav
6 years ago
I have the code scenario as below. The map contains both Key and Value as beans. I want to get value from map, even when all fields of the key may not be present i.e. are null. Is there a way to do this?



So precisely, i want the K3 to work as well somehow. Not sure if I am thinking straight , but need this or something on this line to work
Thanks in advance.

- Anubhav
6 years ago
I included the url in the error, but couldn't see a pattern, as the url calls are randomized, so randomly they fail.
Though i found this link, and when i ran with requests less than 3900, the program worked
correctly for most times in windows.

Thanks,
Anubhav
Sample console output for the program is as below, so the service is becoing unavailable for intermittent requests.



Thanks,
Anubhav
Thanks Rob. The port probably got incorrect while changing the URL's to dummy
Thanks for the time evaluation tip.
Though the real problem that's happening is that, when i run the program a large number of requests fail with the java.net.ConnectException: Connection refused: connect

Thanks,
Anubhav
Hi Fellas,

My application has a number of HTTP web services. While writing a regression test I am getting "java.net.ConnectException: Connection refused: connect" exception.
Though I have verified that the service never goes down even when these errors come. The test class is attached for reference.
Please suggest what is not working out here.



Thanks in advance.


<<updated code as per Rob's suggestions>>
Hi Jacquie,

Welcome to Java Ranch.

My question is that how effectively the book helps us to steer our career from bad patches and move to newer and promising directions.
Also, how easy to adopt and effective are the tips provided, when we see the real world picture.

Thanks in advance.

Cheers,
Anubhav
8 years ago
Hey Salvin,

Well, the settlement is that all the people of my group continue to use what they feel better suits them. I am addicted to null != object
so, maybe I'll continue with it .. or maybe I'll consciously change. Can't say that .. lol

But, the main issue was if the syntax matters. And since it doesn't we are all on our happy ways.

8 years ago
Thanks for the response fellas. I get that. Just that the discussion that had started this 'evil dead' thing would keep on looking for which one is good practice as per standards. But, the doubts are settled now. Thanks a lot for your time and replies.

Cheers.
8 years ago
Thanks for your quick response to this Zandis.

Well, personally I ususally do a null != object .. lol

The thing is there has to be a standard convention and the discussion won't end, and moreover, does this really affect the performance or any parameters.
Well, I am just looking for a rationale over this.

Thanks Again.
8 years ago
Hi Fellas,

Just stumbled back upon this ancient problem during a discussion in meeting.
The arguments just won't move. The problem is simple




Out of the above two, which one is the suggested practice and why? And how does it matter to the JVM, if it does.
Thanks for you time for replying to this.

8 years ago
Hi Fellas,

I have a struts application. The application generates few files of different type e.g. xml,pdf etc.
I want to use some CMS which will store the files generated from my application.
Further I'll like to retrieve those files from CMS in my application and also access the search engine of
CMS in my Struts application.

The question is : Is this type of integration feasible with a CMS and if so which one is best to use?
The CMS should be open source and preferably free.

I tried with OpenCms but it helps integration with struts inside CMS environment and not between
a separate independent Struts application.

Any ideas or suggestions will be higly appreciated.

Thanks in advance.


PS : Moderators, I am really not sure where to post this. Please move this thread accordingly if required.

9 years ago
Hi,

I have Tomcat 6.18 installed on my machine. When I try to access it on web browser http://loclahost:8080 auto redirects to http://www.localhost:8080 on mozilla firefox. On IE the redirect doesn't happen but, even when the server is running it says page can't be displayed.

I don't have any redirects configured and have not modified any conf files. I just have the default installation.

One strange thing is even when I can't access the tomcat server vuia web browser, I can access the web services deployed in ut through a web service explorer, which means the server is running fine.

Please help me on this.

Thanks in advance.
9 years ago
Hi All,

I finally resolved it and listing it for anyone else who may face the problem.

The issue was that I was thinking that my JDK version was the culprit, but I found that the Java EE 5 libraries I was using were had the older version of JAXB(2.0) bundled while my JDK 1.5 update 16 had the JAXB 2.1 bundled libraries.

I simple got rid of the EE libraries and placed the ones which had JAXB 2.1 bundled.

The issue was because the JAXB 2.0 libraries can't understand the JAXB 2.1 schemas.
9 years ago