Sameer Malhotra

Greenhorn
+ Follow
since Jul 30, 2008
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 Sameer Malhotra

Hi,

I want to add SSL security in the Database layer. I am using Struts2.1.6, Spring 2.5, JBOSS 5.0 and Informix 11.5. Any idea how to do this?

I have researched through a lot on the internet but could not find any solution.

Please suggest!

Here is my datasource and entity manager beans which is working perfect without SSL:

14 years ago
I am working on a java application(Batch Process) and we have to use some third party API's (No Option to change it) related to the Database.It is causing out of memory after every 25000 updates and the total records are 5 million or so. I used the JProfiler to find out that the out of memory is caused by the third party API only.Since the application is in the production already we really cannot risk to change that third party API at any cost so we have to do some work around.

What is the best work around in this scenario? I am thinking to create separate thread in the below mentioned code which will do the first 20000 updates and as soon as this thread dies all the objects associated with this will also die and hence the new thread will be a fresh start and again the new thread will do 20000 updates or something like that.

If you have encountered such kind of problem in the past please help me and if possible write a pseudo code or sample code for it.

my current code looks like this which I am thinking to add the java threads:

public static void main(String [] args){

*ResultSet* rs (rs has all the records e.g. 5 millions)
long count=0;
while (rs.next()){

doUpdate();

count++;
*//the code fails if the count reaches to 25000*

}


}


Please do let me know what do you think my solution and if there is any better way please suggest.
14 years ago
Hi I am using struts 2.1.6 and there is a requirement where I need to use tabs. These tab values are stored in the database and from there I have to grab them and according to those tabs I have to display the underlying content. If I press tab1 the content should come from the database and display it there.

Is there anybody who has done that kind of thing? Please give me some suggestions and if possible the steps to do it. I would really appreciate.

If I could get a sample code that would be really great!
14 years ago
cheers everyone

Very Simple Question

I wrote the following java script code. I am not sure whether it will work or not

<script>
function deleteUser(url) {
var msg = confirm("Do you really want to delete the given selected user ?")
if (msg) {window.location.href = site}
else (null)
}
</script>



I have a piece of code which I wanna use

<s:url id="deleteUrl" action="deleteUser" namespace="user">
<s aram name="user.userID" value="userID" />
</s:url>
<s:a href="%{deleteUrl}">
<s:text name="Delete" />
</s:a></td>

But before calling the action deleteUser I want to use a confirmation message something like using the above java script. Which will promt to the user does he really want to delete the user and then I can call the deleteUser Struts action.

Please help me on that or suggest me how should I do it. It might be easier for you but not for me.

If possible post a sample code where somebody has done something like this.

Thanks everybody for reading this post.
15 years ago