You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by sgjava <sg...@gmail.com> on 2015/12/16 20:13:16 UTC

TomEE 7 bean validation

What's required to get bean validation working in TomEE 7? I tried:

    @NotNull
    private String hostName;

in one of my DTOs and it doesn't catch the null.



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/TomEE-7-bean-validation-tp4677232.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: TomEE 7 bean validation

Posted by Romain Manni-Bucau <rm...@gmail.com>.
@ValidateOnExecution?


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com>

2015-12-16 21:30 GMT+01:00 Jonathan S. Fisher <
jonathan@springventuregroup.com>:

> Is that on persist to the Database?
>
> On Wed, Dec 16, 2015 at 1:13 PM, sgjava <sg...@gmail.com> wrote:
>
> > What's required to get bean validation working in TomEE 7? I tried:
> >
> >     @NotNull
> >     private String hostName;
> >
> > in one of my DTOs and it doesn't catch the null.
> >
> >
> >
> > --
> > View this message in context:
> >
> http://tomee-openejb.979440.n4.nabble.com/TomEE-7-bean-validation-tp4677232.html
> > Sent from the TomEE Users mailing list archive at Nabble.com.
> >
>
> --
> Email Confidentiality Notice: The information contained in this
> transmission is confidential, proprietary or privileged and may be subject
> to protection under the law, including the Health Insurance Portability and
> Accountability Act (HIPAA). The message is intended for the sole use of the
> individual or entity to whom it is addressed. If you are not the intended
> recipient, you are notified that any use, distribution or copying of the
> message is strictly prohibited and may subject you to criminal or civil
> penalties. If you received this transmission in error, please contact the
> sender immediately by replying to this email and delete the material from
> any computer.
>

Re: TomEE 7 bean validation

Posted by Romain Manni-Bucau <rm...@gmail.com>.
by default ValidationExceptionMapper but you can override it implementing
the same mapper and setting in system properties
org.apache.cxf.jaxrs.validation.ValidationExceptionMapper.activated=false


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com>

2015-12-21 19:24 GMT+01:00 Steve Goldsmith <sg...@gmail.com>:

> Very cool, that works with DTO:
>
> 12/21/2015 13:13:33.577 [http-bio-57592-exec-1] DEBUG
> c.bhn.services.masblaster.OdnService - PostConstruct
> 12/21/2015 13:13:33.637 [http-bio-57592-exec-1] WARN
> o.a.c.j.v.ValidationExceptionMapper - OdnService.masVersion.arg0.transId:
> may not be null
> 12/21/2015 13:13:33.637 [http-bio-57592-exec-1] WARN
> o.a.c.j.v.ValidationExceptionMapper -
> OdnService.masVersion.arg0.customerGuid: may not be null
> 12/21/2015 13:13:33.637 [http-bio-57592-exec-1] WARN
> o.a.c.j.v.ValidationExceptionMapper - OdnService.masVersion.arg0.maxAgeMs:
> may not be null
> 12/21/2015 13:13:33.643 [http-bio-57592-exec-1] DEBUG
> c.b.s.m.ServerResponseLoggingFilter - Status: 400
> 12/21/2015 13:13:33.643 [http-bio-57592-exec-1] DEBUG
> c.b.s.m.ServerResponseLoggingFilter - Media type: null
> 12/21/2015 13:13:33.643 [http-bio-57592-exec-1] DEBUG
> c.b.s.m.ServerResponseLoggingFilter - Headers: {Date=[Mon, 21 Dec 2015
> 18:13:33 GMT]}
> 12/21/2015 13:13:33.643 [http-bio-57592-exec-1] DEBUG
> c.b.s.m.ServerResponseLoggingFilter - Entity: null
>
> Now, is there a on exception hook in order to control response? I want to
> return the DTO with the warnings.
>
>
> On Mon, Dec 21, 2015 at 12:34 PM, Romain Manni-Bucau <
> rmannibucau@gmail.com>
> wrote:
>
> > if your bean can be a CDI bean then it will be and benefit from bean
> > validation-cdi integration:
> >
> >
> >
> https://github.com/rmannibucau/demo-jaxrs-bval/blob/master/src/main/java/com/github/rmannibucau/demo/jaxrsbval/ValidMyParams.java
> > works as expected:
> >
> >
> https://github.com/rmannibucau/demo-jaxrs-bval/blob/master/src/main/java/com/github/rmannibucau/demo/jaxrsbval/ValidMyParams.java
> >
> >
> > Romain Manni-Bucau
> > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > <http://rmannibucau.wordpress.com> | Github <
> > https://github.com/rmannibucau> |
> > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> > <http://www.tomitribe.com>
> >
> > 2015-12-21 18:02 GMT+01:00 sgjava <sg...@gmail.com>:
> >
> > > I'm using simple DTOs that are sent from a REST client, where would CDI
> > > come
> > > into play in this scenario? There's no opportunity to @Inject them.
> > >
> > >
> > >
> > > --
> > > View this message in context:
> > >
> >
> http://tomee-openejb.979440.n4.nabble.com/TomEE-7-bean-validation-tp4677232p4677278.html
> > > Sent from the TomEE Users mailing list archive at Nabble.com.
> > >
> >
>
>
>
> --
> Steven P. Goldsmith
>

Re: TomEE 7 bean validation

Posted by Steve Goldsmith <sg...@gmail.com>.
Very cool, that works with DTO:

12/21/2015 13:13:33.577 [http-bio-57592-exec-1] DEBUG
c.bhn.services.masblaster.OdnService - PostConstruct
12/21/2015 13:13:33.637 [http-bio-57592-exec-1] WARN
o.a.c.j.v.ValidationExceptionMapper - OdnService.masVersion.arg0.transId:
may not be null
12/21/2015 13:13:33.637 [http-bio-57592-exec-1] WARN
o.a.c.j.v.ValidationExceptionMapper -
OdnService.masVersion.arg0.customerGuid: may not be null
12/21/2015 13:13:33.637 [http-bio-57592-exec-1] WARN
o.a.c.j.v.ValidationExceptionMapper - OdnService.masVersion.arg0.maxAgeMs:
may not be null
12/21/2015 13:13:33.643 [http-bio-57592-exec-1] DEBUG
c.b.s.m.ServerResponseLoggingFilter - Status: 400
12/21/2015 13:13:33.643 [http-bio-57592-exec-1] DEBUG
c.b.s.m.ServerResponseLoggingFilter - Media type: null
12/21/2015 13:13:33.643 [http-bio-57592-exec-1] DEBUG
c.b.s.m.ServerResponseLoggingFilter - Headers: {Date=[Mon, 21 Dec 2015
18:13:33 GMT]}
12/21/2015 13:13:33.643 [http-bio-57592-exec-1] DEBUG
c.b.s.m.ServerResponseLoggingFilter - Entity: null

