Deeps Mistry

Ranch Hand
+ Follow
since Jan 31, 2009
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
3
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Deeps Mistry

Hi,

I am trying to map a composite primary key and use it as a foreign key in a <set>.
Below is my hbm files -

CTBR.hbm.xml


CRA.hbm.xml



The error which i get on running is -



Can i not map composite primary key as a foreign key?

Thanks.

Tim Holloway wrote:The Firebug plugin for Firefox browser can display client requests and responses.



I tried using Firebug as well...but no luck!!!


In my action class, i put thread.sleep for more than 3 minutes, and the result was -- > a new request exactly after 3 minutes.
So is this a client issue? or do i need to do some kind of a configuration on application side?

Thanks
7 years ago

Tim Holloway wrote:It indicates that the client is re-submitting the request. You'll have to investigate the client to find out why, since HTTP servers don't send requests. Only responses.



I tried using Fiddler for investigating the client(browser), but i did not get any additional information.

How else can i investigate the client?


Thanks
7 years ago
I have noticed a pattern on my server.

It sends the multiple request exactly after 3 minutes.

What does this indicate?

Thanks
7 years ago
Hi,

Environment - tomcat 5.5
apache 2
Spring + Webworks+ hibernate

On performing a particular task which consists of heavily loaded data from the database, duplicate requests is being sent to the server.

I have Virtual Host + mod_jk implementation.
Also i have tested using Virtual Host+ mod_proxy, but still i am facing the same issue.

Is there any configuration on Tomcat/Apache side saying if "I do not receive any response , please resend the request" ?

Any thoughts ??

Many Thanks
7 years ago

Shankar Tanikella wrote:Hi Deeps,
Never worked on WebWorks. Have you seen this thread



Thanks for your quick reply.

In my case , it is reading webwork.i18n.encoding=ISO8859-1 in the FilterDispatcher.java.

I want it to bypass it for one particular request.


Thanks.
8 years ago

Mohana Rao Sv wrote:Imagining you were working with struts2. You can set this in struts.properties file.


if you want to override it to a particular request then you have to override FilterDispatcher(Use StrutsPrepareAndExecuteFilter).



We are using WebWorks.

I tried overriding FilterDispatcher with TestFilter.java.
In my web.xml I configured this filter for a particular request.
On request, doFilter() method of TestFilter does get called, but at the end , doFilter() method of FilterDispatcher gets called. So i end up without my encoding being changed.

Is this the right way to do it? I think I am doing something wrong.

Here is my code -




8 years ago
Hi,

I have an application with Web Work + Spring + Hibernate.

I have defined webwork.i18n.encoding=ISO8859-1 in webwork.properties file.

I chose 'ISO-8859-1' encoding because i wanted to save special characters in my database.

In one particular case, i send my request(form with hidden variables ) to a third party drafter..which has character encoding set to "UTF-8".

Now whenever i pass the request (which contains special characters) from my application to the third party, first time it shows the correct special character, but on subsequent request, it gives me a '?' or a rectangular box.

If we start a new browser instance everytime then it shows up properly.

I tried the following -
I tried to do in my filter


It does change the request encoding, till the time it calls FilterDispatcher.java where in it reads from webwork.properties and changes the character encoding back to "ISO-8895-1".

What should i do now?

Is there any way to tweak FilterDispatcher for one particular request?



Thanks.
8 years ago
Hi,

I need to pass List<Long> from hibernate to my stored procedure. Below is the code for the same -

Here is my query -



My stored procedure looks like this -


The exception is get is -


Is there something wrong with my stored procedure or the way i am passing the List to my stored procedure?

Thanks.

Hi All,

I am currently facing an issue with persisting an object in DB.
The scenario goes like this -

I want to update a bunch of records based on the user input.

First i save the input from the user in the DB as one row.
Then i call a procedure which selects the row based on some condition and fires an insert/update on the table.

In order to get the procedure the values, i do session.flush()..because only then will my procedure get the required row from the DB.

Is there any other way by which i can persist the object in the DB?

I did try saveOrUpdate(); but that did not work as i have parent/child relationship.


Thanks.

Hi All,

Currently to update a bulk of records , say around 2000,I first load the records in the session, iterate over it and then update it.
This is taking tremendous amount of time, say around 10-15 mins or so.

I was thinking of optimizing this part of the code.
After doing a research, i have found that we can do bulk updates in hibernate by setting the jdbc_batch_size in hibernate and then do session.flush() and session.clear().

I just want to know that in bulk updates a single query is fired for 'n' records (where n in the number assigned to jdbc_batch_size) OR a query is fired for each record?

Also, if instead of using bulk updates, if i go forward with writing a procedure or a join sql query, which approach will give me better results performance wise?


Thanks.

Tim Holloway wrote:I believe that RHEL 6 comes with a Tomcat RPM. Although, as I've said before, Tomcat is one of the few system components that I prefer not to install via OS application package manager. In any event, RHEL is most definitely suited for hosting Tomcat. In fact. my production systems are all based on one form of Red Hat or another.

I do recommend a 64-bit machine. Tomcat for Linux doesn't come in 32-bit/64-bit versions, although you might want to check on the JDKs available.



Ok cool..so my decision to go for RHEL 6 is good enough.

On googling, I found out various ways to tune Tomcat to have a better performance.

But is there a way to tune the Linux box in order to gain good performance?

Also, if i want to host multiple Tomcat servers on the same Linux box, how should i go about it? by using Apache?

How to improve the Linux box performance in this case?

Thanks
8 years ago
Hi,

Thanks for the reply ..
I was thinking of using red hat enterprise 6

Machine 32/64 bit??

Also, 32/64 bit tomcat 6??
8 years ago
Hi Everyone,

I am a newbie to Linux system.

I want to set up a Tomcat 6.x server on new Linux machine.
Can anyone give some pointers as to how should i go about with choosing the right OS , optimizing the tomcat performance by managing the memory ,different configurations to be done and so on..


Thanks
8 years ago
Hi All,

Is it possible to create an xml file using xsd + xstream ?


Thanks.