Prabhu Thopa

Greenhorn
+ Follow
since Dec 07, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Prabhu Thopa

Hi,

Did you find an answer to the problem?

We are using Hibernate on a project and ran into the same issues that u mentioned. The following article posted on java.net might be of interest to you:
http://today.java.net/pub/a/today/2005/01/14/tranhiber.html

As mentioned in this article and as confirmed by the answers posted on Hibernate's faqs, if you use CMT (declarative transaction management by container), then Hibernate has no role to play in transaction management. So calls to Hibernate Transaction api including tx.beginTransaction, commit, rollback etc need not (should not) be made. The container is responsible solely for transaction management.

So I would suggest that u markup the transaction attribute in ur deployment descriptor as required or requiresnew and remove all calls to Hibernate Transaction api.

HTH,

Regards

Prabhakar
Hi,

I am using the beanutils converter package for performing type conversions in my formbean. I also am using a custom converter for string to date conversions. I used the example code posted by Jason Menard on this forum for my custom converter.

the code works fine provided a valid date is submitted. But if an invalid value is entered or a null (no entry) is entered and the form submitted, the converter throws a java error. Ideally, an error would not be thrown, but the user would be warned that their entry was invalid or the conversion would not be attempted for empty entries.

One way to handle this problem seems to be to use javascript to prevent invalid dates from being submitted. But if I use server side validation, i am not able to get to the validation stage because beanutils kicks in and tries to convert all request parameters for non-string fields in my formbeans and throws errors whenever it is not able to convert these fields.

Is there a way of handling this?

Thanks for your help.

Regards

Prabhu