Now, is there a on exception hook in order to control response? I want to
return the DTO with the warnings.


On Mon, Dec 21, 2015 at 12:34 PM, Romain Manni-Bucau <rm...@gmail.com>
wrote:

> if your bean can be a CDI bean then it will be and benefit from bean
> validation-cdi integration:
>
>
> https://github.com/rmannibucau/demo-jaxrs-bval/blob/master/src/main/java/com/github/rmannibucau/demo/jaxrsbval/ValidMyParams.java
> works as expected:
>
> https://github.com/rmannibucau/demo-jaxrs-bval/blob/master/src/main/java/com/github/rmannibucau/demo/jaxrsbval/ValidMyParams.java
>
>
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> <http://rmannibucau.wordpress.com> | Github <
> https://github.com/rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> <http://www.tomitribe.com>
>
> 2015-12-21 18:02 GMT+01:00 sgjava <sg...@gmail.com>:
>
> > I'm using simple DTOs that are sent from a REST client, where would CDI
> > come
> > into play in this scenario? There's no opportunity to @Inject them.
> >
> >
> >
> > --
> > View this message in context:
> >
> http://tomee-openejb.979440.n4.nabble.com/TomEE-7-bean-validation-tp4677232p4677278.html
> > Sent from the TomEE Users mailing list archive at Nabble.com.
> >
>



-- 
Steven P. Goldsmith

Re: TomEE 7 bean validation

Posted by Romain Manni-Bucau <rm...@gmail.com>.
if your bean can be a CDI bean then it will be and benefit from bean
validation-cdi integration:

https://github.com/rmannibucau/demo-jaxrs-bval/blob/master/src/main/java/com/github/rmannibucau/demo/jaxrsbval/ValidMyParams.java
works as expected:
https://github.com/rmannibucau/demo-jaxrs-bval/blob/master/src/main/java/com/github/rmannibucau/demo/jaxrsbval/ValidMyParams.java


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com>

2015-12-21 18:02 GMT+01:00 sgjava <sg...@gmail.com>:

> I'm using simple DTOs that are sent from a REST client, where would CDI
> come
> into play in this scenario? There's no opportunity to @Inject them.
>
>
>
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/TomEE-7-bean-validation-tp4677232p4677278.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

Re: TomEE 7 bean validation

Posted by sgjava <sg...@gmail.com>.
I'm using simple DTOs that are sent from a REST client, where would CDI come
into play in this scenario? There's no opportunity to @Inject them.



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/TomEE-7-bean-validation-tp4677232p4677278.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: TomEE 7 bean validation

Posted by Steve Goldsmith <sg...@gmail.com>.
Great, thanks!

On Sat, Dec 19, 2015 at 10:57 AM, Romain Manni-Bucau <rm...@gmail.com>
wrote:

>
> https://github.com/apache/bval/blob/trunk/bval-jsr/src/main/java/org/apache/bval/cdi/BValInterceptor.java
> is already there bit why not switching to cdi?
> Le 19 déc. 2015 16:34, "sgjava" <sg...@gmail.com> a écrit :
>
> > Is there an example of an interceptor doing bean validation?
> >
> >
> >
> > --
> > View this message in context:
> >
> http://tomee-openejb.979440.n4.nabble.com/TomEE-7-bean-validation-tp4677232p4677247.html
> > Sent from the TomEE Users mailing list archive at Nabble.com.
> >
>



-- 
Steven P. Goldsmith

Re: TomEE 7 bean validation

Posted by Romain Manni-Bucau <rm...@gmail.com>.
https://github.com/apache/bval/blob/trunk/bval-jsr/src/main/java/org/apache/bval/cdi/BValInterceptor.java
is already there bit why not switching to cdi?
Le 19 déc. 2015 16:34, "sgjava" <sg...@gmail.com> a écrit :

> Is there an example of an interceptor doing bean validation?
>
>
>
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/TomEE-7-bean-validation-tp4677232p4677247.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

Re: TomEE 7 bean validation

Posted by sgjava <sg...@gmail.com>.
Is there an example of an interceptor doing bean validation?



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/TomEE-7-bean-validation-tp4677232p4677247.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: TomEE 7 bean validation

Posted by Steve Goldsmith <sg...@gmail.com>.
OK, thanks. Yes it's not a managed bean.

On Wed, Dec 16, 2015 at 4:32 PM, Jean-Louis Monteiro <
jlmonteiro@tomitribe.com> wrote:

