OK, thanks. Yes it's not a managed bean. On Wed, Dec 16, 2015 at 4:32 PM, Jean-Louis Monteiro < [email protected]> 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 <[email protected]> > 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 < > > [email protected]> 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 < > > [email protected] > > > > > > > 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 <[email protected]>: > > > > > > > > > No it's actually just a JAX-RS payload from a DTO. > > > > > > > > > > On Wed, Dec 16, 2015 at 3:30 PM, Jonathan S. Fisher < > > > > > [email protected]> wrote: > > > > > > > > > > > Is that on persist to the Database? > > > > > > > > > > > > On Wed, Dec 16, 2015 at 1:13 PM, sgjava <[email protected]> > 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
