users@jersey.java.net

[Jersey] Re: Jersey 2.16: Package Scanning

From: DiFrango, Ronald (CONT) <"DiFrango,>
Date: Mon, 16 Feb 2015 13:00:46 -0500

All,

So I did a little bit of debugging, and my actual resources *are* being scanned in, but not the sub-resources which is in a child package. Now, I do have two statements in my resource hierarchy like:

packages("com.myorg.commons.web.filter");
packages("com.myorg.api.examples.simple.rest");

I've also tried registering them in one shot like:

packages("com.myorg.api.commons.web.filter", "com.myorg.api.examples.simple.rest", "com.myorg.api.examples.simple.rest.sub");

The context is initialized like follows:

<servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
                                <init-param>
                                                <param-name>javax.ws.rs.Application</param-name>
                                                <param-value>com.myorg.api.examples.simple.rest.config.ResourceConfig</param-value>
                                </init-param>

Again, this worked just fine until 2.16 so it's either the registration process changed and I need to change our code, or there is a bug somewhere. I'm going to still try and debug to see where this might be occurring.

Thanks,

Ron


From: DiFrango, Ronald (CONT) [mailto:Ronald.DiFrango_at_capitalone.com]
Sent: Monday, February 16, 2015 12:05 PM
To: users_at_jersey.java.net
Subject: [Jersey] Jersey 2.16: Package Scanning

All,

I'm in the process of trying to upgrade to Jersey 2.16 and what I *think*, I'm seeing is that package scanning is no longer working. Basically, we have a series of filters that are marked with @Named and @Provider and we scan them in with:

packages("com.myorg.api.commons.web");

In particular we have a filter that sets the status to 201 for a POST operation and the integration tests we have are failing because this filter is NOT kicking in.

Is this expected or am I missing something?

Thanks,

Ron


________________________________

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.