> If it's a plain DTO and unmanaged, adding Bean Validation annotations only
> won't help.
> I see some options there
>
> - get a Validator injected in your REST class and call manually validate on
> the DTO
> - Add @Valid in front of "final CustStbDto custStbDto" and use an
> interceptor to call the validator automatically.
>
> Hope it helps
> Jean-Louis
>
> --
> Jean-Louis Monteiro
> http://twitter.com/jlouismonteiro
> http://www.tomitribe.com
>
> On Wed, Dec 16, 2015 at 10:22 PM, Steve Goldsmith <sg...@gmail.com>
> wrote:
>
> > My service method looks like:
> >
> >     @Path("/getcustomerstbdata")
> >     @POST
> >     public final Response getCustomerSTBData(final CustStbDto
> custStbDto) {
> >      ...
> >         // Return response
> >         return response;
> >     }
> >
> > DTO annotated with @NotNull.
> >
> > On Wed, Dec 16, 2015 at 3:59 PM, Jonathan S. Fisher <
> > jonathan@springventuregroup.com> wrote:
> >
> > > Try adding @Valid before @PathParam to validate
> > >
> > > *Jonathan S. Fisher*
> > > *VP - Information Technology*
> > > *Spring Venture Group*
> > >
> > > On Wed, Dec 16, 2015 at 2:56 PM, Romain Manni-Bucau <
> > rmannibucau@gmail.com
> > > >
> > > wrote:
> > >
> > > > if your bean is a CDI bean you can activate bean validation on it
> using
> > > > standard bean validation-cdi integration
> > > >
> > > >
> > > > Romain Manni-Bucau
> > > > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > > > <http://rmannibucau.wordpress.com> | Github <
> > > > https://github.com/rmannibucau> |
> > > > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> > > > <http://www.tomitribe.com>
> > > >
> > > > 2015-12-16 21:54 GMT+01:00 Steve Goldsmith <sg...@gmail.com>:
> > > >
> > > > > No it's actually just a JAX-RS payload from a DTO.
> > > > >
> > > > > On Wed, Dec 16, 2015 at 3:30 PM, Jonathan S. Fisher <
> > > > > jonathan@springventuregroup.com> wrote:
> > > > >
> > > > > > Is that on persist to the Database?
> > > > > >
> > > > > > On Wed, Dec 16, 2015 at 1:13 PM, sgjava <sg...@gmail.com>
> wrote:
> > > > > >
> > > > > > > What's required to get bean validation working in TomEE 7? I
> > tried:
> > > > > > >
> > > > > > >     @NotNull
> > > > > > >     private String hostName;
> > > > > > >
> > > > > > > in one of my DTOs and it doesn't catch the null.
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > View this message in context:
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> http://tomee-openejb.979440.n4.nabble.com/TomEE-7-bean-validation-tp4677232.html
> > > > > > > Sent from the TomEE Users mailing list archive at Nabble.com.
> > > > > > >
> > > > > >
> > > > > > --
> > > > > > Email Confidentiality Notice: The information contained in this
> > > > > > transmission is confidential, proprietary or privileged and may
> be
> > > > > subject
> > > > > > to protection under the law, including the Health Insurance
> > > Portability
> > > > > and
> > > > > > Accountability Act (HIPAA). The message is intended for the sole
> > use
> > > of
> > > > > the
> > > > > > individual or entity to whom it is addressed. If you are not the
> > > > intended
> > > > > > recipient, you are notified that any use, distribution or copying
> > of
> > > > the
> > > > > > message is strictly prohibited and may subject you to criminal or
> > > civil
> > > > > > penalties. If you received this transmission in error, please
> > contact
> > > > the
> > > > > > sender immediately by replying to this email and delete the
> > material
> > > > from
> > > > > > any computer.
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Steven P. Goldsmith
> > > > >
> > > >
> > >
> > > --
> > > Email Confidentiality Notice: The information contained in this
> > > transmission is confidential, proprietary or privileged and may be
> > subject
> > > to protection under the law, including the Health Insurance Portability
> > and
> > > Accountability Act (HIPAA). The message is intended for the sole use of
> > the
> > > individual or entity to whom it is addressed. If you are not the
> intended
> > > recipient, you are notified that any use, distribution or copying of
> the
> > > message is strictly prohibited and may subject you to criminal or civil
> > > penalties. If you received this transmission in error, please contact
> the
> > > sender immediately by replying to this email and delete the material
> from
> > > any computer.
> > >
> >
> >
> >
> > --
> > Steven P. Goldsmith
> >
>



-- 
Steven P. Goldsmith

Re: TomEE 7 bean validation

Posted by Jean-Louis Monteiro <jl...@tomitribe.com>.
If it's a plain DTO and unmanaged, adding Bean Validation annotations only
won't help.
I see some options there

- get a Validator injected in your REST class and call manually validate on
the DTO
- Add @Valid in front of "final CustStbDto custStbDto" and use an
interceptor to call the validator automatically.

Hope it helps
Jean-Louis

--
Jean-Louis Monteiro
http://twitter.com/jlouismonteiro
http://www.tomitribe.com

On Wed, Dec 16, 2015 at 10:22 PM, Steve Goldsmith <sg...@gmail.com> wrote:

> My service method looks like:
>
>     @Path("/getcustomerstbdata")
>     @POST
>     public final Response getCustomerSTBData(final CustStbDto custStbDto) {
>      ...
>         // Return response
>         return response;
>     }
>
> DTO annotated with @NotNull.
>
> On Wed, Dec 16, 2015 at 3:59 PM, Jonathan S. Fisher <
> jonathan@springventuregroup.com> wrote:
>
> > Try adding @Valid before @PathParam to validate
> >
> > *Jonathan S. Fisher*
> > *VP - Information Technology*
> > *Spring Venture Group*
> >
> > On Wed, Dec 16, 2015 at 2:56 PM, Romain Manni-Bucau <
> rmannibucau@gmail.com
> > >
> > wrote:
> >
> > > if your bean is a CDI bean you can activate bean validation on it using
> > > standard bean validation-cdi integration
> > >
> > >
> > > Romain Manni-Bucau
> > > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > > <http://rmannibucau.wordpress.com> | Github <
> > > https://github.com/rmannibucau> |
> > > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> > > <http://www.tomitribe.com>
> > >
> > > 2015-12-16 21:54 GMT+01:00 Steve Goldsmith <sg...@gmail.com>:
> > >
> > > > No it's actually just a JAX-RS payload from a DTO.
> > > >
> > > > On Wed, Dec 16, 2015 at 3:30 PM, Jonathan S. Fisher <
> > > > jonathan@springventuregroup.com> wrote:
> > > >
> > > > > Is that on persist to the Database?
> > > > >
> > > > > On Wed, Dec 16, 2015 at 1:13 PM, sgjava <sg...@gmail.com> wrote:
> > > > >
> > > > > > What's required to get bean validation working in TomEE 7? I
> tried:
> > > > > >
> > > > > >     @NotNull
> > > > > >     private String hostName;
> > > > > >
> > > > > > in one of my DTOs and it doesn't catch the null.
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > View this message in context:
> > > > > >
> > > > >
> > > >
> > >
> >
> http://tomee-openejb.979440.n4.nabble.com/TomEE-7-bean-validation-tp4677232.html
> > > > > > Sent from the TomEE Users mailing list archive at Nabble.com.
> > > > > >
> > > > >
> > > > > --
> > > > > Email Confidentiality Notice: The information contained in this
> > > > > transmission is confidential, proprietary or privileged and may be
> > > > subject
> > > > > to protection under the law, including the Health Insurance
> > Portability
> > > > and
> > > > > Accountability Act (HIPAA). The message is intended for the sole
> use
> > of
> > > > the
> > > > > individual or entity to whom it is addressed. If you are not the
> > > intended
> > > > > recipient, you are notified that any use, distribution or copying
> of
> > > the
> > > > > message is strictly prohibited and may subject you to criminal or
> > civil
> > > > > penalties. If you received this transmission in error, please
> contact
> > > the
> > > > > sender immediately by replying to this email and delete the
> material
> > > from
> > > > > any computer.
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Steven P. Goldsmith
> > > >
> > >
> >
> > --
> > Email Confidentiality Notice: The information contained in this
> > transmission is confidential, proprietary or privileged and may be
> subject
> > to protection under the law, including the Health Insurance Portability
> and
> > Accountability Act (HIPAA). The message is intended for the sole use of
> the
> > individual or entity to whom it is addressed. If you are not the intended
> > recipient, you are notified that any use, distribution or copying of the
> > message is strictly prohibited and may subject you to criminal or civil
> > penalties. If you received this transmission in error, please contact the
> > sender immediately by replying to this email and delete the material from
> > any computer.
> >
>
>
>
> --
> Steven P. Goldsmith
>

