users@jersey.java.net

[Jersey] Re: Ordering of providers (bean validation vs custom InjectionResolver)

From: Miles, Eric (CONT) <"Miles,>
Date: Fri, 11 Oct 2013 15:47:30 -0400

Move along…there is nothing to see here.

User error on the implementation of the validator. Thanks anyways folks!

From: <Miles>, "Miles, Eric (CONT)" <eric.miles_at_capitalone.com<mailto:eric.miles_at_capitalone.com>>
Reply-To: Jersey Users <users_at_jersey.java.net<mailto:users_at_jersey.java.net>>
Date: Thursday, October 10, 2013 2:29 PM
To: Jersey Users <users_at_jersey.java.net<mailto:users_at_jersey.java.net>>
Subject: [Jersey] Ordering of providers (bean validation vs custom InjectionResolver)

I have a custom constraint that I placed on a Resource that also leverages a custom InjectionResolver. Before the constraints were added, the resource (and custom injection resolver) worked fine. Once the constraints were added, the service is failing. It appears validation is transpiring before my custom injection resolver is doing it's business. Any recommendations on how to fix this? I've attempted to use priorities on Binding, but that's not helping.

Jersey 2.3.1

ResourceConfig:


        register(new SearchObjectInjectionResolver.Binder(), Priorities.USER);




InjectionResolver binder:

    public static final class Binder extends AbstractBinder {

        @Override

        protected void configure() {

            bind(SearchObjectInjectionResolver.class).to(new TypeLiteral<InjectionResolver<SearchObject>>() {

            }).in(Singleton.class);

        }

    }

Resource:

    public EntityCollectionResponse<Atm> getMany(

            @RequiredAtmSearchObject @BeanParam EntityCollectionRequest<Atm> entityCollectionRequest) {


How do I force validation to transpire after ALL injection has taken place?

Thanks in advance,
Eric Miles

________________________________

The information contained in this e-mail is confidential and/or proprietary to Capital One and/or its affiliates. The information transmitted herewith is intended only for use by the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.
________________________________________________________

The information contained in this e-mail is confidential and/or proprietary to Capital One and/or its affiliates. The information transmitted herewith is intended only for use by the individual or entity to which it is addressed. If the reader of this message is not the intended recipient, you are hereby notified that any review, retransmission, dissemination, distribution, copying or other use of, or taking of any action in reliance upon this information is strictly prohibited. If you have received this communication in error, please contact the sender and delete the material from your computer.