These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: CMT, Hibernate, Validation
PostPosted: Mon Feb 27, 2006 5:21 pm 
Newbie

Joined: Mon Feb 27, 2006 3:21 pm
Posts: 1
Location: Russia, Moscow
There are some questions concerning the validation of data.
I use Hibernate + Session Bean which implementing DAO-pattern
(the server of attachments JBoss)
1) How to work over the exceptions in case the attribute
TransactionStrategy within jboss-service.xml file is set in
CMTTransactionFactory. As far as I understand, in that case the container
performs all the Transaction Managing functions. Can it really be that the
container itself intercepts all the exceptions thrown out by Hibernate? The
point is I'd like to carry out the validation of data on the level of
Hibernate. For example, the universality of a field is broken. The
exception ConstraintViolationException must throw. I try to
catch it at block, but in practice, the block is never carried out. But if
we look at log-file we'll see that the exception really appeared. How in
that case can I catch the exception and work it over? Or, if I want to do
so, only the case with using JTATransactionStrategy is possible?
2) Please give me the e-reference where I can find info on the validation
of data on the side of Hibernate with the use of Annotations. I've read the
documentation on Hibernate Annotations, but I still don't understand how
Validation Framework is organized. Could anybody set me a more detailed
example? I see how to set restrictions on bean-a characteristics using the
annotations. What's not clear is how to catch the unnecessary validation.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.