Re: TomEE 7 bean validation

Posted by Jean-Louis Monteiro <jl...@tomitribe.com>.
Forgot this one for Java EE 7 indeed

--
Jean-Louis Monteiro
http://twitter.com/jlouismonteiro
http://www.tomitribe.com

On Wed, Dec 16, 2015 at 10:36 PM, Romain Manni-Bucau <rm...@gmail.com>
wrote:

> you dont like the @ValidateOnExecution solution?
>
> http://docs.oracle.com/javaee/7/api/javax/validation/executable/ValidateOnExecution.html
>
>
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> <http://rmannibucau.wordpress.com> | Github <
> https://github.com/rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> <http://www.tomitribe.com>
>
> 2015-12-16 22:33 GMT+01:00 Steve Goldsmith <sg...@gmail.com>:
>
> > Cool I'll try that, thanks.
> >
> > On Wed, Dec 16, 2015 at 4:30 PM, Jonathan S. Fisher <
> > jonathan@springventuregroup.com> wrote:
> >
> > > Ah, just try adding @Valid in front of the parameter.
> > >
> > > *Jonathan S. Fisher*
> > > *VP - Information Technology*
> > > *Spring Venture Group*
> > >
> > > On Wed, Dec 16, 2015 at 3:22 PM, Steve Goldsmith <sg...@gmail.com>
> > wrote:
> > >
> > > > My service method looks like:
> > > >
> > > >     @Path("/getcustomerstbdata")
> > > >     @POST
> > > >     public final Response getCustomerSTBData(final CustStbDto
> > > custStbDto) {
> > > >      ...
> > > >         // Return response
> > > >         return response;
> > > >     }
> > > >
> > > > DTO annotated with @NotNull.
> > > >
> > > > On Wed, Dec 16, 2015 at 3:59 PM, Jonathan S. Fisher <
> > > > jonathan@springventuregroup.com> wrote:
> > > >
> > > > > Try adding @Valid before @PathParam to validate
> > > > >
> > > > > *Jonathan S. Fisher*
> > > > > *VP - Information Technology*
> > > > > *Spring Venture Group*
> > > > >
> > > > > On Wed, Dec 16, 2015 at 2:56 PM, Romain Manni-Bucau <
> > > > rmannibucau@gmail.com
> > > > > >
> > > > > wrote:
> > > > >
> > > > > > if your bean is a CDI bean you can activate bean validation on it
> > > using
> > > > > > standard bean validation-cdi integration
> > > > > >
> > > > > >
> > > > > > Romain Manni-Bucau
> > > > > > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > > > > > <http://rmannibucau.wordpress.com> | Github <
> > > > > > https://github.com/rmannibucau> |
> > > > > > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> > > > > > <http://www.tomitribe.com>
> > > > > >
> > > > > > 2015-12-16 21:54 GMT+01:00 Steve Goldsmith <sg...@gmail.com>:
> > > > > >
> > > > > > > No it's actually just a JAX-RS payload from a DTO.
> > > > > > >
> > > > > > > On Wed, Dec 16, 2015 at 3:30 PM, Jonathan S. Fisher <
> > > > > > > jonathan@springventuregroup.com> wrote:
> > > > > > >
> > > > > > > > Is that on persist to the Database?
> > > > > > > >
> > > > > > > > On Wed, Dec 16, 2015 at 1:13 PM, sgjava <sg...@gmail.com>
> > > wrote:
> > > > > > > >
> > > > > > > > > What's required to get bean validation working in TomEE 7?
> I
> > > > tried:
> > > > > > > > >
> > > > > > > > >     @NotNull
> > > > > > > > >     private String hostName;
> > > > > > > > >
> > > > > > > > > in one of my DTOs and it doesn't catch the null.
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > --
> > > > > > > > > View this message in context:
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> http://tomee-openejb.979440.n4.nabble.com/TomEE-7-bean-validation-tp4677232.html
> > > > > > > > > Sent from the TomEE Users mailing list archive at
> Nabble.com.
> > > > > > > > >
> > > > > > > >
> > > > > > > > --
> > > > > > > > Email Confidentiality Notice: The information contained in
> this
> > > > > > > > transmission is confidential, proprietary or privileged and
> may
> > > be
> > > > > > > subject
> > > > > > > > to protection under the law, including the Health Insurance
> > > > > Portability
> > > > > > > and
> > > > > > > > Accountability Act (HIPAA). The message is intended for the
> > sole
> > > > use
> > > > > of
> > > > > > > the
> > > > > > > > individual or entity to whom it is addressed. If you are not
> > the
> > > > > > intended
> > > > > > > > recipient, you are notified that any use, distribution or
> > copying
> > > > of
> > > > > > the
> > > > > > > > message is strictly prohibited and may subject you to
> criminal
> > or
> > > > > civil
> > > > > > > > penalties. If you received this transmission in error, please
> > > > contact
> > > > > > the
> > > > > > > > sender immediately by replying to this email and delete the
> > > > material
> > > > > > from
> > > > > > > > any computer.
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > Steven P. Goldsmith
> > > > > > >
> > > > > >
> > > > >
> > > > > --
> > > > > Email Confidentiality Notice: The information contained in this
> > > > > transmission is confidential, proprietary or privileged and may be
> > > > subject
> > > > > to protection under the law, including the Health Insurance
> > Portability
> > > > and
> > > > > Accountability Act (HIPAA). The message is intended for the sole
> use
> > of
> > > > the
> > > > > individual or entity to whom it is addressed. If you are not the
> > > intended
> > > > > recipient, you are notified that any use, distribution or copying
> of
> > > the
> > > > > message is strictly prohibited and may subject you to criminal or
> > civil
> > > > > penalties. If you received this transmission in error, please
> contact
> > > the
> > > > > sender immediately by replying to this email and delete the
> material
> > > from
> > > > > any computer.
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Steven P. Goldsmith
> > > >
> > >
> > > --
> > > Email Confidentiality Notice: The information contained in this
> > > transmission is confidential, proprietary or privileged and may be
> > subject
> > > to protection under the law, including the Health Insurance Portability
> > and
> > > Accountability Act (HIPAA). The message is intended for the sole use of
> > the
> > > individual or entity to whom it is addressed. If you are not the
> intended
> > > recipient, you are notified that any use, distribution or copying of
> the
> > > message is strictly prohibited and may subject you to criminal or civil
> > > penalties. If you received this transmission in error, please contact
> the
> > > sender immediately by replying to this email and delete the material
> from
> > > any computer.
> > >
> >
> >
> >
> > --
> > Steven P. Goldsmith
> >
>

