Hemant Thard

Ranch Hand
+ Follow
since Dec 23, 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 Hemant Thard

Thanks Richard.

This very well solved my problem.

Just tweaked a bit to make it case insensitive.

8 years ago

Tony Docherty wrote:
But that last option doesn't end in ma.gif it ends in ma.1gif so can you please be more specific about exactly what is allowed.

Yes, so the last option should not be filtered by the pattern.

In a nutshell, all ".gif" images except "ma.gif" should be filtered .


8 years ago
Hi All,

I am struggling with this problem from sometime.
My Requirement is :
I have a list of url against which i want to filter all gif images using regular expression. but if my url ends with ma.gif, i dont want to filter it.

Sample :
URL : "/BS/myImage/ma.gif" -- don't filter
URL : "/BS/myImage/ma1.gif" -- filter
URL : "/BS/myImage/1ma.gif" -- filter
URL : "/BS/myImage/ma.1gif" -- don't filter

Here is the code that i came up with

This works but exactly opposite to my requirement(except for last URL) . I can use if(! matcher.find()) , but the problem is that i can't change Code, just the pattern configuration.

Any help on this would be appreciable.

Thanks in Advance!!

8 years ago

See this is what the document says about join = fetch

With fetch="join" on a collection or single-valued association mapping, you will actually avoid the second SELECT (hence making the association or collection non-lazy), by using just one "bigger" outer (for nullable many-to-one foreign keys and collections) or inner (for not-null many-to-one foreign keys) join SELECT to get both the owning entity and the referenced entity or collection. If you use fetch="join" for more than one collection role for a particular entity instance (in "parallel"), you create a Cartesian product (also called cross join) and two (lazy or non-lazy) SELECT would probably be faster.

Hi geeta,

I think what you need is an optimistic lock on your person Object.
here is an article that tells you how you can apply optimistic lock on your bean.

Kunal Lakhani wrote:No reply

Hi Kunal,

EntityManager is for JPA what session is for hibernate.

check out this example.

Kunal Lakhani wrote:Hemant Thard, it works. Thanks.

But, i really don't know why the code given by me doesn't works.

The reason is that you cannot have 2 different object having same identifier in hibernate persistence context.

This is what the exception tells you.

NonUniqueObjectException: a different object with the same identifier value was already associated with the session:

Hi Kunal ,

The problem is because of this code

try copying all changes to sp and saveorUpdate it.

Hi Guys,

I need some advice on how to make multimedia 508 compliant.
one of my requirement is to make video player that runs on client browser to be 508 compliant. Its functionality like Pause, Play, forward, backward etc should be accessible by keyboard, very much like the way Youtube has implemented.

I am trying to find the solution for this for quite a while. I came across JW Player that says can be customized. though i am not sure of that.

Can anybody give me advice or pointers to achieve this functionality.

Help will be appreciated.

Thanks & Regards,

Nitin Gaur wrote:Came across this thread while searching JDBC vs JPA discussions.

I have batch application that fetches customer data (from multple tables), get it processed from an external app, stores the results back in same database (different set of tables). This batch has to run for around 100 thousand (100,000) customers.
We thought to use JPA with openJPA (sorry no hibernate) though no solid reason but it is proving to be slower than expected. Now, conteplating to switch to JDBC. Have not done JDBC test yet but inviting point of view if it is right approach?


My Suggestion would be to use Spring Batch. Check out some example on net.
9 years ago

Kunal Lakhani wrote:Can you post the complete exception?

Why do you want complete Exception. Tim has already posted the answer.
Hi Saurabh,

I can see the only 2 way for this to happen is

1. you are using new operator to initialize springWSEndpoint;
2. you are using Spring container to get instance of springWSEndpoint, but prior to this code snippet of yours, you are calling springWSEndpoint bean and setting springWSEndpointService to null (this happened to me once).

Can you test your application by making your springWSEndpoint bean scope as prototype and post your result.


9 years ago

Please post your cfg.xml file.

With this information, it will be difficult for us to predict what can be wrong in your code.

Hi Anirban,

Any particular reason why you have overridden hashcode method in your application.

Also can you please be more clear about this statement.

If I use saveorupdate() instead of merge, it saves a new object,detaches the old object and attaches the new obj. to the session.



Use Hibernate native Query language.