-->
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.  [ 3 posts ] 
Author Message
 Post subject: validateonexecution for ee5
PostPosted: Fri Oct 11, 2013 1:31 pm 
Newbie

Joined: Wed Oct 09, 2013 11:22 am
Posts: 4
What is required to get this annotation working on ee5.
Have included main hibernate jars and required dependants.
However valuation does not get called.
Have put annotation on interface and implementation both cases don't work.
In DTO parameter in ejb method annotated with Valid.
DTO getter method annotated with NotEmpty.
Container being used is WebLogic 10.3.6.

DTO
Code:
@NotEmpty
public String getMsisdn() {
   return mMsisdn;
}


EJB
Code:
@Stateless(name = "ValidationTest")
@ValidateOnExecution(type = ExecutableType.IMPLICIT)
public class ValidationTestBean implements ValidationTestLocal {

    public BooleanOutDTO isSubscriberActive(@Valid IsSubscriberActiveInDTO pInDTO) {
       return new BooleanOutDTO(true);
    }

}


Top
 Profile  
 
 Post subject: Re: validateonexecution for ee5
PostPosted: Mon Oct 14, 2013 3:16 am 
Hibernate Team
Hibernate Team

Joined: Sat Jan 24, 2009 12:46 pm
Posts: 388
@ValidateOnExecution is used for triggering validation via a CDI method interceptor in EE 7. Since CDI doesn't exist as of EE 5 just specifying the annotations won't have any effect. You could implement your own EJB method interceptor and register this four your beans you want to validate.

--Gunnar

_________________
Visit my blog at http://musingsofaprogrammingaddict.blogspot.com/


Top
 Profile  
 
 Post subject: Re: validateonexecution for ee5
PostPosted: Mon Oct 14, 2013 5:13 am 
Newbie

Joined: Wed Oct 09, 2013 11:22 am
Posts: 4
Thanks will do


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.