Re: TomEE 7 bean validation

Posted by Romain Manni-Bucau <rm...@gmail.com>.
you dont like the @ValidateOnExecution solution?
http://docs.oracle.com/javaee/7/api/javax/validation/executable/ValidateOnExecution.html


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com>

2015-12-16 22:33 GMT+01:00 Steve Goldsmith <sg...@gmail.com>:

> Cool I'll try that, thanks.
>
> On Wed, Dec 16, 2015 at 4:30 PM, Jonathan S. Fisher <
> jonathan@springventuregroup.com> wrote:
>
> > Ah, just try adding @Valid in front of the parameter.
> >
> > *Jonathan S. Fisher*
> > *VP - Information Technology*
> > *Spring Venture Group*
> >
> > On Wed, Dec 16, 2015 at 3:22 PM, Steve Goldsmith <sg...@gmail.com>
> wrote:
> >
> > > My service method looks like:
> > >
> > >     @Path("/getcustomerstbdata")
> > >     @POST
> > >     public final Response getCustomerSTBData(final CustStbDto
> > custStbDto) {
> > >      ...
> > >         // Return response
> > >         return response;
> > >     }
> > >
> > > DTO annotated with @NotNull.
> > >
> > > On Wed, Dec 16, 2015 at 3:59 PM, Jonathan S. Fisher <
> > > jonathan@springventuregroup.com> wrote:
> > >
> > > > Try adding @Valid before @PathParam to validate
> > > >
> > > > *Jonathan S. Fisher*
> > > > *VP - Information Technology*
> > > > *Spring Venture Group*
> > > >
> > > > On Wed, Dec 16, 2015 at 2:56 PM, Romain Manni-Bucau <
> > > rmannibucau@gmail.com
> > > > >
> > > > wrote:
> > > >
> > > > > if your bean is a CDI bean you can activate bean validation on it
> > using
> > > > > standard bean validation-cdi integration
> > > > >
> > > > >
> > > > > Romain Manni-Bucau
> > > > > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > > > > <http://rmannibucau.wordpress.com> | Github <
> > > > > https://github.com/rmannibucau> |
> > > > > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> > > > > <http://www.tomitribe.com>
> > > > >
> > > > > 2015-12-16 21:54 GMT+01:00 Steve Goldsmith <sg...@gmail.com>:
> > > > >
> > > > > > No it's actually just a JAX-RS payload from a DTO.
> > > > > >
> > > > > > On Wed, Dec 16, 2015 at 3:30 PM, Jonathan S. Fisher <
> > > > > > jonathan@springventuregroup.com> wrote:
> > > > > >
> > > > > > > Is that on persist to the Database?
> > > > > > >
> > > > > > > On Wed, Dec 16, 2015 at 1:13 PM, sgjava <sg...@gmail.com>
> > wrote:
> > > > > > >
> > > > > > > > What's required to get bean validation working in TomEE 7? I
> > > tried:
> > > > > > > >
> > > > > > > >     @NotNull
> > > > > > > >     private String hostName;
> > > > > > > >
> > > > > > > > in one of my DTOs and it doesn't catch the null.
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > --
> > > > > > > > View this message in context:
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> http://tomee-openejb.979440.n4.nabble.com/TomEE-7-bean-validation-tp4677232.html
> > > > > > > > Sent from the TomEE Users mailing list archive at Nabble.com.
> > > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > Email Confidentiality Notice: The information contained in this
> > > > > > > transmission is confidential, proprietary or privileged and may
> > be
> > > > > > subject
> > > > > > > to protection under the law, including the Health Insurance
> > > > Portability
> > > > > > and
> > > > > > > Accountability Act (HIPAA). The message is intended for the
> sole
> > > use
> > > > of
> > > > > > the
> > > > > > > individual or entity to whom it is addressed. If you are not
> the
> > > > > intended
> > > > > > > recipient, you are notified that any use, distribution or
> copying
> > > of
> > > > > the
> > > > > > > message is strictly prohibited and may subject you to criminal
> or
> > > > civil
> > > > > > > penalties. If you received this transmission in error, please
> > > contact
> > > > > the
> > > > > > > sender immediately by replying to this email and delete the
> > > material
> > > > > from
> > > > > > > any computer.
> > > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Steven P. Goldsmith
> > > > > >
> > > > >
> > > >
> > > > --
> > > > Email Confidentiality Notice: The information contained in this
> > > > transmission is confidential, proprietary or privileged and may be
> > > subject
> > > > to protection under the law, including the Health Insurance
> Portability
> > > and
> > > > Accountability Act (HIPAA). The message is intended for the sole use
> of
> > > the
> > > > individual or entity to whom it is addressed. If you are not the
> > intended
> > > > recipient, you are notified that any use, distribution or copying of
> > the
> > > > message is strictly prohibited and may subject you to criminal or
> civil
> > > > penalties. If you received this transmission in error, please contact
> > the
> > > > sender immediately by replying to this email and delete the material
> > from
> > > > any computer.
> > > >
> > >
> > >
> > >
> > > --
> > > Steven P. Goldsmith
> > >
> >
> > --
> > Email Confidentiality Notice: The information contained in this
> > transmission is confidential, proprietary or privileged and may be
> subject
> > to protection under the law, including the Health Insurance Portability
> and
> > Accountability Act (HIPAA). The message is intended for the sole use of
> the
> > individual or entity to whom it is addressed. If you are not the intended
> > recipient, you are notified that any use, distribution or copying of the
> > message is strictly prohibited and may subject you to criminal or civil
> > penalties. If you received this transmission in error, please contact the
> > sender immediately by replying to this email and delete the material from
> > any computer.
> >
>
>
>
> --
> Steven P. Goldsmith
>

Re: TomEE 7 bean validation

Posted by Steve Goldsmith <sg...@gmail.com>.
Cool I'll try that, thanks.

On Wed, Dec 16, 2015 at 4:30 PM, Jonathan S. Fisher <
jonathan@springventuregroup.com> wrote:

