Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp

pradeep selvaraj

Ranch Hand
+ Follow
since Nov 29, 2005
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
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 pradeep selvaraj

Ohh Sorry,

We use web service to register clients. When there is no proxy, the clients are able to register. When a proxy settings is applied with the code above the following exception is thrown




What could be the reason that the RPC call fails when proxy is set. The proxy machine is reachable from the machine that this code is being tested.

Thanks very much
12 years ago
Hi All,

I am working on a client that calls few services. It works very well without proxy. The new requirements are that they should also work same via a proxy server.

This is the code that i use to set the proxy settings..




What could be wrong? Is there someother way of setting proxy in Axis 1.1?

Thanks a lot
Pradeep
12 years ago
Thanks guys...
Yeah the prob was in opening and closing. I am ok with threads but tried this option n got amazing results....

It takes abt 15 seconds now from 190 in our test machine and there is not much difference in the speed in the client site as well.




I guess the disk speed at my client place is very very bad....or my first implementation would have worked in the same time there as well

problem solved
12 years ago
Hi All,

I have this piece of code.




The PL.txt file is about 110 Mb and this program takes about 190 seconds to finish the task.

We have tried this in many of our systems in our place and depending on the processor speed we get a relatively consistent time.

But in our clients machines (which are must faster than our test machines) this same program takes about 2 hours. There is no error or anything its just that its too slow.

This happends only when we try to append files. Normal file copy takes the same time.

My question now is could the append in filewriter depend on something in the machine, like the hard disk speed or somoethig else causing the program to run differently in different machines?

Thanks for your help





12 years ago
Found it!!!

Closing the connection and opening it again solves the problem.

Pradeep
Hi Gaurav,

I tried with having conn.commit(); just after creating the table and after the first insert statement too, but when the bulk insert call executes i get this error
" Table 'derbyDB' does not exist. "

Wont conn.commit() solve the problem?

thanks
Pradeep
Hi All,

I have tried to create a table and bulk insert the table from a text file using derby. Here is my code,



The import text file has these contents....



i get this exception...when i run this constructor...
java.sql.SQLException: Table 'derbyDB' does not exist.
java.sql.SQLException: Table 'derbyDB' does not exist.


What am i doing wrong? please help

Thanks
pradeep
[ April 16, 2007: Message edited by: pradeep selvaraj ]
Henry,
Could you please explain it a bit more.

Thanks
Pradeep
13 years ago
Yeah. I know that, but it was only for knowing if the application is running or not. Not like what we get in JConsole.

Pradeep
13 years ago
Thanks ,

Is there a way to monitor non Java programs through java? I mean i have a JMX Monitoring program, so my plan was to start the non java programs using java, and then notify JMX somehow.

This is how i started a non java app...



Something like the one above is what i would prefer. The other way that i am doing it now is to set the JMX options for this program while running it. But with such a method i would have to run an instance of this program for each non java application that i monitor(with the -Dcom.sun.management.jmxremote argument passed to the VM) which is not a nice solution.

Whatz the best way to do this with my monitoring tool?

Thanks again,
Pradeep
[ March 22, 2007: Message edited by: pradeep selvaraj ]
13 years ago
Hi All,

I have a JMX monitoring tool which monitors java applications that have these options set while running them



My Quesiton is could these options be set from the code itself? something like this



Thanks
Pradeep
13 years ago
Hi,

Our client requires us to use 3DES to encrypt the files that we send to them. They want us to create certificates with encryption algorithm as 3DES with the hashing & receipt algorithm being SHA1.

I havent done much in security, my idea is that 3DES is like RSA. Am i correct? If so are there any tools to create certificates using 3DES?


Thank you
Pradeep
13 years ago
Yes we do manipulate the data, but we feel that its a bit slower than we would like it. So are there any other tools available, which you think might be useful to read and manipulate very big xml files?

Thanks
Pradeep
Hi we are currently using JDom to read xml files. The file range from 10MB to 40MB. Most of the smaller ones (the 10Mb files) are read and populated in our applicaction at about 15 seconds. As the file size gets bigger, it takes unacceptable amount of time for the users and sometimes the application even hangs. Are there any other APIs that are good for reading big xml files, quickly?

Thanks in advance

Pradeep
Thanks to both of you

Yeah i did go to (start->run->cmd) and then execute the program, thinking that even if we hadent cought that exception there would be a stack trace printed. But two time the program has shut down and both the time the command window has also been shut down. I dont think anyone on the client site would close the window, because we have told them specifically not to do it.

Now we are able to write the stacktrace to a file before it shuts down. But i am still wondering how the command prompt would close when i ran the application by going to start->run->cmd.

Any idea if that is possible by java to do that when an exception is thrown?

Thanks
Pradeep
13 years ago