Param Yanamandra

Ranch Hand
+ Follow
since Jun 06, 2002
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
(keep public parts private until JForum day)
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt
Moderation Tools

Recent posts by Param Yanamandra

I think I figured out what the problem is. My JavaScript method name is same as the built-in method which is causing confusion. Once I changed my method's name to a different name it works.
13 years ago
Please ignore this post. Submitted incomplete post by mistake. Posted another one.Thanks,

Param
13 years ago
Hi Everyone,
I m having trouble using JavaScript in a JSP page. I m using Struts framework. My form and the submit button are creating using Struts HTML form and submit tags. I want a confirmation message using JavaScript when the user clicks the Submit button before the action gets invoked and my action should be invoked only when the user selects "Yes". I tried this and I m getting an error :Stack overflow at line:xx. Does anybody know why this is happening or if there is any other way of doing it. Thanks in advance,

Param
13 years ago
Hi everyone,
I am having trouble popping up a confirmation message when the User clicks on a button. I m using Struts and my form and buttons are creating using struts HTML tags. Here is the code

<html:form action="doSomething" >
<TD VALIGN="MIDDLE" ALIGN="CENTER"><nobr>
<html:hidden name="xxx" property="id"/>
<html:submit styleClass="button" value="Remove"/>
</nobr>
</TD>
</html:form>
13 years ago
Hi,
When I log into my application I also log into some devices by creating Session to that device. The max. sessions that can be opened to these devices is very low and the sessions have a very high timeout value (24hrs). For other users to be use these devices these sessions have to be explicitly cleaned or wait till they time out. So in my application when I logout I make sure I clean up these sessions. I m not sure how these sessions(to devices) are handled when a session(Tomcat session) times out and garbage collector removes it. So I always want to make sure that the clean up is done irrespective of how the Tomcat session terminates so that I don't reach the max. session limit on these devices.

The clean up is what I put in the valueUnBound method.

I hope it makes sense to you. Please feel free to let me know if I m not clear enough.

Thanks,

Param
13 years ago
Hi Marc,
That is a good question. I realized it minutes after posting my earlier response. The one suggested by Jeanne earlier will do any clean up after the session has been destroyed. I overlooked it while reading the API docs. I realized a while later that eventhough my method has been called it wasn't freeing up the resources since the Session has timed out.

I think what I really need to implement is the HttpSessionBindingListener interface and free up my resources using the
public void valueUnbound(HttpSessionBindingEvent event) method.
This method gets called just before the session is being timed out and I can put my code for freeing up resources in this method. Haven't tried it out yet.

Please let me know what you guys think about this. Thanks,

Param
13 years ago
Hi Jeanne,
Thanks for your response. It worked. I had a typo in giving the complete path of the Action class. Appreciate your help.

Param
13 years ago
I should have added in my earlier message that I added this to the web.xml of my application

<listener>
<listener-class>LogoutAction</listener-class>
</listener>
13 years ago
Thanks for your quick reply. I tried to do it this way. I made my LogoutAction class implement HttpSessionListener and wasn't successful. Is there a problem with doing it that way.
13 years ago
Hi Everyone,
I need some help on something I m working on. I am developing a web application using Struts and Tomcat 5.0.28 as Web Server. When the User logs into the application I logon to another resource and I maintain a connection to that resource which I make sure to terminate when the user clicks on the Logout button. This is taken care of in the LogoutAction class developed using Struts. However, there are instances where the user might not click logout and the Web Server times out the session. In that case the resources are still being used up since the user never clicked on the Logout and the LogoutAction class never got invoked

Is there a way I could make sure that the Logout Action class gets invoked if the session times out or is there a location (similar to finalize method in Garbage collection) where I can place the Logout specific code that would free up the resources.

Your thoughts on this would be appreciated. Thanks in advance,

Param Yanamandra
13 years ago
Thanks Ernest for making it clear. That answers my question. I think that as long as all variables are local variables it doesn't matter whether the class is static or instance. They have their own stack trace and hence are thread safe.

Param
13 years ago
Hi,
I have a Utility class with all static methods. By definition, static means only one instance.I m working on a multi-threaded application where I m using these static methods to do some work for me. I m making sure that I m not declaring and class level variables and restricting variables to the methods for thread safety. I m also making sure the object references are not available outside of the method. I m hoping this would make my variables created in these static methods not accessible from outside threads.

I don't quite understand how a static method with only one instance could handle multiple threads safely. I know all method variables are placed in a stack and each thread has its own stack. But, does it mean there are multiple instances of these methods or are they accessing the only instance of the method. I would appreciate your thoughts on this topic.

Thanks,
Param
13 years ago
Hi all,
I m trying to run a sample EJB application using JBoss 3.2.3 as the server. The client and server are running on two different machines and my client side code throws the following exception
Exception in thread "main" javax.naming.CommunicationException: Can't find SerialContextProvider
I made sure that all the required files j2ee.jar jboss-common.jar jboss.jar jnpserver.jar log4j.jar along with the jndi.properties file in the client classpath but I m still getting the same problem. I tried with and without j2ee.jar in the classpath and still got the same problem.
Can somebody please let me know where the problem might be. Thanks in advance
Param
13 years ago
Thanks Stan,
I checked out this tool and found it very useful. Do you know of any other tools.
13 years ago
Hi All,
I am looking for a tool that analyzes Java/C++ source code to identify design and other issues associated with the code. The tool should be able to identify the reusability ,extensibility of the source code with good report generation features.
I did some lookup on the internet and found some tools like JDepend, Lexient Surveyor.
If any of you came across tools like this and have any suggestions, it would be appreciated
Thanks in advance,
Param
13 years ago