Anand Natraj

Ranch Hand
+ Follow
since May 17, 2004
Merit badge: grant badges
For More
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 Anand Natraj

Hi All,

I have two apps, App1 running in Glassfish and uses JAAS authentication and App2 runs in tomcat and uses spring security. I want to authenticate app1 from app2 when a request comes to App1, and place the authetication in a security container. I looked at the spring documentation and looks like this is possibe using JaasApiIntegrationFilter when used with JaasAuthenticationProvider. Am looking for some sample code for using JaasApiIntegrationFilter, any directions or info will be highly helpful.

Thanks,
Anand
12 years ago
Hi All,

I have two apps, app1 is running using multiple jars inside a war and uses spring security(digest) for authentication. app1 runs in tomcat, and i have another app running in another web container (glassfish) app2. app2 uses form based authentication. Both the apps use same username and password, i need to authenticate app1 from app2 and have the authentication results in a securitycontext. I have searched, but couln't find much info. Have some across similar scenario?? Any information will be highly appreciable.

Thanks in advance.
12 years ago
Hi Sreekanth,

Increasing the heap size doesn't solve the problem. Please run the sample code and check with the increased memory size.
Hi All,

I am exteremly sorry for replying so late. Thank for all who have helped me for my better understaning.I tried runing the code posted by Jim Yingst, the code ran for more than 12 hrs,it wasn't crashing the JVM nor it did the program run to completion. I had to kill the program manually. I think i need run the code for 2 days for it to complete. I will test hte same and and post the reply soon.

Thanks and Regards,
Anand
Hi,

Please find attached the updated version of the program(Without doing any IO operations):

program 1:

program2:



Thanks and Regards,
Anand
[ February 23, 2007: Message edited by: Jim Yingst ]
Hi All,

Thanks a lot for your comments/suggestions on the issue.

1. By JVM crash, i mean the Java process(am using WindowsXP)is ending abruptly with the error message of OutOfMemory Exception.

2. I tried to run the program without doing any IO operations inside the finalize method. But still the JVM crashes.

3. I tried increasing the heap size to 256 MB and also tried with parallelGC, this only delays the JVM crash but not protecting the JVM from crashing.

Can any one suggest me a way to avoid this JVM crash

Thanks in advance

Regards,
Anand
Hi,

Thanks for your reply..

Thanks for your suggestion on sharing jobject.

But my problem is the code i have listed itself is crashing the JVM. Please suggest me a way to avoid the JVM crash without modifying the code in finalize method. I tried sychronizing the run method and also synchronizing the test method. But the JVM still crashes..

Thanks in advance

Regards,
Anand
Hi James,

Thanks a lot for the reply.

I am going to use JNI and make some native calls to the 'C++' code. So i have to explicitly call a native in the finalize methos which inturn will call the destructor of the C++ code. So i have to call that method only in the finalize method. Is there any other way to avoid the JVM crash.

Thanks.

Regards,
Anand
Hi,

I have a a 10 threads each generating 1 billion object at a time. But my JNI crashes when i run the thread and insert a System.out.println statement in my finalize method. when i remove the print stament the threads are running properly to completion. but i want the print statement to be present in the finalize method because i have have to integrate the JNi code and will making call to the native methods from the finalize methods. Please find below the code snippet:

Class 1:

Class 2:


Thanks in advance.


Regards,
Anand
[ February 23, 2007: Message edited by: Jim Yingst ]
Hi Ernest,

Thanks for the reply.

Here is my requirment.

I want to create a class and make sure that at run time it always runs in a single thread and no one can create multiple threads on that class.

Thanks in advance for your solution.

Regards,
Anand
Hi All,
I have a specific requirement to create a class with only thread. That is i don't want any other class to create a thread in that class. Please help out.

Thanks in advance.

Regards,
Anand
Hi All,

I am new to swing. I am adding a gif to a JLabel. My gif is getting displayed properly in the JLablel but my image is not getting animated. Please find below the code :


JLable label= New JLabel();

InputStream in = this.getClass().getResourceAsStream("/resources/backup.gif");

try {
image = ImageIO.read(in);
} catch (IOException e) {
// TODO Auto-generated catch block

}

label.setText(message);
// label.setForeground(Color.RED);

icon=new ImageIcon(image);
label.setIcon(icon);


Am i missing something.. Please let me know.

Thanks in advance.

Thanks and Regards,
Anand
17 years ago
Hi Jaikiran,

Thanks a lot for replying. Yes i have a specifc requirement for stopping the JBoss server if the databse server is down.

Thanks and Regards,
Anand
17 years ago
Hi All,

I am a newbie to JBoss.

I want to configure my JBoss server in such a way that when my Database server is down my JBoss server should not start. How do i do this.

Please help me out.

Thanks in advance.

Regards,
Anand
17 years ago
Hi Rahul,

The database encoding is also set to Unicode.