Hibernate Books

All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Static Validator instance - Performance - Threadsafety
PostPosted: Wed Dec 23, 2009 3:18 am 
Newbie

Joined: Wed Nov 18, 2009 5:30 am
Posts: 10
Is creating validator instance performance critical? I know from specification that ValidatorFactory is thread safe so i can make it static but Validator instance is not, so it cannot be static. Do you think validator instance should be created carefully i.e. only when needed?

Thanks


Top
 Profile  
 
 Post subject: Re: Static Validator instance - Performance - Threadsafety
PostPosted: Wed Dec 23, 2009 6:33 am 
Newbie

Joined: Wed Nov 18, 2009 5:30 am
Posts: 10
OK, So according to specs, Validator is thread safe but it does not recommend clients to cache instead factory should cache it. So i think creating a new Validator should not be performance critical.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

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.