> Ah, just try adding @Valid in front of the parameter.
>
> *Jonathan S. Fisher*
> *VP - Information Technology*
> *Spring Venture Group*
>
> On Wed, Dec 16, 2015 at 3:22 PM, Steve Goldsmith <sg...@gmail.com> wrote:
>
> > My service method looks like:
> >
> >     @Path("/getcustomerstbdata")
> >     @POST
> >     public final Response getCustomerSTBData(final CustStbDto
> custStbDto) {
> >      ...
> >         // Return response
> >         return response;
> >     }
> >
> > DTO annotated with @NotNull.
> >
> > On Wed, Dec 16, 2015 at 3:59 PM, Jonathan S. Fisher <
> > jonathan@springventuregroup.com> wrote:
> >
> > > Try adding @Valid before @PathParam to validate
> > >
> > > *Jonathan S. Fisher*
> > > *VP - Information Technology*
> > > *Spring Venture Group*
> > >
> > > On Wed, Dec 16, 2015 at 2:56 PM, Romain Manni-Bucau <
> > rmannibucau@gmail.com
> > > >
> > > wrote:
> > >
> > > > if your bean is a CDI bean you can activate bean validation on it
> using
> > > > standard bean validation-cdi integration
> > > >
> > > >
> > > > Romain Manni-Bucau
> > > > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > > > <http://rmannibucau.wordpress.com> | Github <
> > > > https://github.com/rmannibucau> |
> > > > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> > > > <http://www.tomitribe.com>
> > > >
> > > > 2015-12-16 21:54 GMT+01:00 Steve Goldsmith <sg...@gmail.com>:
> > > >
> > > > > No it's actually just a JAX-RS payload from a DTO.
> > > > >
> > > > > On Wed, Dec 16, 2015 at 3:30 PM, Jonathan S. Fisher <
> > > > > jonathan@springventuregroup.com> wrote:
> > > > >
> > > > > > Is that on persist to the Database?
> > > > > >
> > > > > > On Wed, Dec 16, 2015 at 1:13 PM, sgjava <sg...@gmail.com>
> wrote:
> > > > > >
> > > > > > > What's required to get bean validation working in TomEE 7? I
> > tried:
> > > > > > >
> > > > > > >     @NotNull
> > > > > > >     private String hostName;
> > > > > > >
> > > > > > > in one of my DTOs and it doesn't catch the null.
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > View this message in context:
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> http://tomee-openejb.979440.n4.nabble.com/TomEE-7-bean-validation-tp4677232.html
> > > > > > > Sent from the TomEE Users mailing list archive at Nabble.com.
> > > > > > >
> > > > > >
> > > > > > --
> > > > > > Email Confidentiality Notice: The information contained in this
> > > > > > transmission is confidential, proprietary or privileged and may
> be
> > > > > subject
> > > > > > to protection under the law, including the Health Insurance
> > > Portability
> > > > > and
> > > > > > Accountability Act (HIPAA). The message is intended for the sole
> > use
> > > of
> > > > > the
> > > > > > individual or entity to whom it is addressed. If you are not the
> > > > intended
> > > > > > recipient, you are notified that any use, distribution or copying
> > of
> > > > the
> > > > > > message is strictly prohibited and may subject you to criminal or
> > > civil
> > > > > > penalties. If you received this transmission in error, please
> > contact
> > > > the
> > > > > > sender immediately by replying to this email and delete the
> > material
> > > > from
> > > > > > any computer.
> > > > > >
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Steven P. Goldsmith
> > > > >
> > > >
> > >
> > > --
> > > Email Confidentiality Notice: The information contained in this
> > > transmission is confidential, proprietary or privileged and may be
> > subject
> > > to protection under the law, including the Health Insurance Portability
> > and
> > > Accountability Act (HIPAA). The message is intended for the sole use of
> > the
> > > individual or entity to whom it is addressed. If you are not the
> intended
> > > recipient, you are notified that any use, distribution or copying of
> the
> > > message is strictly prohibited and may subject you to criminal or civil
> > > penalties. If you received this transmission in error, please contact
> the
> > > sender immediately by replying to this email and delete the material
> from
> > > any computer.
> > >
> >
> >
> >
> > --
> > Steven P. Goldsmith
> >
>
> --
> Email Confidentiality Notice: The information contained in this
> transmission is confidential, proprietary or privileged and may be subject
> to protection under the law, including the Health Insurance Portability and
> Accountability Act (HIPAA). The message is intended for the sole use of the
> individual or entity to whom it is addressed. If you are not the intended
> recipient, you are notified that any use, distribution or copying of the
> message is strictly prohibited and may subject you to criminal or civil
> penalties. If you received this transmission in error, please contact the
> sender immediately by replying to this email and delete the material from
> any computer.
>



-- 
Steven P. Goldsmith

Re: TomEE 7 bean validation

Posted by "Jonathan S. Fisher" <jo...@springventuregroup.com>.
Ah, just try adding @Valid in front of the parameter.

*Jonathan S. Fisher*
*VP - Information Technology*
*Spring Venture Group*

On Wed, Dec 16, 2015 at 3:22 PM, Steve Goldsmith <sg...@gmail.com> wrote:

