Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!

Vivek Alampally

Ranch Hand
+ Follow
since Jul 10, 2008
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Vivek Alampally

Thank you all for your responses.. I did go through all your links and experimented with smaller xms & xmx values..I will get back and post here if I find more appropriate solution for releasing the unused (heap) memory..

7 years ago

I have a question regarding memory usage of java web applications..

In Task manager, Tomcat service seems to occupy 8,677,544,000 Bytes of memory

In jvisualvm, memory usage of the java application deployed under that Tomcat service is as follows

Used: 2,304,233,184 B
Size: 8,589,934,592 B
Max: 10,737,418,240 B

Used: 80,272,056 B
Size: 536,870,912 B
Max: 536,870,912 B

Memory Parameters which I have configured in Tomcat's Service.bat file:


Now, my question is no matter what I set MaxHeapFreeRatio the free space is not shrinking evenhough the used space is shrinking at times.

Can anyone, kindly tell me why is this behaving like this.. Is there a way to shrink the free space so that other processes runnning on the system can utilize it?

I am using latest versions of JDK 1.7 & Tomcat 7..

7 years ago
Thanks Ivan Krizsan,
I will try to implement your idea using Apache CXF and get back to you on this.
9 years ago
By connection info, I mean some exception (connection not found or connection timed out). So basically my question is-
What needs to be done to my application to start up succeessfully, when the web service itself is down.

I cannot continuously monitor web services wheather my web services are active, right?
9 years ago
Hi All,
If I have Webervices deployed on server A, and my application which is using web services is deployed on Server B then if A is down for some reason, How do I start application on B.

I am using CXF as a web service implementation language. When I start my application which uses webservices I am getting exception regarding the connection info.

Please give your comments!!
9 years ago
Hi All,
I am really tired of finding a solution for this. So can anyone please help me solve this issue.

Let's say I have,
Collection <Person> persons = new LinkedList<Person>();
where Person is a Class having three attributes.
After adding three Person objects to 'persons collection'

I am setting request attribute as
request.setAttribute("persons", persons)

In jsp for a (custom) tag I am setting as


This works,

But same thing in freemarker, I am unable to do that.

I tried items="${r\"${persons}\"}" , but I couldnot make it work.

So in one sentence how do you represent a el expression in freemarker.

I have a question regarding Freemarker 2.3.18 jar file.

I am using Struts, and freemarker. I have my messages defined in file.

Some messages in my properties file have placeholder specified like this

{0} is a template language

I could able to get the message displayed on UI by supplying the value for placeholder with Freemarker 2.3.16 jar file.


Where m is a loop Variable of messages (<#assign messages = request.getAttribute("org.apache.struts.action.ACTION_MESSAGE")?if_exists >)
bundle is static ResourceBundleModel rs = new ResourceBundleModel(ResourceBundle.getBundle("ApplicationResources"),new BeansWrapper());
I am populating bundle like this ((SimpleHash) data).put("bundle", rsbm); and here data is a variable of TemplateModel

When I replaced Freemarker 2.3.16 jar file with Freemarker 2.3.18 jar file. I am getting message as,

[Ljava.lang.Object;@12a520b8 is a template language

When I debugged using source code of ResourceBundleModel class in freemarker 2.3.16 & 2.3.18 jar files, the messages which I got are as follows ,

arguments value in
public Object exec(List arguments) method is showing the passed placeholder value as [Ljava.lang.Object;@12a520b8 and

public Object exec(List arguments) method is showing the correct placeholder value like Freemarker

I will be thankful if anyone can help me in solving this issue.

I have posted this question on

Hi All,
I am using Spring MVC and Spring Security to implement a small application. I am relatively new in using both the technologies.

My problem is When a User enters some urls based on the some pattern, I want to intercept that using some things like controller/ a custom filter.
In that cusom filter/controller I will do checks and decide, what to do next like whether user should be allowed to pass to the requested url (based on access the user posses) ,whether he should be denied, whether he should be forwarded to some other page.

I am currently using filters defined by Spring Security to intercept URLS.

So, my question is

How to plug in custom filter like this to other existing filters?

I have other question also ,

What difference does it make, if I use a custom filter instead of controller method.

Let me know if you have any questions regarding the problem I have.

And, thanks for sharing your knowledge and valuable time.

I have posted this question on Spring official forum

9 years ago
Hi all,
I need to deploy 2 web projects on Tomcat in Eclipse. So what I need is I want to start project 2 only after project 1 starts. Can this be done, If yes can you please tell me how?

Vivekanand Alampally.
Hi I am getting the following exception while upgrading to CXF 2.4 from CXF 2.3.1
This happens only when I enable ws security configuration. Previously it was working fine.
I posted this issue in other forum. If this is against this forum's rules kindly excuse me.


And, can anyone here please tell me how to ask a question in apache's sites. Their I see one thing called user's mailing lists.So to ask a question should I directly send mail to that mail id?

I will be very thankful, if anyone can spend their time to solve this issue.


9 years ago
I will be posting this in Official Spring forum.

9 years ago
Hi All,
I am working on Spring security now. What it does is while the user logs in, at that time only it loads all the authorities which belong to that user. So my question is
How can we change(add/remove) the authorities of the user while in session. Dumb solution is add authority to the user and make him log out.
But I want a better solution without making a redirect to login page.

9 years ago
Hello everybody,

First of all, kindly look at my design,

I have two tables
T1(a,b,c,d)- a is primary key
T2(a,e) where (a,e) is composite primary key
a is the foreign key referencing T1(a)

T1 - T2 relationship is one to many.

So I created three classes
1. C1 for T1
It has five fields -
a,b,c,d, c2Set with setters & getters

2. C2 for T2
It has two fields- c1,c3 of type C1, C3 respectively- with setters & getters

3. C3 I am defining C3 to represent composite primary key of T2
It has two fields (a,e) with setters & getters

I am using following annotations to define hibernate mappings in classes C1,C2,C3 respectively




I have a problem when I am inserting(saving) data. Data into T1 is getting inserted but no insertion is happening in T2( which I think should happen automatically here) ?
Please tell me where I am doing things wrongly.
And, I want to learn more about Hibernate Annotations. Can anyone point me to some useful online resources.

And, is it good to separate a form bean from entity class?
Please tell me the resources where I can get to learn about design issues like this.


Thanks Rangana for your code. Sorry for being this late to respond. The problem was solved before itself. I did do minor modifications to my code. And now my e-mail goes direclty to inbox.

But can any body tell me, what all should I require to send e mail to person B from a Java program,
Answer I guess would be,

1. SMTP server name
2. User id & password of smtp server
3. Reciepient mail address

I am asking this question because I am still not sure what an SMTP server does. I know when I google about it there's a lot of theory involved with it. But can anybody tell
the process involved in it in three - four lines?
9 years ago