> My service method looks like:
>
>     @Path("/getcustomerstbdata")
>     @POST
>     public final Response getCustomerSTBData(final CustStbDto custStbDto) {
>      ...
>         // Return response
>         return response;
>     }
>
> DTO annotated with @NotNull.
>
> On Wed, Dec 16, 2015 at 3:59 PM, Jonathan S. Fisher <
> jonathan@springventuregroup.com> wrote:
>
> > Try adding @Valid before @PathParam to validate
> >
> > *Jonathan S. Fisher*
> > *VP - Information Technology*
> > *Spring Venture Group*
> >
> > On Wed, Dec 16, 2015 at 2:56 PM, Romain Manni-Bucau <
> rmannibucau@gmail.com
> > >
> > wrote:
> >
> > > if your bean is a CDI bean you can activate bean validation on it using
> > > standard bean validation-cdi integration
> > >
> > >
> > > Romain Manni-Bucau
> > > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > > <http://rmannibucau.wordpress.com> | Github <
> > > https://github.com/rmannibucau> |
> > > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> > > <http://www.tomitribe.com>
> > >
> > > 2015-12-16 21:54 GMT+01:00 Steve Goldsmith <sg...@gmail.com>:
> > >
> > > > No it's actually just a JAX-RS payload from a DTO.
> > > >
> > > > On Wed, Dec 16, 2015 at 3:30 PM, Jonathan S. Fisher <
> > > > jonathan@springventuregroup.com> wrote:
> > > >
> > > > > Is that on persist to the Database?
> > > > >
> > > > > On Wed, Dec 16, 2015 at 1:13 PM, sgjava <sg...@gmail.com> wrote:
> > > > >
> > > > > > What's required to get bean validation working in TomEE 7? I
> tried:
> > > > > >
> > > > > >     @NotNull
> > > > > >     private String hostName;
> > > > > >
> > > > > > in one of my DTOs and it doesn't catch the null.
> > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > View this message in context:
> > > > > >
> > > > >
> > > >
> > >
> >
> http://tomee-openejb.979440.n4.nabble.com/TomEE-7-bean-validation-tp4677232.html
> > > > > > Sent from the TomEE Users mailing list archive at Nabble.com.
> > > > > >
> > > > >
> > > > > --
> > > > > Email Confidentiality Notice: The information contained in this
> > > > > transmission is confidential, proprietary or privileged and may be
> > > > subject
> > > > > to protection under the law, including the Health Insurance
> > Portability
> > > > and
> > > > > Accountability Act (HIPAA). The message is intended for the sole
> use
> > of
> > > > the
> > > > > individual or entity to whom it is addressed. If you are not the
> > > intended
> > > > > recipient, you are notified that any use, distribution or copying
> of
> > > the
> > > > > message is strictly prohibited and may subject you to criminal or
> > civil
> > > > > penalties. If you received this transmission in error, please
> contact
> > > the
> > > > > sender immediately by replying to this email and delete the
> material
> > > from
> > > > > any computer.
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Steven P. Goldsmith
> > > >
> > >
> >
> > --
> > Email Confidentiality Notice: The information contained in this
> > transmission is confidential, proprietary or privileged and may be
> subject
> > to protection under the law, including the Health Insurance Portability
> and
> > Accountability Act (HIPAA). The message is intended for the sole use of
> the
> > individual or entity to whom it is addressed. If you are not the intended
> > recipient, you are notified that any use, distribution or copying of the
> > message is strictly prohibited and may subject you to criminal or civil
> > penalties. If you received this transmission in error, please contact the
> > sender immediately by replying to this email and delete the material from
> > any computer.
> >
>
>
>
> --
> Steven P. Goldsmith
>

-- 
Email Confidentiality Notice: The information contained in this 
transmission is confidential, proprietary or privileged and may be subject 
to protection under the law, including the Health Insurance Portability and 
Accountability Act (HIPAA). The message is intended for the sole use of the 
individual or entity to whom it is addressed. If you are not the intended 
recipient, you are notified that any use, distribution or copying of the 
message is strictly prohibited and may subject you to criminal or civil 
penalties. If you received this transmission in error, please contact the 
sender immediately by replying to this email and delete the material from 
any computer.

Re: TomEE 7 bean validation

Posted by Steve Goldsmith <sg...@gmail.com>.
My service method looks like:

    @Path("/getcustomerstbdata")
    @POST
    public final Response getCustomerSTBData(final CustStbDto custStbDto) {
     ...
        // Return response
        return response;
    }

DTO annotated with @NotNull.

On Wed, Dec 16, 2015 at 3:59 PM, Jonathan S. Fisher <
jonathan@springventuregroup.com> wrote:

> Try adding @Valid before @PathParam to validate
>
> *Jonathan S. Fisher*
> *VP - Information Technology*
> *Spring Venture Group*
>
> On Wed, Dec 16, 2015 at 2:56 PM, Romain Manni-Bucau <rmannibucau@gmail.com
> >
> wrote:
>
> > if your bean is a CDI bean you can activate bean validation on it using
> > standard bean validation-cdi integration
> >
> >
> > Romain Manni-Bucau
> > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > <http://rmannibucau.wordpress.com> | Github <
> > https://github.com/rmannibucau> |
> > LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> > <http://www.tomitribe.com>
> >
> > 2015-12-16 21:54 GMT+01:00 Steve Goldsmith <sg...@gmail.com>:
> >
> > > No it's actually just a JAX-RS payload from a DTO.
> > >
> > > On Wed, Dec 16, 2015 at 3:30 PM, Jonathan S. Fisher <
> > > jonathan@springventuregroup.com> wrote:
> > >
> > > > Is that on persist to the Database?
> > > >
> > > > On Wed, Dec 16, 2015 at 1:13 PM, sgjava <sg...@gmail.com> wrote:
> > > >
> > > > > What's required to get bean validation working in TomEE 7? I tried:
> > > > >
> > > > >     @NotNull
> > > > >     private String hostName;
> > > > >
> > > > > in one of my DTOs and it doesn't catch the null.
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > View this message in context:
> > > > >
> > > >
> > >
> >
> http://tomee-openejb.979440.n4.nabble.com/TomEE-7-bean-validation-tp4677232.html
> > > > > Sent from the TomEE Users mailing list archive at Nabble.com.
> > > > >
> > > >
> > > > --
> > > > Email Confidentiality Notice: The information contained in this
> > > > transmission is confidential, proprietary or privileged and may be
> > > subject
> > > > to protection under the law, including the Health Insurance
> Portability
> > > and
> > > > Accountability Act (HIPAA). The message is intended for the sole use
> of
> > > the
> > > > individual or entity to whom it is addressed. If you are not the
> > intended
> > > > recipient, you are notified that any use, distribution or copying of
> > the
> > > > message is strictly prohibited and may subject you to criminal or
> civil
> > > > penalties. If you received this transmission in error, please contact
> > the
> > > > sender immediately by replying to this email and delete the material
> > from
> > > > any computer.
> > > >
> > >
> > >
> > >
> > > --
> > > Steven P. Goldsmith
> > >
> >
>
> --
> Email Confidentiality Notice: The information contained in this
> transmission is confidential, proprietary or privileged and may be subject
> to protection under the law, including the Health Insurance Portability and
> Accountability Act (HIPAA). The message is intended for the sole use of the
> individual or entity to whom it is addressed. If you are not the intended
> recipient, you are notified that any use, distribution or copying of the
> message is strictly prohibited and may subject you to criminal or civil
> penalties. If you received this transmission in error, please contact the
> sender immediately by replying to this email and delete the material from
> any computer.
>



-- 
Steven P. Goldsmith

Re: TomEE 7 bean validation

Posted by "Jonathan S. Fisher" <jo...@springventuregroup.com>.
Try adding @Valid before @PathParam to validate

*Jonathan S. Fisher*
*VP - Information Technology*
*Spring Venture Group*

On Wed, Dec 16, 2015 at 2:56 PM, Romain Manni-Bucau <rm...@gmail.com>
wrote:

> if your bean is a CDI bean you can activate bean validation on it using
> standard bean validation-cdi integration
>
>
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> <http://rmannibucau.wordpress.com> | Github <
> https://github.com/rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> <http://www.tomitribe.com>
>
> 2015-12-16 21:54 GMT+01:00 Steve Goldsmith <sg...@gmail.com>:
>
> > No it's actually just a JAX-RS payload from a DTO.
> >
> > On Wed, Dec 16, 2015 at 3:30 PM, Jonathan S. Fisher <
> > jonathan@springventuregroup.com> wrote:
> >
> > > Is that on persist to the Database?
> > >
> > > On Wed, Dec 16, 2015 at 1:13 PM, sgjava <sg...@gmail.com> wrote:
> > >
> > > > What's required to get bean validation working in TomEE 7? I tried:
> > > >
> > > >     @NotNull
> > > >     private String hostName;
> > > >
> > > > in one of my DTOs and it doesn't catch the null.
> > > >
> > > >
> > > >
> > > > --
> > > > View this message in context:
> > > >
> > >
> >
> http://tomee-openejb.979440.n4.nabble.com/TomEE-7-bean-validation-tp4677232.html
> > > > Sent from the TomEE Users mailing list archive at Nabble.com.
> > > >
> > >
> > > --
> > > Email Confidentiality Notice: The information contained in this
> > > transmission is confidential, proprietary or privileged and may be
> > subject
> > > to protection under the law, including the Health Insurance Portability
> > and
> > > Accountability Act (HIPAA). The message is intended for the sole use of
> > the
> > > individual or entity to whom it is addressed. If you are not the
> intended
> > > recipient, you are notified that any use, distribution or copying of
> the
> > > message is strictly prohibited and may subject you to criminal or civil
> > > penalties. If you received this transmission in error, please contact
> the
> > > sender immediately by replying to this email and delete the material
> from
> > > any computer.
> > >
> >
> >
> >
> > --
> > Steven P. Goldsmith
> >
>

-- 
Email Confidentiality Notice: The information contained in this 
transmission is confidential, proprietary or privileged and may be subject 
to protection under the law, including the Health Insurance Portability and 
Accountability Act (HIPAA). The message is intended for the sole use of the 
individual or entity to whom it is addressed. If you are not the intended 
recipient, you are notified that any use, distribution or copying of the 
message is strictly prohibited and may subject you to criminal or civil 
penalties. If you received this transmission in error, please contact the 
sender immediately by replying to this email and delete the material from 
any computer.

Re: TomEE 7 bean validation

Posted by Romain Manni-Bucau <rm...@gmail.com>.
if your bean is a CDI bean you can activate bean validation on it using
standard bean validation-cdi integration


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com>

2015-12-16 21:54 GMT+01:00 Steve Goldsmith <sg...@gmail.com>:

> No it's actually just a JAX-RS payload from a DTO.
>
> On Wed, Dec 16, 2015 at 3:30 PM, Jonathan S. Fisher <
> jonathan@springventuregroup.com> wrote:
>
> > Is that on persist to the Database?
> >
> > On Wed, Dec 16, 2015 at 1:13 PM, sgjava <sg...@gmail.com> wrote:
> >
> > > What's required to get bean validation working in TomEE 7? I tried:
> > >
> > >     @NotNull
> > >     private String hostName;
> > >
> > > in one of my DTOs and it doesn't catch the null.
> > >
> > >
> > >
> > > --
> > > View this message in context:
> > >
> >
> http://tomee-openejb.979440.n4.nabble.com/TomEE-7-bean-validation-tp4677232.html
> > > Sent from the TomEE Users mailing list archive at Nabble.com.
> > >
> >
> > --
> > Email Confidentiality Notice: The information contained in this
> > transmission is confidential, proprietary or privileged and may be
> subject
> > to protection under the law, including the Health Insurance Portability
> and
> > Accountability Act (HIPAA). The message is intended for the sole use of
> the
> > individual or entity to whom it is addressed. If you are not the intended
> > recipient, you are notified that any use, distribution or copying of the
> > message is strictly prohibited and may subject you to criminal or civil
> > penalties. If you received this transmission in error, please contact the
> > sender immediately by replying to this email and delete the material from
> > any computer.
> >
>
>
>
> --
> Steven P. Goldsmith
>

Re: TomEE 7 bean validation

Posted by Steve Goldsmith <sg...@gmail.com>.
No it's actually just a JAX-RS payload from a DTO.

On Wed, Dec 16, 2015 at 3:30 PM, Jonathan S. Fisher <
jonathan@springventuregroup.com> wrote:

> Is that on persist to the Database?
>
> On Wed, Dec 16, 2015 at 1:13 PM, sgjava <sg...@gmail.com> wrote:
>
> > What's required to get bean validation working in TomEE 7? I tried:
> >
> >     @NotNull
> >     private String hostName;
> >
> > in one of my DTOs and it doesn't catch the null.
> >
> >
> >
> > --
> > View this message in context:
> >
> http://tomee-openejb.979440.n4.nabble.com/TomEE-7-bean-validation-tp4677232.html
> > Sent from the TomEE Users mailing list archive at Nabble.com.
> >
>
> --
> Email Confidentiality Notice: The information contained in this
> transmission is confidential, proprietary or privileged and may be subject
> to protection under the law, including the Health Insurance Portability and
> Accountability Act (HIPAA). The message is intended for the sole use of the
> individual or entity to whom it is addressed. If you are not the intended
> recipient, you are notified that any use, distribution or copying of the
> message is strictly prohibited and may subject you to criminal or civil
> penalties. If you received this transmission in error, please contact the
> sender immediately by replying to this email and delete the material from
> any computer.
>



-- 
Steven P. Goldsmith

Re: TomEE 7 bean validation

Posted by "Jonathan S. Fisher" <jo...@springventuregroup.com>.
Is that on persist to the Database?

On Wed, Dec 16, 2015 at 1:13 PM, sgjava <sg...@gmail.com> wrote:

> What's required to get bean validation working in TomEE 7? I tried:
>
>     @NotNull
>     private String hostName;
>
> in one of my DTOs and it doesn't catch the null.
>
>
>
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/TomEE-7-bean-validation-tp4677232.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

-- 
Email Confidentiality Notice: The information contained in this 
transmission is confidential, proprietary or privileged and may be subject 
to protection under the law, including the Health Insurance Portability and 
Accountability Act (HIPAA). The message is intended for the sole use of the 
individual or entity to whom it is addressed. If you are not the intended 
recipient, you are notified that any use, distribution or copying of the 
message is strictly prohibited and may subject you to criminal or civil 
penalties. If you received this transmission in error, please contact the 
sender immediately by replying to this email and delete the material from 
any computer.