[jira] [Commented] (CXF-7467) WSDLManagerImpl requires privileged actions in order to work under a security manager

2017-08-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16119626#comment-16119626
 ] 

ASF GitHub Bot commented on CXF-7467:
-

GitHub user iweiss opened a pull request:

https://github.com/apache/cxf/pull/303

[CXF-7467] WSDLManagerImpl requires privileged actions in order to work 
under a security manager

This covers CXF 3.1

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/iweiss/cxf wsdl-secmanager-fixes

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cxf/pull/303.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #303


commit 8361f00a0de320e47ebb415dfda9997ba4faaf92
Author: Ingo Weiss 
Date:   2017-08-09T08:00:11Z

Fixes issues when using WSDL under a security manager




> WSDLManagerImpl requires privileged actions in order to work under a security 
> manager
> -
>
> Key: CXF-7467
> URL: https://issues.apache.org/jira/browse/CXF-7467
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-WS Runtime
>Affects Versions: 3.1.12
>Reporter: Ingo Weiss
>  Labels: security
>
> When using CXF and WSDL under a security manager, security related exceptions 
> are thrown, making initialisation of {{WSDLManagerImpl}} fail.
> {noformat}
> Caused by: java.security.AccessControlException: WFSM01: Permission check 
> failed (permission "("java.io.FilePermission" 
> "/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre/lib/wsdl.properties"
>  "read")" in code source "(vfs:/content/executorService.war/WEB-INF/classes 
> )" of "ModuleClassLoader for Module 
> "deployment.executorService.war" from Service Module Loader")
>   at 
> org.wildfly.security.manager.WildFlySecurityManager.checkPermission(WildFlySecurityManager.java:278)
>   at 
> org.wildfly.security.manager.WildFlySecurityManager.checkPermission(WildFlySecurityManager.java:175)
>   at java.lang.SecurityManager.checkRead(SecurityManager.java:888)
>   at 
> org.wildfly.security.manager.WildFlySecurityManager.checkRead(WildFlySecurityManager.java:350)
>   at java.io.FileInputStream.(FileInputStream.java:127)
>   at 
> javax.wsdl.factory.WSDLFactory.findFactoryImplName(WSDLFactory.java:243)
>   at javax.wsdl.factory.WSDLFactory.newInstance(WSDLFactory.java:60)
>   at org.apache.cxf.wsdl11.WSDLManagerImpl.(WSDLManagerImpl.java:84)
>   at org.apache.cxf.wsdl11.WSDLManagerImpl.(WSDLManagerImpl.java:80)
>   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>   at 
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
>   at 
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>   at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
>   at org.apache.cxf.bus.extension.Extension.load(Extension.java:249)
>   at org.apache.cxf.bus.extension.Extension.load(Extension.java:261)
>   at 
> org.apache.cxf.bus.extension.ExtensionManagerImpl.loadAndRegister(ExtensionManagerImpl.java:213)
>   at 
> org.apache.cxf.bus.extension.ExtensionManagerImpl.getBeanOfType(ExtensionManagerImpl.java:320)
>   at 
> org.apache.cxf.bus.extension.ExtensionManagerBus.getExtension(ExtensionManagerBus.java:215)
>   at 
> org.apache.cxf.jaxws.ServiceImpl.initializePorts(ServiceImpl.java:169)
>   at org.apache.cxf.jaxws.ServiceImpl.initialize(ServiceImpl.java:160)
>   at org.apache.cxf.jaxws.ServiceImpl.(ServiceImpl.java:129)
> ...
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7467) WSDLManagerImpl requires privileged actions in order to work under a security manager

2017-08-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16119627#comment-16119627
 ] 

ASF GitHub Bot commented on CXF-7467:
-

GitHub user iweiss opened a pull request:

https://github.com/apache/cxf/pull/304

[CXF-7467] WSDLManagerImpl requires privileged actions in order to work 
under a security manager

This covers CXF 3.2.

CXF 3.1 PR: https://github.com/apache/cxf/pull/303

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/iweiss/cxf wsdl-secmanager-fixes_3.2

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cxf/pull/304.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #304


commit 5d62df5f0eb20089d29c47e4691e4146bbc685cf
Author: Ingo Weiss 
Date:   2017-08-09T09:26:27Z

[CXF-7467] WSDLManagerImpl requires privileged actions in order to work 
under a security manager

This covers CXF 3.2.

CXF 3.1 PR: https://github.com/apache/cxf/pull/303




> WSDLManagerImpl requires privileged actions in order to work under a security 
> manager
> -
>
> Key: CXF-7467
> URL: https://issues.apache.org/jira/browse/CXF-7467
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-WS Runtime
>Affects Versions: 3.1.12
>Reporter: Ingo Weiss
>  Labels: security
>
> When using CXF and WSDL under a security manager, security related exceptions 
> are thrown, making initialisation of {{WSDLManagerImpl}} fail.
> {noformat}
> Caused by: java.security.AccessControlException: WFSM01: Permission check 
> failed (permission "("java.io.FilePermission" 
> "/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre/lib/wsdl.properties"
>  "read")" in code source "(vfs:/content/executorService.war/WEB-INF/classes 
> )" of "ModuleClassLoader for Module 
> "deployment.executorService.war" from Service Module Loader")
>   at 
> org.wildfly.security.manager.WildFlySecurityManager.checkPermission(WildFlySecurityManager.java:278)
>   at 
> org.wildfly.security.manager.WildFlySecurityManager.checkPermission(WildFlySecurityManager.java:175)
>   at java.lang.SecurityManager.checkRead(SecurityManager.java:888)
>   at 
> org.wildfly.security.manager.WildFlySecurityManager.checkRead(WildFlySecurityManager.java:350)
>   at java.io.FileInputStream.(FileInputStream.java:127)
>   at 
> javax.wsdl.factory.WSDLFactory.findFactoryImplName(WSDLFactory.java:243)
>   at javax.wsdl.factory.WSDLFactory.newInstance(WSDLFactory.java:60)
>   at org.apache.cxf.wsdl11.WSDLManagerImpl.(WSDLManagerImpl.java:84)
>   at org.apache.cxf.wsdl11.WSDLManagerImpl.(WSDLManagerImpl.java:80)
>   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>   at 
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
>   at 
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>   at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
>   at org.apache.cxf.bus.extension.Extension.load(Extension.java:249)
>   at org.apache.cxf.bus.extension.Extension.load(Extension.java:261)
>   at 
> org.apache.cxf.bus.extension.ExtensionManagerImpl.loadAndRegister(ExtensionManagerImpl.java:213)
>   at 
> org.apache.cxf.bus.extension.ExtensionManagerImpl.getBeanOfType(ExtensionManagerImpl.java:320)
>   at 
> org.apache.cxf.bus.extension.ExtensionManagerBus.getExtension(ExtensionManagerBus.java:215)
>   at 
> org.apache.cxf.jaxws.ServiceImpl.initializePorts(ServiceImpl.java:169)
>   at org.apache.cxf.jaxws.ServiceImpl.initialize(ServiceImpl.java:160)
>   at org.apache.cxf.jaxws.ServiceImpl.(ServiceImpl.java:129)
> ...
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7430) The logInputStream method of the LoggingInInterceptor fails if input stream size bigger than limit and PrettyPrint option is true.

2017-08-09 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16119746#comment-16119746
 ] 

ASF GitHub Bot commented on CXF-7430:
-

Github user asfgit closed the pull request at:

https://github.com/apache/cxf/pull/294


> The logInputStream method of the LoggingInInterceptor fails if input stream 
> size bigger than limit and PrettyPrint option is true.
> --
>
> Key: CXF-7430
> URL: https://issues.apache.org/jira/browse/CXF-7430
> Project: CXF
>  Issue Type: Bug
>Affects Versions: 3.0.10, 3.1.7, 3.1.8, 3.0.11, 3.1.9, 3.0.12, 3.0.13
>Reporter: Alex Korobko
>
> The logInputStream method of the LoggingInInterceptor class fails when the 
> input stream size is bigger than the limit variable value and PrettyPrint 
> option is set to true.
> The problem is:
> # In the logInputStream method of the LoggingInInterceptor class if the input 
> stream is bigger than limit (the default value of the limit variable defined 
> in the AbstractLoggingInterceptor  as 48 * 1024) the input stream is 
> truncated to the length of the limit value;
> # The logInputStream method of the LoggingInInterceptor class uses the 
> writePayload method of the AbstractLoggingInterceptor to log the payload of 
> the response; 
> # As the PrettyPrint option is true, the writePayload method attempts to use 
> the PrettyPrintXMLWriter class to log already truncated XML data and throws 
> exception.
> It seems like the issue could be resolved if the LoggingInInterceptor class 
> resets the PrettyPrint option to false every time if the input stream was 
> truncated. Or the same result would be achieved if contentType parameter of 
> the writePayload method is NOT set to 'xml' for truncated stream. 
> Additionally, the same solution should be propagated to all usages of the 
> writePayload method of the AbstractLoggingInterceptor class. 
> I faced this issue in my project that uses older version of the library, but 
> as I just found the exception could be handled by changes in code made by 
> commit 
> https://github.com/apache/cxf/commit/d5373a3e3d2219ce07526cfb92ff954b3382727e 
> so it is not relevant to latest sources anymore. But I think it is not a very 
> good way to handle it through handling exception.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7467) WSDLManagerImpl requires privileged actions in order to work under a security manager

2017-08-11 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16123235#comment-16123235
 ] 

ASF GitHub Bot commented on CXF-7467:
-

Github user asfgit closed the pull request at:

https://github.com/apache/cxf/pull/304


> WSDLManagerImpl requires privileged actions in order to work under a security 
> manager
> -
>
> Key: CXF-7467
> URL: https://issues.apache.org/jira/browse/CXF-7467
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-WS Runtime
>Affects Versions: 3.1.12
>Reporter: Ingo Weiss
>  Labels: security
>
> When using CXF and WSDL under a security manager, security related exceptions 
> are thrown, making initialisation of {{WSDLManagerImpl}} fail.
> {noformat}
> Caused by: java.security.AccessControlException: WFSM01: Permission check 
> failed (permission "("java.io.FilePermission" 
> "/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre/lib/wsdl.properties"
>  "read")" in code source "(vfs:/content/executorService.war/WEB-INF/classes 
> )" of "ModuleClassLoader for Module 
> "deployment.executorService.war" from Service Module Loader")
>   at 
> org.wildfly.security.manager.WildFlySecurityManager.checkPermission(WildFlySecurityManager.java:278)
>   at 
> org.wildfly.security.manager.WildFlySecurityManager.checkPermission(WildFlySecurityManager.java:175)
>   at java.lang.SecurityManager.checkRead(SecurityManager.java:888)
>   at 
> org.wildfly.security.manager.WildFlySecurityManager.checkRead(WildFlySecurityManager.java:350)
>   at java.io.FileInputStream.(FileInputStream.java:127)
>   at 
> javax.wsdl.factory.WSDLFactory.findFactoryImplName(WSDLFactory.java:243)
>   at javax.wsdl.factory.WSDLFactory.newInstance(WSDLFactory.java:60)
>   at org.apache.cxf.wsdl11.WSDLManagerImpl.(WSDLManagerImpl.java:84)
>   at org.apache.cxf.wsdl11.WSDLManagerImpl.(WSDLManagerImpl.java:80)
>   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>   at 
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
>   at 
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>   at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
>   at org.apache.cxf.bus.extension.Extension.load(Extension.java:249)
>   at org.apache.cxf.bus.extension.Extension.load(Extension.java:261)
>   at 
> org.apache.cxf.bus.extension.ExtensionManagerImpl.loadAndRegister(ExtensionManagerImpl.java:213)
>   at 
> org.apache.cxf.bus.extension.ExtensionManagerImpl.getBeanOfType(ExtensionManagerImpl.java:320)
>   at 
> org.apache.cxf.bus.extension.ExtensionManagerBus.getExtension(ExtensionManagerBus.java:215)
>   at 
> org.apache.cxf.jaxws.ServiceImpl.initializePorts(ServiceImpl.java:169)
>   at org.apache.cxf.jaxws.ServiceImpl.initialize(ServiceImpl.java:160)
>   at org.apache.cxf.jaxws.ServiceImpl.(ServiceImpl.java:129)
> ...
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7455) IndexOutOfBoundsException when message part is missing

2017-08-14 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7455?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16125421#comment-16125421
 ] 

ASF GitHub Bot commented on CXF-7455:
-

Github user semancik commented on the issue:

https://github.com/apache/cxf/pull/297
  
I was looking around how to construct a test for this. But I'm really 
puzzled. There seems to be very little documentation about writing tests. And I 
could not find any test that would be similar to what I'm trying to do.

I have SOAP message that is causing the exception. It is a SOAP response 
from the server. How do I create a simple test that just attempts to process 
the message, runs the interceptors and checks the processed message?


> IndexOutOfBoundsException when message part is missing
> --
>
> Key: CXF-7455
> URL: https://issues.apache.org/jira/browse/CXF-7455
> Project: CXF
>  Issue Type: Bug
>Affects Versions: 3.1.12
>Reporter: Radovan Semancik
>
> When SOAP response from the server does not include a part which is defined 
> in the WSDL, the the following exception is thrown:
> {code}
> Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
>   at java.util.ArrayList.rangeCheck(ArrayList.java:653)
>   at java.util.ArrayList.get(ArrayList.java:429)
>   at 
> org.apache.cxf.message.MessageContentsList.get(MessageContentsList.java:80)
>   at 
> org.apache.cxf.jaxws.interceptors.HolderInInterceptor.handleMessage(HolderInInterceptor.java:69)
> ...
> {code}
> Yes, this is violation of the specs. Parts should not be missing. However, 
> there are bad servers out there (e.g. Windows 2008 WinRM). Throwing exception 
> like this prohibits the client to handle the situation. Which breaks projects 
> such as winrm4j when talking to old windows boxes.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7371) Error creating a webservice with lambdas in the implementing class

2017-08-17 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7371?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16130646#comment-16130646
 ] 

ASF GitHub Bot commented on CXF-7371:
-

Github user asfgit closed the pull request at:

https://github.com/apache/cxf/pull/300


> Error creating a webservice with lambdas in the implementing class
> --
>
> Key: CXF-7371
> URL: https://issues.apache.org/jira/browse/CXF-7371
> Project: CXF
>  Issue Type: Bug
>Affects Versions: 3.1.11
>Reporter: Barnabas Bodnar
> Attachments: CXF-7371.zip
>
>
> Attempting to create a webservice, where the implementing class uses lambdas 
> in the method-bodies, fails with the following error:
> {quote}
> java.lang.IllegalStateException
> at 
> org.apache.cxf.wsdl.service.factory.ClassReader.readCpool(ClassReader.java:358)
> at 
> org.apache.cxf.wsdl.service.factory.ParamReader.(ParamReader.java:79)
> at 
> org.apache.cxf.wsdl.service.factory.ParamReader.(ParamReader.java:58)
> at 
> org.apache.cxf.wsdl.service.factory.ParamReader.getParameterNamesFromDebugInfo(ParamReader.java:131)
> at 
> org.apache.cxf.wsdl.service.factory.DefaultServiceConfiguration.createName(DefaultServiceConfiguration.java:128)
> at 
> org.apache.cxf.wsdl.service.factory.DefaultServiceConfiguration.getDefaultLocalName(DefaultServiceConfiguration.java:119)
> at 
> org.apache.cxf.wsdl.service.factory.DefaultServiceConfiguration.getInParameterName(DefaultServiceConfiguration.java:94)
> at 
> org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.getInParameterName(ReflectionServiceFactoryBean.java:2228)
> at 
> org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.createMessageParts(ReflectionServiceFactoryBean.java:1507)
> at 
> org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.createOperation(ReflectionServiceFactoryBean.java:988)
> at 
> org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.createInterface(ReflectionServiceFactoryBean.java:965)
> at 
> org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:460)
> at 
> org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:529)
> at 
> org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:262)
> {quote}
> The class-constant not understood here is *18 (InvokeDynamic)*.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7455) IndexOutOfBoundsException when message part is missing

2017-08-23 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7455?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16138363#comment-16138363
 ] 

ASF GitHub Bot commented on CXF-7455:
-

Github user deki commented on the issue:

https://github.com/apache/cxf/pull/297
  
Ok could you please attach the SOAP message to the JIRA issue?

Regarding test you can take a look at the existing 
org.apache.cxf.jaxws.holder.HolderTest.

Btw. PRs should usually point to master, we will take care of merging them 
to the other branches.


> IndexOutOfBoundsException when message part is missing
> --
>
> Key: CXF-7455
> URL: https://issues.apache.org/jira/browse/CXF-7455
> Project: CXF
>  Issue Type: Bug
>Affects Versions: 3.1.12
>Reporter: Radovan Semancik
>
> When SOAP response from the server does not include a part which is defined 
> in the WSDL, the the following exception is thrown:
> {code}
> Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
>   at java.util.ArrayList.rangeCheck(ArrayList.java:653)
>   at java.util.ArrayList.get(ArrayList.java:429)
>   at 
> org.apache.cxf.message.MessageContentsList.get(MessageContentsList.java:80)
>   at 
> org.apache.cxf.jaxws.interceptors.HolderInInterceptor.handleMessage(HolderInInterceptor.java:69)
> ...
> {code}
> Yes, this is violation of the specs. Parts should not be missing. However, 
> there are bad servers out there (e.g. Windows 2008 WinRM). Throwing exception 
> like this prohibits the client to handle the situation. Which breaks projects 
> such as winrm4j when talking to old windows boxes.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7429) NPE in WriterInterceptorMBW when writer is null and Log is fine

2017-08-23 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7429?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16138368#comment-16138368
 ] 

ASF GitHub Bot commented on CXF-7429:
-

Github user asfgit closed the pull request at:

https://github.com/apache/cxf/pull/287


> NPE in WriterInterceptorMBW when writer is null and Log is fine
> ---
>
> Key: CXF-7429
> URL: https://issues.apache.org/jira/browse/CXF-7429
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.11, 3.2.0
>Reporter: Benoit Lacelle
>Assignee: Sergey Beryozkin
>Priority: Trivial
> Fix For: 3.1.12, 3.0.14, 3.2.0
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> NPE if the log level is below or equals to FINE and WriterInterceptorMBW has 
> a null writer (which is legit according to a later null check).



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7429) NPE in WriterInterceptorMBW when writer is null and Log is fine

2017-08-23 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7429?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16138369#comment-16138369
 ] 

ASF GitHub Bot commented on CXF-7429:
-

Github user deki commented on the issue:

https://github.com/apache/cxf/pull/287
  
I've closed this PR as the issue is already fixed. See also #286.


> NPE in WriterInterceptorMBW when writer is null and Log is fine
> ---
>
> Key: CXF-7429
> URL: https://issues.apache.org/jira/browse/CXF-7429
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.11, 3.2.0
>Reporter: Benoit Lacelle
>Assignee: Sergey Beryozkin
>Priority: Trivial
> Fix For: 3.1.12, 3.0.14, 3.2.0
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> NPE if the log level is below or equals to FINE and WriterInterceptorMBW has 
> a null writer (which is legit according to a later null check).



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7467) WSDLManagerImpl requires privileged actions in order to work under a security manager

2017-08-23 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7467?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16138376#comment-16138376
 ] 

ASF GitHub Bot commented on CXF-7467:
-

Github user asfgit closed the pull request at:

https://github.com/apache/cxf/pull/303


> WSDLManagerImpl requires privileged actions in order to work under a security 
> manager
> -
>
> Key: CXF-7467
> URL: https://issues.apache.org/jira/browse/CXF-7467
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-WS Runtime
>Affects Versions: 3.1.12
>Reporter: Ingo Weiss
>  Labels: security
> Fix For: 3.1.13, 3.2.0
>
>
> When using CXF and WSDL under a security manager, security related exceptions 
> are thrown, making initialisation of {{WSDLManagerImpl}} fail.
> {noformat}
> Caused by: java.security.AccessControlException: WFSM01: Permission check 
> failed (permission "("java.io.FilePermission" 
> "/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home/jre/lib/wsdl.properties"
>  "read")" in code source "(vfs:/content/executorService.war/WEB-INF/classes 
> )" of "ModuleClassLoader for Module 
> "deployment.executorService.war" from Service Module Loader")
>   at 
> org.wildfly.security.manager.WildFlySecurityManager.checkPermission(WildFlySecurityManager.java:278)
>   at 
> org.wildfly.security.manager.WildFlySecurityManager.checkPermission(WildFlySecurityManager.java:175)
>   at java.lang.SecurityManager.checkRead(SecurityManager.java:888)
>   at 
> org.wildfly.security.manager.WildFlySecurityManager.checkRead(WildFlySecurityManager.java:350)
>   at java.io.FileInputStream.(FileInputStream.java:127)
>   at 
> javax.wsdl.factory.WSDLFactory.findFactoryImplName(WSDLFactory.java:243)
>   at javax.wsdl.factory.WSDLFactory.newInstance(WSDLFactory.java:60)
>   at org.apache.cxf.wsdl11.WSDLManagerImpl.(WSDLManagerImpl.java:84)
>   at org.apache.cxf.wsdl11.WSDLManagerImpl.(WSDLManagerImpl.java:80)
>   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>   at 
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
>   at 
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
>   at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
>   at org.apache.cxf.bus.extension.Extension.load(Extension.java:249)
>   at org.apache.cxf.bus.extension.Extension.load(Extension.java:261)
>   at 
> org.apache.cxf.bus.extension.ExtensionManagerImpl.loadAndRegister(ExtensionManagerImpl.java:213)
>   at 
> org.apache.cxf.bus.extension.ExtensionManagerImpl.getBeanOfType(ExtensionManagerImpl.java:320)
>   at 
> org.apache.cxf.bus.extension.ExtensionManagerBus.getExtension(ExtensionManagerBus.java:215)
>   at 
> org.apache.cxf.jaxws.ServiceImpl.initializePorts(ServiceImpl.java:169)
>   at org.apache.cxf.jaxws.ServiceImpl.initialize(ServiceImpl.java:160)
>   at org.apache.cxf.jaxws.ServiceImpl.(ServiceImpl.java:129)
> ...
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7448) Enable use of reflection in JAX-RS client by default

2017-08-24 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16140551#comment-16140551
 ] 

ASF GitHub Bot commented on CXF-7448:
-

Github user andymc12 closed the pull request at:

https://github.com/apache/cxf/pull/293


> Enable use of reflection in JAX-RS client by default
> 
>
> Key: CXF-7448
> URL: https://issues.apache.org/jira/browse/CXF-7448
> Project: CXF
>  Issue Type: Improvement
>  Components: JAX-RS
>Affects Versions: 3.2.0
>Reporter: Andy McCright
> Fix For: 3.2.0
>
>
> Per discussion on the dev list, we should enable the use of reflection for 
> "non-standard" HTTP methods in the JAX-RS client.  By default, the 
> HttpURLConnection will only allow "standard" HTTP methods, such as GET, PUT, 
> POST, DELETE, OPTIONS and HEAD.  It does not include PATCH or other 
> user-defined methods and will throw an exception when a user attempts to use 
> one of these methods.
> CXF already works around this issue by using reflection to set HTTP method 
> when a system property or message property is set.  This bypasses the check 
> and allows the method to process.  For CXF 3.2, I would like to make this 
> property enabled by default, so that these "non-standard" HTTP methods will 
> work by default.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7448) Enable use of reflection in JAX-RS client by default

2017-08-24 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16140550#comment-16140550
 ] 

ASF GitHub Bot commented on CXF-7448:
-

Github user andymc12 commented on the issue:

https://github.com/apache/cxf/pull/293
  
committed with c886dc72fc4d714e9a28f17a1adbd641eaa5744e


> Enable use of reflection in JAX-RS client by default
> 
>
> Key: CXF-7448
> URL: https://issues.apache.org/jira/browse/CXF-7448
> Project: CXF
>  Issue Type: Improvement
>  Components: JAX-RS
>Affects Versions: 3.2.0
>Reporter: Andy McCright
> Fix For: 3.2.0
>
>
> Per discussion on the dev list, we should enable the use of reflection for 
> "non-standard" HTTP methods in the JAX-RS client.  By default, the 
> HttpURLConnection will only allow "standard" HTTP methods, such as GET, PUT, 
> POST, DELETE, OPTIONS and HEAD.  It does not include PATCH or other 
> user-defined methods and will throw an exception when a user attempts to use 
> one of these methods.
> CXF already works around this issue by using reflection to set HTTP method 
> when a system property or message property is set.  This bypasses the check 
> and allows the method to process.  For CXF 3.2, I would like to make this 
> property enabled by default, so that these "non-standard" HTTP methods will 
> work by default.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7489) Stax2Validation doesn't support schema imports.

2017-08-29 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7489?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16145565#comment-16145565
 ] 

ASF GitHub Bot commented on CXF-7489:
-

GitHub user facundovs opened a pull request:

https://github.com/apache/cxf/pull/308

CXF-7489: Stax2Validation doesn't support schema imports.

Using the Stax2Validation for validating a wsdl, a NPE is being thown.
After some analysis I could find that the targetNamespace is being used as 
key to save schemas to process (please see this[ code 
line](https://github.com/apache/cxf/blob/master/core/src/main/java/org/apache/cxf/staxutils/validation/Stax2ValidationUtils.java#L153))
However, a WSDL can have the following format in the  element:
```


http://www.foo.org"; 
schemaLocation="foo.xsd"/>
http://www.bar.org"; 
schemaLocation="bar.xsd"/>


```
As you can see in these cases, the targetNamespace is not present in the 
schema element that is only used for importing external schemas.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/facundovs/cxf CXF-7489

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cxf/pull/308.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #308


commit 3f23269e61cf31f33e3e88e93cdaffaca6792efe
Author: facundov 
Date:   2017-08-29T14:32:53Z

CXF-7489: Stax2Validation doesn't support schema imports.




> Stax2Validation doesn't support schema imports.
> ---
>
> Key: CXF-7489
> URL: https://issues.apache.org/jira/browse/CXF-7489
> Project: CXF
>  Issue Type: Bug
>Reporter: Facundo Velazquez
>
> Using the Stax2Validation for validating a wsdl, a NPE is being thown.
> After some analysis I could find that the targetNamespace is being used as 
> key to save schemas to process (please see [this code 
> line|https://github.com/apache/cxf/blob/master/core/src/main/java/org/apache/cxf/staxutils/validation/Stax2ValidationUtils.java#L153])
> However, a WSDL can have the following format in the  element:
> {code:xml}
> 
> 
> http://www.foo.org"; 
> schemaLocation="foo.xsd"/>
> http://www.bar.org"; 
> schemaLocation="bar.xsd"/>
> 
> 
> {code}
> As you can see in these cases, the targetNamespace is not present in the 
> schema element that is only used for importing external schemas. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7489) Stax2Validation doesn't support schema imports.

2017-08-30 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7489?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16148137#comment-16148137
 ] 

ASF GitHub Bot commented on CXF-7489:
-

Github user asfgit closed the pull request at:

https://github.com/apache/cxf/pull/308


> Stax2Validation doesn't support schema imports.
> ---
>
> Key: CXF-7489
> URL: https://issues.apache.org/jira/browse/CXF-7489
> Project: CXF
>  Issue Type: Bug
>Reporter: Facundo Velazquez
>
> Using the Stax2Validation for validating a wsdl, a NPE is being thown.
> After some analysis I could find that the targetNamespace is being used as 
> key to save schemas to process (please see [this code 
> line|https://github.com/apache/cxf/blob/master/core/src/main/java/org/apache/cxf/staxutils/validation/Stax2ValidationUtils.java#L153])
> However, a WSDL can have the following format in the  element:
> {code:xml}
> 
> 
> http://www.foo.org"; 
> schemaLocation="foo.xsd"/>
> http://www.bar.org"; 
> schemaLocation="bar.xsd"/>
> 
> 
> {code}
> As you can see in these cases, the targetNamespace is not present in the 
> schema element that is only used for importing external schemas. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7489) Stax2Validation doesn't support schema imports.

2017-08-30 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7489?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16148141#comment-16148141
 ] 

ASF GitHub Bot commented on CXF-7489:
-

Github user facundovs commented on the issue:

https://github.com/apache/cxf/pull/308
  
Hey guys. Why do you close this PR?


> Stax2Validation doesn't support schema imports.
> ---
>
> Key: CXF-7489
> URL: https://issues.apache.org/jira/browse/CXF-7489
> Project: CXF
>  Issue Type: Bug
>Reporter: Facundo Velazquez
>
> Using the Stax2Validation for validating a wsdl, a NPE is being thown.
> After some analysis I could find that the targetNamespace is being used as 
> key to save schemas to process (please see [this code 
> line|https://github.com/apache/cxf/blob/master/core/src/main/java/org/apache/cxf/staxutils/validation/Stax2ValidationUtils.java#L153])
> However, a WSDL can have the following format in the  element:
> {code:xml}
> 
> 
> http://www.foo.org"; 
> schemaLocation="foo.xsd"/>
> http://www.bar.org"; 
> schemaLocation="bar.xsd"/>
> 
> 
> {code}
> As you can see in these cases, the targetNamespace is not present in the 
> schema element that is only used for importing external schemas. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7489) Stax2Validation doesn't support schema imports.

2017-08-30 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7489?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16148160#comment-16148160
 ] 

ASF GitHub Bot commented on CXF-7489:
-

Github user dkulp commented on the issue:

https://github.com/apache/cxf/pull/308
  
Because it's been merged to master.


> Stax2Validation doesn't support schema imports.
> ---
>
> Key: CXF-7489
> URL: https://issues.apache.org/jira/browse/CXF-7489
> Project: CXF
>  Issue Type: Bug
>Reporter: Facundo Velazquez
>
> Using the Stax2Validation for validating a wsdl, a NPE is being thown.
> After some analysis I could find that the targetNamespace is being used as 
> key to save schemas to process (please see [this code 
> line|https://github.com/apache/cxf/blob/master/core/src/main/java/org/apache/cxf/staxutils/validation/Stax2ValidationUtils.java#L153])
> However, a WSDL can have the following format in the  element:
> {code:xml}
> 
> 
> http://www.foo.org"; 
> schemaLocation="foo.xsd"/>
> http://www.bar.org"; 
> schemaLocation="bar.xsd"/>
> 
> 
> {code}
> As you can see in these cases, the targetNamespace is not present in the 
> schema element that is only used for importing external schemas. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7489) Stax2Validation doesn't support schema imports.

2017-08-30 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7489?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16148248#comment-16148248
 ] 

ASF GitHub Bot commented on CXF-7489:
-

Github user facundovs commented on the issue:

https://github.com/apache/cxf/pull/308
  
Great! Thank you very much.


> Stax2Validation doesn't support schema imports.
> ---
>
> Key: CXF-7489
> URL: https://issues.apache.org/jira/browse/CXF-7489
> Project: CXF
>  Issue Type: Bug
>Reporter: Facundo Velazquez
>
> Using the Stax2Validation for validating a wsdl, a NPE is being thown.
> After some analysis I could find that the targetNamespace is being used as 
> key to save schemas to process (please see [this code 
> line|https://github.com/apache/cxf/blob/master/core/src/main/java/org/apache/cxf/staxutils/validation/Stax2ValidationUtils.java#L153])
> However, a WSDL can have the following format in the  element:
> {code:xml}
> 
> 
> http://www.foo.org"; 
> schemaLocation="foo.xsd"/>
> http://www.bar.org"; 
> schemaLocation="bar.xsd"/>
> 
> 
> {code}
> As you can see in these cases, the targetNamespace is not present in the 
> schema element that is only used for importing external schemas. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7491) TransformInInterceptor / TransformOutInterceptor assume UTF-8, ignore header-provided character set

2017-08-31 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7491?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16149551#comment-16149551
 ] 

ASF GitHub Bot commented on CXF-7491:
-

GitHub user cchepelov opened a pull request:

https://github.com/apache/cxf/pull/309

[CXF-7491] Fork Stax & XSLT interceptors to make them Charset-aware

per https://issues.apache.org/jira/browse/CXF-7491 
this implements "solution 3" described there; forking the Stax & XSLT 
transform interceptors to make them charset-aware, not blind "always UTF-8" as 
previously
+ updates the tests to cover for this
 

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/cchepelov/cxf cxf-7491_nonutf8-interceptor

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/cxf/pull/309.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #309


commit 56dd9e31ff7b403191294592a3fa0bb73ce0c780
Author: Cyrille Chépélov 
Date:   2017-08-31T20:28:03Z

[CXF-7491] Fork Stax & XSLT interceptors to make them Charset-aware




> TransformInInterceptor / TransformOutInterceptor assume UTF-8, ignore 
> header-provided character set
> ---
>
> Key: CXF-7491
> URL: https://issues.apache.org/jira/browse/CXF-7491
> Project: CXF
>  Issue Type: Bug
>  Components: Soap Binding
>Affects Versions: 3.1.11, 3.1.12
> Environment: client Linux/Java/CXF (actually scala using 
> sbt-play-soap)  
> server IBMi AS/400
>Reporter: Cyrille Chépélov
>
> When talking to a server using IBMi / RPG-based software and SOAP gateway:
> the returned SOAP message contains XML encoded as ISO-8859-1; the HTTP header 
> do specify a content type of xml+soap with character set ISO-8859-1; however 
> the XML message itself include no character set declaration.
> Due to discrepancies between the official WSDL for the SOAP message and the 
> remote implementation, a couple transforms had to be deployed. This works 
> fine as long as the exchanged messages actually conform to US-ASCII (no 
> diacritics), but whenever any character encoded differently between 
> ISO-8859-1 and UTF-8 is used, the TransformInInterceptor fails to parse the 
> text, as the XMLStreamReader is built to expect UTF-8 and actually receives 
> ISO-8859-1 input



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7491) TransformInInterceptor / TransformOutInterceptor assume UTF-8, ignore header-provided character set

2017-09-06 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7491?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16155124#comment-16155124
 ] 

ASF GitHub Bot commented on CXF-7491:
-

Github user sberyozkin commented on the issue:

https://github.com/apache/cxf/pull/309
  
Thanks for this effort. Can you consider modifying the existing 
interceptors to make them charset-aware instead of creating a new set of 
interceptors ? In reality some users will continue using the old ones, and we 
will face the problems with syncing the fixes across the 2 sets of interceptors 


> TransformInInterceptor / TransformOutInterceptor assume UTF-8, ignore 
> header-provided character set
> ---
>
> Key: CXF-7491
> URL: https://issues.apache.org/jira/browse/CXF-7491
> Project: CXF
>  Issue Type: Bug
>  Components: Soap Binding
>Affects Versions: 3.1.11, 3.1.12
> Environment: client Linux/Java/CXF (actually scala using 
> sbt-play-soap)  
> server IBMi AS/400
>Reporter: Cyrille Chépélov
>
> When talking to a server using IBMi / RPG-based software and SOAP gateway:
> the returned SOAP message contains XML encoded as ISO-8859-1; the HTTP header 
> do specify a content type of xml+soap with character set ISO-8859-1; however 
> the XML message itself include no character set declaration.
> Due to discrepancies between the official WSDL for the SOAP message and the 
> remote implementation, a couple transforms had to be deployed. This works 
> fine as long as the exchanged messages actually conform to US-ASCII (no 
> diacritics), but whenever any character encoded differently between 
> ISO-8859-1 and UTF-8 is used, the TransformInInterceptor fails to parse the 
> text, as the XMLStreamReader is built to expect UTF-8 and actually receives 
> ISO-8859-1 input



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7491) TransformInInterceptor / TransformOutInterceptor assume UTF-8, ignore header-provided character set

2017-09-06 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7491?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16156049#comment-16156049
 ] 

ASF GitHub Bot commented on CXF-7491:
-

Github user cchepelov commented on the issue:

https://github.com/apache/cxf/pull/309
  
Thanks for the feedback @sberyozkin 

As noted in the JIRA ticket, I hesitated between simply updating the 
existing interceptors and forking/deprecating. The reason why I went with the 
latter is in order to avoid making a breaking interface change for users of 
_subclasses_ of these interceptors, which seemed to be an excessive surprise in 
a possible 3.1.(x+1) release. In the patch as it is now, the **features** are 
updated to use the new interceptors.

Do you feel I overestimated the inconvenience to such subclassers, at the 
expense of leaving (effectively) dead/worse code around ? I'll gladly switch to 
the break-but-improve-in-place strategy if this is preferred.



> TransformInInterceptor / TransformOutInterceptor assume UTF-8, ignore 
> header-provided character set
> ---
>
> Key: CXF-7491
> URL: https://issues.apache.org/jira/browse/CXF-7491
> Project: CXF
>  Issue Type: Bug
>  Components: Soap Binding
>Affects Versions: 3.1.11, 3.1.12
> Environment: client Linux/Java/CXF (actually scala using 
> sbt-play-soap)  
> server IBMi AS/400
>Reporter: Cyrille Chépélov
>
> When talking to a server using IBMi / RPG-based software and SOAP gateway:
> the returned SOAP message contains XML encoded as ISO-8859-1; the HTTP header 
> do specify a content type of xml+soap with character set ISO-8859-1; however 
> the XML message itself include no character set declaration.
> Due to discrepancies between the official WSDL for the SOAP message and the 
> remote implementation, a couple transforms had to be deployed. This works 
> fine as long as the exchanged messages actually conform to US-ASCII (no 
> diacritics), but whenever any character encoded differently between 
> ISO-8859-1 and UTF-8 is used, the TransformInInterceptor fails to parse the 
> text, as the XMLStreamReader is built to expect UTF-8 and actually receives 
> ISO-8859-1 input



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7491) TransformInInterceptor / TransformOutInterceptor assume UTF-8, ignore header-provided character set

2017-09-07 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7491?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16156768#comment-16156768
 ] 

ASF GitHub Bot commented on CXF-7491:
-

Github user sberyozkin commented on the issue:

https://github.com/apache/cxf/pull/309
  
I'm not sure if users actually have ever tried to extend these classes, we 
can ask at the CXF users for example if someone has tried it...Can you please 
try to do another PR but based on updating the protected methods, or may be you 
can find a way to pass that extra parameter as a new message property, example, 
Message.PAYLOAD_ENCODING, or similar ? thanks


> TransformInInterceptor / TransformOutInterceptor assume UTF-8, ignore 
> header-provided character set
> ---
>
> Key: CXF-7491
> URL: https://issues.apache.org/jira/browse/CXF-7491
> Project: CXF
>  Issue Type: Bug
>  Components: Soap Binding
>Affects Versions: 3.1.11, 3.1.12
> Environment: client Linux/Java/CXF (actually scala using 
> sbt-play-soap)  
> server IBMi AS/400
>Reporter: Cyrille Chépélov
>
> When talking to a server using IBMi / RPG-based software and SOAP gateway:
> the returned SOAP message contains XML encoded as ISO-8859-1; the HTTP header 
> do specify a content type of xml+soap with character set ISO-8859-1; however 
> the XML message itself include no character set declaration.
> Due to discrepancies between the official WSDL for the SOAP message and the 
> remote implementation, a couple transforms had to be deployed. This works 
> fine as long as the exchanged messages actually conform to US-ASCII (no 
> diacritics), but whenever any character encoded differently between 
> ISO-8859-1 and UTF-8 is used, the TransformInInterceptor fails to parse the 
> text, as the XMLStreamReader is built to expect UTF-8 and actually receives 
> ISO-8859-1 input



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7520) Ensure CXF can build with JDK9 GA(build 9+181)

2017-09-29 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7520?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16185698#comment-16185698
 ] 

ASF GitHub Bot commented on CXF-7520:
-

GitHub user johnpoth opened a pull request:

https://github.com/apache/camel/pull/1982

Jdk9 ga

Enable more tests on JDK9 GA and upgrade maven-surefire-plugin to 2.20.1.

Some tests are still skipped on JDK9 GA due to:

[CXF-7520](https://issues.apache.org/jira/browse/CXF-7520)
[BOON-376](https://github.com/boonproject/boon/issues/376)
[groovy-eclipse-265](https://github.com/groovy/groovy-eclipse/issues/265)
[TOMEE-2038](https://issues.apache.org/jira/browse/TOMEE-2038)

Thanks!


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/johnpoth/camel jdk9-ga

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/camel/pull/1982.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1982


commit b354ebbbfaeefeca49a05e02a4b1e59e2fcdfe90
Author: jpoth 
Date:   2017-09-29T10:56:46Z

Upgrade maven-surefire-plugin which fixes SUREFIRE-1265 on JDK9 GA

commit 4553bb6f8fc04e6b9f9c0397790eb020d28011fd
Author: jpoth 
Date:   2017-09-29T11:03:57Z

Enable tests that now pass on JDK9 GA




> Ensure CXF can build with JDK9 GA(build 9+181)
> --
>
> Key: CXF-7520
> URL: https://issues.apache.org/jira/browse/CXF-7520
> Project: CXF
>  Issue Type: Bug
>Reporter: Freeman Fang
>Assignee: Freeman Fang
>
> a couple of cxf test failied with JDK9 GA due to recent change
> Mainly in JAXB and SAAJ



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7520) Ensure CXF can build with JDK9 GA(build 9+181)

2017-09-29 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7520?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16185805#comment-16185805
 ] 

ASF GitHub Bot commented on CXF-7520:
-

Github user asfgit closed the pull request at:

https://github.com/apache/camel/pull/1982


> Ensure CXF can build with JDK9 GA(build 9+181)
> --
>
> Key: CXF-7520
> URL: https://issues.apache.org/jira/browse/CXF-7520
> Project: CXF
>  Issue Type: Bug
>Reporter: Freeman Fang
>Assignee: Freeman Fang
>
> a couple of cxf test failied with JDK9 GA due to recent change
> Mainly in JAXB and SAAJ



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7537) Java 2 security failures - doPrivs needed to run with Java 2 security mgr

2017-10-23 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16215692#comment-16215692
 ] 

ASF GitHub Bot commented on CXF-7537:
-

andymc12 opened a new pull request #326: [CXF-7537] Use doPriv when calling 
methods needing Java 2 permissions - 3.1.X
URL: https://github.com/apache/cxf/pull/326
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Java 2 security failures - doPrivs needed to run with Java 2 security mgr
> -
>
> Key: CXF-7537
> URL: https://issues.apache.org/jira/browse/CXF-7537
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.11, 3.2.0
>Reporter: Andy McCright
>
> While doing some Java 2 security testing, I found the following stacks that 
> should be wrapped in doPriv blocks:
> Caused by: java.security.AccessControlException: Access denied 
> ("java.util.PropertyPermission" 
> "org.apache.cxf.io.CachedOutputStream.MaxSize" "read")
>   at java.security.AccessController.throwACE(AccessController.java:157)
>   at 
> java.security.AccessController.checkPermissionHelper(AccessController.java:217)
>   at 
> java.security.AccessController.checkPermission(AccessController.java:349)
>   at java.lang.SecurityManager.checkPermission(SecurityManager.java:562)
>   at 
> java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1307)
>   at java.lang.System.getProperty(System.java:443)
>   at 
> org.apache.cxf.io.CachedOutputStream.setDefaultMaxSize(CachedOutputStream.java:572)
>   at 
> org.apache.cxf.io.CachedOutputStream.(CachedOutputStream.java:70)
> java.security.AccessControlException: Access denied 
> ("java.lang.RuntimePermission" "accessDeclaredMembers")
>   at java.security.AccessController.throwACE(AccessController.java:157)
>   at 
> java.security.AccessController.checkPermissionHelper(AccessController.java:217)
>   at 
> java.security.AccessController.checkPermission(AccessController.java:349)
>   at java.lang.SecurityManager.checkPermission(SecurityManager.java:562)
>   at java.lang.Class.checkMemberAccess(Class.java:200)
>   at java.lang.Class.getDeclaredMethods(Class.java:992)
>   at 
> org.apache.cxf.jaxrs.utils.ResourceUtils.findPreDestroyMethod(ResourceUtils.java:186)
>   at 
> org.apache.cxf.jaxrs.utils.ResourceUtils.findPreDestroyMethod(ResourceUtils.java:179)
>   at 
> org.apache.cxf.jaxrs.lifecycle.PerRequestResourceProvider.(PerRequestResourceProvider.java:63)
> Caused by: java.lang.RuntimeException: java.security.AccessControlException: 
> Access denied ("java.net.SocketPermission" "127.0.0.1:8010" "connect,resolve")
>   at 
> sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1503)
>   at 
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1489)
>   at 
> sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:3034)
>   at 
> java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:500)
>   at 
> org.apache.cxf.transport.http.URLConnectionHTTPConduit$URLConnectionWrappedOutputStream.getResponseCode(URLConnectionHTTPConduit.java:370)
>   at 
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.doProcessResponseCode(HTTPConduit.java:1586)
>   at 
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1615)
>   at 
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1559)
>   at 
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1356)
>   ... 47 more
> More may be exposed after resolving these...



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7537) Java 2 security failures - doPrivs needed to run with Java 2 security mgr

2017-10-23 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16215690#comment-16215690
 ] 

ASF GitHub Bot commented on CXF-7537:
-

andymc12 opened a new pull request #325: [CXF-7537] Use doPriv when calling 
methods needing Java 2 permissions
URL: https://github.com/apache/cxf/pull/325
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Java 2 security failures - doPrivs needed to run with Java 2 security mgr
> -
>
> Key: CXF-7537
> URL: https://issues.apache.org/jira/browse/CXF-7537
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.11, 3.2.0
>Reporter: Andy McCright
>
> While doing some Java 2 security testing, I found the following stacks that 
> should be wrapped in doPriv blocks:
> Caused by: java.security.AccessControlException: Access denied 
> ("java.util.PropertyPermission" 
> "org.apache.cxf.io.CachedOutputStream.MaxSize" "read")
>   at java.security.AccessController.throwACE(AccessController.java:157)
>   at 
> java.security.AccessController.checkPermissionHelper(AccessController.java:217)
>   at 
> java.security.AccessController.checkPermission(AccessController.java:349)
>   at java.lang.SecurityManager.checkPermission(SecurityManager.java:562)
>   at 
> java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1307)
>   at java.lang.System.getProperty(System.java:443)
>   at 
> org.apache.cxf.io.CachedOutputStream.setDefaultMaxSize(CachedOutputStream.java:572)
>   at 
> org.apache.cxf.io.CachedOutputStream.(CachedOutputStream.java:70)
> java.security.AccessControlException: Access denied 
> ("java.lang.RuntimePermission" "accessDeclaredMembers")
>   at java.security.AccessController.throwACE(AccessController.java:157)
>   at 
> java.security.AccessController.checkPermissionHelper(AccessController.java:217)
>   at 
> java.security.AccessController.checkPermission(AccessController.java:349)
>   at java.lang.SecurityManager.checkPermission(SecurityManager.java:562)
>   at java.lang.Class.checkMemberAccess(Class.java:200)
>   at java.lang.Class.getDeclaredMethods(Class.java:992)
>   at 
> org.apache.cxf.jaxrs.utils.ResourceUtils.findPreDestroyMethod(ResourceUtils.java:186)
>   at 
> org.apache.cxf.jaxrs.utils.ResourceUtils.findPreDestroyMethod(ResourceUtils.java:179)
>   at 
> org.apache.cxf.jaxrs.lifecycle.PerRequestResourceProvider.(PerRequestResourceProvider.java:63)
> Caused by: java.lang.RuntimeException: java.security.AccessControlException: 
> Access denied ("java.net.SocketPermission" "127.0.0.1:8010" "connect,resolve")
>   at 
> sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1503)
>   at 
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1489)
>   at 
> sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:3034)
>   at 
> java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:500)
>   at 
> org.apache.cxf.transport.http.URLConnectionHTTPConduit$URLConnectionWrappedOutputStream.getResponseCode(URLConnectionHTTPConduit.java:370)
>   at 
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.doProcessResponseCode(HTTPConduit.java:1586)
>   at 
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1615)
>   at 
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1559)
>   at 
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1356)
>   ... 47 more
> More may be exposed after resolving these...



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7537) Java 2 security failures - doPrivs needed to run with Java 2 security mgr

2017-10-24 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16216575#comment-16216575
 ] 

ASF GitHub Bot commented on CXF-7537:
-

sberyozkin commented on issue #325: [CXF-7537] Use doPriv when calling methods 
needing Java 2 permissions
URL: https://github.com/apache/cxf/pull/325#issuecomment-338923405
 
 
   Hi Andy, looks fine to me. In general, please do not hesitate to merge 
directly when the changes are not sensitive (bug fixes, minor improvements, 
etc), thanks


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Java 2 security failures - doPrivs needed to run with Java 2 security mgr
> -
>
> Key: CXF-7537
> URL: https://issues.apache.org/jira/browse/CXF-7537
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.11, 3.2.0
>Reporter: Andy McCright
>
> While doing some Java 2 security testing, I found the following stacks that 
> should be wrapped in doPriv blocks:
> Caused by: java.security.AccessControlException: Access denied 
> ("java.util.PropertyPermission" 
> "org.apache.cxf.io.CachedOutputStream.MaxSize" "read")
>   at java.security.AccessController.throwACE(AccessController.java:157)
>   at 
> java.security.AccessController.checkPermissionHelper(AccessController.java:217)
>   at 
> java.security.AccessController.checkPermission(AccessController.java:349)
>   at java.lang.SecurityManager.checkPermission(SecurityManager.java:562)
>   at 
> java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1307)
>   at java.lang.System.getProperty(System.java:443)
>   at 
> org.apache.cxf.io.CachedOutputStream.setDefaultMaxSize(CachedOutputStream.java:572)
>   at 
> org.apache.cxf.io.CachedOutputStream.(CachedOutputStream.java:70)
> java.security.AccessControlException: Access denied 
> ("java.lang.RuntimePermission" "accessDeclaredMembers")
>   at java.security.AccessController.throwACE(AccessController.java:157)
>   at 
> java.security.AccessController.checkPermissionHelper(AccessController.java:217)
>   at 
> java.security.AccessController.checkPermission(AccessController.java:349)
>   at java.lang.SecurityManager.checkPermission(SecurityManager.java:562)
>   at java.lang.Class.checkMemberAccess(Class.java:200)
>   at java.lang.Class.getDeclaredMethods(Class.java:992)
>   at 
> org.apache.cxf.jaxrs.utils.ResourceUtils.findPreDestroyMethod(ResourceUtils.java:186)
>   at 
> org.apache.cxf.jaxrs.utils.ResourceUtils.findPreDestroyMethod(ResourceUtils.java:179)
>   at 
> org.apache.cxf.jaxrs.lifecycle.PerRequestResourceProvider.(PerRequestResourceProvider.java:63)
> Caused by: java.lang.RuntimeException: java.security.AccessControlException: 
> Access denied ("java.net.SocketPermission" "127.0.0.1:8010" "connect,resolve")
>   at 
> sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1503)
>   at 
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1489)
>   at 
> sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:3034)
>   at 
> java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:500)
>   at 
> org.apache.cxf.transport.http.URLConnectionHTTPConduit$URLConnectionWrappedOutputStream.getResponseCode(URLConnectionHTTPConduit.java:370)
>   at 
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.doProcessResponseCode(HTTPConduit.java:1586)
>   at 
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1615)
>   at 
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1559)
>   at 
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1356)
>   ... 47 more
> More may be exposed after resolving these...



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7539) Provide Boolean wrapper object for == comparation

2017-10-24 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7539?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16216961#comment-16216961
 ] 

ASF GitHub Bot commented on CXF-7539:
-

amarkevich opened a new pull request #327: [CXF-7539] Provide Boolean wrapper 
object for == comparation
URL: https://github.com/apache/cxf/pull/327
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Provide Boolean wrapper object for == comparation
> -
>
> Key: CXF-7539
> URL: https://issues.apache.org/jira/browse/CXF-7539
> Project: CXF
>  Issue Type: Improvement
>  Components: JAX-RS
>Affects Versions: 3.2.0
>Reporter: Alexey Markevich
>
> {code}
> @QueryParam("param") Boolean param
> {code}
> currently creates new Boolean object instance whick cause (Boolean.TRUE == 
> param) to be false even with "true" value



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7537) Java 2 security failures - doPrivs needed to run with Java 2 security mgr

2017-10-24 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16216986#comment-16216986
 ] 

ASF GitHub Bot commented on CXF-7537:
-

andymc12 closed pull request #325: [CXF-7537] Use doPriv when calling methods 
needing Java 2 permissions
URL: https://github.com/apache/cxf/pull/325
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/core/src/main/java/org/apache/cxf/io/CachedOutputStream.java 
b/core/src/main/java/org/apache/cxf/io/CachedOutputStream.java
index 45a4dc79ade..0ef7a2438ab 100644
--- a/core/src/main/java/org/apache/cxf/io/CachedOutputStream.java
+++ b/core/src/main/java/org/apache/cxf/io/CachedOutputStream.java
@@ -566,7 +566,7 @@ public void setCipherTransformation(String 
cipherTransformation) {
 
 public static void setDefaultMaxSize(long l) {
 if (l == -1) {
-String s = 
System.getProperty("org.apache.cxf.io.CachedOutputStream.MaxSize",
+String s = 
SystemPropertyAction.getProperty("org.apache.cxf.io.CachedOutputStream.MaxSize",
 "-1");
 l = Long.parseLong(s);
 }
diff --git 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java
index 39da136c75b..90c4d95ae25 100644
--- 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java
+++ 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java
@@ -29,6 +29,8 @@
 import java.lang.reflect.Type;
 import java.net.URL;
 import java.nio.charset.StandardCharsets;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Comparator;
@@ -131,7 +133,15 @@
 }
 
 private ResourceUtils() {
+}
 
+private static Method[] getDeclaredMethods(final Class c) {
+return AccessController.doPrivileged(new PrivilegedAction() {
+@Override
+public Method[] run() {
+return c.getDeclaredMethods();
+}
+});
 }
 public static Method findPostConstructMethod(Class c) {
 return findPostConstructMethod(c, null);
@@ -140,7 +150,7 @@ public static Method findPostConstructMethod(Class c, 
String name) {
 if (Object.class == c || null == c) {
 return null;
 }
-for (Method m : c.getDeclaredMethods()) {
+for (Method m : getDeclaredMethods(c)) {
 if (name != null) {
 if (m.getName().equals(name)) {
 return m;
@@ -170,7 +180,7 @@ public static Method findPreDestroyMethod(Class c, 
String name) {
 if (Object.class == c || null == c) {
 return null;
 }
-for (Method m : c.getDeclaredMethods()) {
+for (Method m : getDeclaredMethods(c)) {
 if (name != null) {
 if (m.getName().equals(name)) {
 return m;


 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Java 2 security failures - doPrivs needed to run with Java 2 security mgr
> -
>
> Key: CXF-7537
> URL: https://issues.apache.org/jira/browse/CXF-7537
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.11, 3.2.0
>Reporter: Andy McCright
>
> While doing some Java 2 security testing, I found the following stacks that 
> should be wrapped in doPriv blocks:
> Caused by: java.security.AccessControlException: Access denied 
> ("java.util.PropertyPermission" 
> "org.apache.cxf.io.CachedOutputStream.MaxSize" "read")
>   at java.security.AccessController.throwACE(AccessController.java:157)
>   at 
> java.security.AccessController.checkPermissionHelper(AccessController.java:217)
>   at 
> java.security.AccessController.checkPermission(AccessController.java:349)
>   at java.lang.SecurityManager.checkPermission(SecurityManager.java:562)
>   at 
> java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1307)
>   at java.lang.System.getProperty(System.java:443)
>   at 
> org.apache.cxf.io.CachedOutputStream.setDefaultMaxSize(CachedOutputStream.java:572)
>   at 
> org.apache.cxf.io.CachedOutputStream.(CachedOutputStream.java:70)

[jira] [Commented] (CXF-7539) Provide Boolean wrapper object for == comparation

2017-10-24 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7539?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16217579#comment-16217579
 ] 

ASF GitHub Bot commented on CXF-7539:
-

deki closed pull request #327: [CXF-7539] Provide Boolean wrapper object for == 
comparation
URL: https://github.com/apache/cxf/pull/327
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java
 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java
index c083de234a2..4f1688ca83f 100644
--- 
a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java
+++ 
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java
@@ -436,6 +436,10 @@ public static Object extractFromMethod(Object 
requestObject,
 //pass empty string to boxed number type will result in 404
 return null;
 }
+if (Boolean.class == pClass) {
+// allow == checks for Boolean object
+pClass = (Class) Boolean.TYPE;
+}
 if (pClass.isPrimitive()) {
 try {
 // cannot us pClass.cast as the pClass is something like
diff --git a/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/Customer.java 
b/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/Customer.java
index af7a54509cc..bf7751ccc5b 100644
--- a/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/Customer.java
+++ b/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/Customer.java
@@ -409,7 +409,8 @@ public void testMultipleQuery(@QueryParam("query")  String 
queryString,
   @QueryParam("query3") Long queryString3,
   @QueryParam("query4") boolean queryBoolean4,
   @QueryParam("query5") char queryChar5,
-  @QueryParam("query6") String queryString6) {
+  @QueryParam("query6") String queryString6,
+  @QueryParam("query7") Boolean queryString7) {
 // complete
 }
 
diff --git 
a/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/JAXRSUtilsTest.java
 
b/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/JAXRSUtilsTest.java
index 2db131377d1..abaf5024b46 100644
--- 
a/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/JAXRSUtilsTest.java
+++ 
b/rt/frontend/jaxrs/src/test/java/org/apache/cxf/jaxrs/utils/JAXRSUtilsTest.java
@@ -1472,12 +1472,12 @@ private void verifyParametersBean(Method m,
 @Test
 public void testMultipleQueryParameters() throws Exception {
 Class[] argType = {String.class, String.class, Long.class,
-  Boolean.TYPE, char.class, String.class};
+  Boolean.TYPE, char.class, String.class, 
Boolean.class};
 Method m = Customer.class.getMethod("testMultipleQuery", argType);
 Message messageImpl = createMessage();
 
 messageImpl.put(Message.QUERY_STRING,
-
"query=first&query2=second&query3=3&query4=true&query6");
+
"query=first&query2=second&query3=3&query4=true&query6&query7=true");
 List params = JAXRSUtils.processParameters(new 
OperationResourceInfo(m,
new 
ClassResourceInfo(Customer.class)),
null, messageImpl);
@@ -1487,12 +1487,14 @@ public void testMultipleQueryParameters() throws 
Exception {
  "second", params.get(1));
 assertEquals("Third Query Parameter of multiple was not matched 
correctly",
  new Long(3), params.get(2));
-assertEquals("Fourth Query Parameter of multiple was not matched 
correctly",
+assertSame("Fourth Query Parameter of multiple was not matched 
correctly",
  Boolean.TRUE, params.get(3));
 assertEquals("Fifth Query Parameter of multiple was not matched 
correctly",
  '\u', params.get(4));
 assertEquals("Six Query Parameter of multiple was not matched 
correctly",
  "", params.get(5));
+assertSame("Seventh Query Parameter of multiple was not matched 
correctly",
+Boolean.TRUE, params.get(6));
 }
 
 @SuppressWarnings("unchecked")


 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries

[jira] [Commented] (CXF-7537) Java 2 security failures - doPrivs needed to run with Java 2 security mgr

2017-10-26 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7537?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16221129#comment-16221129
 ] 

ASF GitHub Bot commented on CXF-7537:
-

andymc12 commented on issue #326: [CXF-7537] Use doPriv when calling methods 
needing Java 2 permissions - 3.1.X
URL: https://github.com/apache/cxf/pull/326#issuecomment-339785475
 
 
   I must've mixes streams here... I'm planning to close this PR and resubmit 
the doPriv changes from PR #325 into the 3.1.X stream directly.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Java 2 security failures - doPrivs needed to run with Java 2 security mgr
> -
>
> Key: CXF-7537
> URL: https://issues.apache.org/jira/browse/CXF-7537
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.11, 3.2.0
>Reporter: Andy McCright
>
> While doing some Java 2 security testing, I found the following stacks that 
> should be wrapped in doPriv blocks:
> Caused by: java.security.AccessControlException: Access denied 
> ("java.util.PropertyPermission" 
> "org.apache.cxf.io.CachedOutputStream.MaxSize" "read")
>   at java.security.AccessController.throwACE(AccessController.java:157)
>   at 
> java.security.AccessController.checkPermissionHelper(AccessController.java:217)
>   at 
> java.security.AccessController.checkPermission(AccessController.java:349)
>   at java.lang.SecurityManager.checkPermission(SecurityManager.java:562)
>   at 
> java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1307)
>   at java.lang.System.getProperty(System.java:443)
>   at 
> org.apache.cxf.io.CachedOutputStream.setDefaultMaxSize(CachedOutputStream.java:572)
>   at 
> org.apache.cxf.io.CachedOutputStream.(CachedOutputStream.java:70)
> java.security.AccessControlException: Access denied 
> ("java.lang.RuntimePermission" "accessDeclaredMembers")
>   at java.security.AccessController.throwACE(AccessController.java:157)
>   at 
> java.security.AccessController.checkPermissionHelper(AccessController.java:217)
>   at 
> java.security.AccessController.checkPermission(AccessController.java:349)
>   at java.lang.SecurityManager.checkPermission(SecurityManager.java:562)
>   at java.lang.Class.checkMemberAccess(Class.java:200)
>   at java.lang.Class.getDeclaredMethods(Class.java:992)
>   at 
> org.apache.cxf.jaxrs.utils.ResourceUtils.findPreDestroyMethod(ResourceUtils.java:186)
>   at 
> org.apache.cxf.jaxrs.utils.ResourceUtils.findPreDestroyMethod(ResourceUtils.java:179)
>   at 
> org.apache.cxf.jaxrs.lifecycle.PerRequestResourceProvider.(PerRequestResourceProvider.java:63)
> Caused by: java.lang.RuntimeException: java.security.AccessControlException: 
> Access denied ("java.net.SocketPermission" "127.0.0.1:8010" "connect,resolve")
>   at 
> sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1503)
>   at 
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1489)
>   at 
> sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:3034)
>   at 
> java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:500)
>   at 
> org.apache.cxf.transport.http.URLConnectionHTTPConduit$URLConnectionWrappedOutputStream.getResponseCode(URLConnectionHTTPConduit.java:370)
>   at 
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.doProcessResponseCode(HTTPConduit.java:1586)
>   at 
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1615)
>   at 
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1559)
>   at 
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1356)
>   ... 47 more
> More may be exposed after resolving these...



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7501) Cannot inject field in ContainerRequestFilter

2017-10-27 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16222565#comment-16222565
 ] 

ASF GitHub Bot commented on CXF-7501:
-

reta opened a new pull request #329: CXF-7501: Cannot inject field in 
ContainerRequestFilter (and generally, into any providers registered using 
FeatureContext)
URL: https://github.com/apache/cxf/pull/329
 
 
   Adding the new extension-based customization (`ServerConfigurableFactory`) 
in order to control the way how providers are created and registered using 
`FeatureContext::register` methods family. It allows to use proper mechanisms 
in case of managed runtimes (like CDIs f.e.).
   
   @sberyozkin @johnament Submitting through PR to have some feedback guys you 
may have. The change is not really complex but touches a bit some internals. 
   
   Thanks.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Cannot inject field in ContainerRequestFilter
> -
>
> Key: CXF-7501
> URL: https://issues.apache.org/jira/browse/CXF-7501
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.10, 3.2.0
> Environment: Linux Mint 64 bit, TomEE Plus 7.0.3, JavaEE 7 
> application using MVC specification and reference implementation(Libs 
> Attached)
>Reporter: Jeyvison Nascimento
>Assignee: Andriy Redko
>  Labels: cdi
> Attachments: javax-mvc.jar, ozark.jar
>
>
> Hey folks.
> We found a weird behavior while running MVC specification(JSR 371) on TomEE 
> witch CXF. We have a *ContainerRequestFilter* defined called 
> *JaxRsContextFilter* 
> {code:java}
> @PreMatching
> @Priority(0)
> public class JaxRsContextFilter implements ContainerRequestFilter {
> @Inject
> private JaxRsContextProducer jaxRsContextProducer;
> @Context
> private Configuration configuration;
> @Context
> private HttpServletRequest request;
> @Context
> private HttpServletResponse response;
> public JaxRsContextFilter() {
> }
> public void filter(ContainerRequestContext requestContext) throws 
> IOException {
> this.jaxRsContextProducer.populate(this.configuration, this.request, 
> this.response);
> }
> }
> {code}
> You can see that we have a JaxRsContextProducer annotated to be injected as a 
> field in our object but when JAXRSUtils is called to run the the container 
> filters it injects the fields annotated as *@Context* , not the fields 
> annotated with *@Inject*.
> {code:java}
>  for (ProviderInfo filter : containerFilters) {
> try {
> InjectionUtils.injectContexts(filter.getProvider(), 
> filter, m);
> filter.getProvider().filter(context);
> } catch (IOException ex) {
> throw ExceptionUtils.toInternalServerErrorException(ex, 
> null); 
> }
> {code}
> It causes our filter(*JaxRsContextFilter*) to throw a NullPointerException 
> when filtering the request because it uses the producer to perform some 
> actions in  this operation.
> I believe this field should be injected as well, not only the *@Context* 
> fields.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7501) Cannot inject field in ContainerRequestFilter

2017-10-27 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16222574#comment-16222574
 ] 

ASF GitHub Bot commented on CXF-7501:
-

johnament commented on a change in pull request #329: CXF-7501: Cannot inject 
field in ContainerRequestFilter (and generally, into any providers registered 
using FeatureContext)
URL: https://github.com/apache/cxf/pull/329#discussion_r147445943
 
 

 ##
 File path: 
integration/cdi/src/main/java/org/apache/cxf/cdi/CdiServerConfigurableFactory.java
 ##
 @@ -0,0 +1,85 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.cdi;
+
+import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.inject.spi.AnnotatedType;
+import javax.enterprise.inject.spi.Bean;
+import javax.enterprise.inject.spi.BeanAttributes;
+import javax.enterprise.inject.spi.BeanManager;
+import javax.enterprise.inject.spi.InjectionTargetFactory;
+import javax.ws.rs.RuntimeType;
+import javax.ws.rs.core.Configurable;
+import javax.ws.rs.core.FeatureContext;
+
+import org.apache.cxf.jaxrs.impl.ConfigurableImpl;
+import org.apache.cxf.jaxrs.impl.ConfigurableImpl.Instantiator;
+import org.apache.cxf.jaxrs.provider.ServerConfigurableFactory;
+
+/** 
+ * Creates the instance of Configurable suitable for CDI-managed runtime.
+ */
+public class CdiServerConfigurableFactory implements ServerConfigurableFactory 
{
+private final BeanManager beanManager;
+
+CdiServerConfigurableFactory(final BeanManager beanManager) {
+this.beanManager = beanManager;
+}
+
+@Override
+public Configurable create(FeatureContext context) {
+return new CdiServerFeatureContextConfigurable(context, beanManager);
+}
+
+/** 
+ * Instantiates the instance of the provider using CDI/BeanManager 
+ */
+private static class CdiInstantiator implements Instantiator {
+private final BeanManager beanManager;
+
+CdiInstantiator(final BeanManager beanManager) {
+this.beanManager = beanManager;
+}
+
+@Override
+public  Object create(Class cls) {
 
 Review comment:
   I see we have a create... should we also have a destroy?  Otherwise, in CDI, 
you run the risk of having dependent scoped beans lying around.  I'm not sure 
if these are meant to be per-request objects or global objects, but if they are 
per request and `@Dependent` scoped then you'll want to destroy them.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Cannot inject field in ContainerRequestFilter
> -
>
> Key: CXF-7501
> URL: https://issues.apache.org/jira/browse/CXF-7501
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.10, 3.2.0
> Environment: Linux Mint 64 bit, TomEE Plus 7.0.3, JavaEE 7 
> application using MVC specification and reference implementation(Libs 
> Attached)
>Reporter: Jeyvison Nascimento
>Assignee: Andriy Redko
>  Labels: cdi
> Attachments: javax-mvc.jar, ozark.jar
>
>
> Hey folks.
> We found a weird behavior while running MVC specification(JSR 371) on TomEE 
> witch CXF. We have a *ContainerRequestFilter* defined called 
> *JaxRsContextFilter* 
> {code:java}
> @PreMatching
> @Priority(0)
> public class JaxRsContextFilter implements ContainerRequestFilter {
> @Inject
> private JaxRsContextProducer jaxRsContextProducer;
> @Context
> private Configuration configuration;
> @Context
> private HttpServletRequest request;
> @Context
> private HttpServletResponse response;
> public JaxRsContextFilter() {
> }
> public void filter(ContainerRequestContext requestContext) throws 
> IOException {
> this.jaxRsContextProducer

[jira] [Commented] (CXF-7501) Cannot inject field in ContainerRequestFilter

2017-10-27 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16222585#comment-16222585
 ] 

ASF GitHub Bot commented on CXF-7501:
-

reta commented on a change in pull request #329: CXF-7501: Cannot inject field 
in ContainerRequestFilter (and generally, into any providers registered using 
FeatureContext)
URL: https://github.com/apache/cxf/pull/329#discussion_r147446613
 
 

 ##
 File path: 
integration/cdi/src/main/java/org/apache/cxf/cdi/CdiServerConfigurableFactory.java
 ##
 @@ -0,0 +1,85 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.cdi;
+
+import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.inject.spi.AnnotatedType;
+import javax.enterprise.inject.spi.Bean;
+import javax.enterprise.inject.spi.BeanAttributes;
+import javax.enterprise.inject.spi.BeanManager;
+import javax.enterprise.inject.spi.InjectionTargetFactory;
+import javax.ws.rs.RuntimeType;
+import javax.ws.rs.core.Configurable;
+import javax.ws.rs.core.FeatureContext;
+
+import org.apache.cxf.jaxrs.impl.ConfigurableImpl;
+import org.apache.cxf.jaxrs.impl.ConfigurableImpl.Instantiator;
+import org.apache.cxf.jaxrs.provider.ServerConfigurableFactory;
+
+/** 
+ * Creates the instance of Configurable suitable for CDI-managed runtime.
+ */
+public class CdiServerConfigurableFactory implements ServerConfigurableFactory 
{
+private final BeanManager beanManager;
+
+CdiServerConfigurableFactory(final BeanManager beanManager) {
+this.beanManager = beanManager;
+}
+
+@Override
+public Configurable create(FeatureContext context) {
+return new CdiServerFeatureContextConfigurable(context, beanManager);
+}
+
+/** 
+ * Instantiates the instance of the provider using CDI/BeanManager 
+ */
+private static class CdiInstantiator implements Instantiator {
+private final BeanManager beanManager;
+
+CdiInstantiator(final BeanManager beanManager) {
+this.beanManager = beanManager;
+}
+
+@Override
+public  Object create(Class cls) {
 
 Review comment:
   Was puzzled to have this as well but there is no lifecycle hook to call the 
destroy /dispose :( 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Cannot inject field in ContainerRequestFilter
> -
>
> Key: CXF-7501
> URL: https://issues.apache.org/jira/browse/CXF-7501
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.10, 3.2.0
> Environment: Linux Mint 64 bit, TomEE Plus 7.0.3, JavaEE 7 
> application using MVC specification and reference implementation(Libs 
> Attached)
>Reporter: Jeyvison Nascimento
>Assignee: Andriy Redko
>  Labels: cdi
> Attachments: javax-mvc.jar, ozark.jar
>
>
> Hey folks.
> We found a weird behavior while running MVC specification(JSR 371) on TomEE 
> witch CXF. We have a *ContainerRequestFilter* defined called 
> *JaxRsContextFilter* 
> {code:java}
> @PreMatching
> @Priority(0)
> public class JaxRsContextFilter implements ContainerRequestFilter {
> @Inject
> private JaxRsContextProducer jaxRsContextProducer;
> @Context
> private Configuration configuration;
> @Context
> private HttpServletRequest request;
> @Context
> private HttpServletResponse response;
> public JaxRsContextFilter() {
> }
> public void filter(ContainerRequestContext requestContext) throws 
> IOException {
> this.jaxRsContextProducer.populate(this.configuration, this.request, 
> this.response);
> }
> }
> {code}
> You can see that we have a JaxRsContextProducer annotated to be injected as a 
> field in our object but when JAXRSUtils is calle

[jira] [Commented] (CXF-7501) Cannot inject field in ContainerRequestFilter

2017-10-27 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16222636#comment-16222636
 ] 

ASF GitHub Bot commented on CXF-7501:
-

rmannibucau commented on a change in pull request #329: CXF-7501: Cannot inject 
field in ContainerRequestFilter (and generally, into any providers registered 
using FeatureContext)
URL: https://github.com/apache/cxf/pull/329#discussion_r147456626
 
 

 ##
 File path: 
integration/cdi/src/main/java/org/apache/cxf/cdi/CdiServerConfigurableFactory.java
 ##
 @@ -0,0 +1,85 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.cdi;
+
+import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.inject.spi.AnnotatedType;
+import javax.enterprise.inject.spi.Bean;
+import javax.enterprise.inject.spi.BeanAttributes;
+import javax.enterprise.inject.spi.BeanManager;
+import javax.enterprise.inject.spi.InjectionTargetFactory;
+import javax.ws.rs.RuntimeType;
+import javax.ws.rs.core.Configurable;
+import javax.ws.rs.core.FeatureContext;
+
+import org.apache.cxf.jaxrs.impl.ConfigurableImpl;
+import org.apache.cxf.jaxrs.impl.ConfigurableImpl.Instantiator;
+import org.apache.cxf.jaxrs.provider.ServerConfigurableFactory;
+
+/** 
+ * Creates the instance of Configurable suitable for CDI-managed runtime.
+ */
+public class CdiServerConfigurableFactory implements ServerConfigurableFactory 
{
+private final BeanManager beanManager;
+
+CdiServerConfigurableFactory(final BeanManager beanManager) {
+this.beanManager = beanManager;
+}
+
+@Override
+public Configurable create(FeatureContext context) {
+return new CdiServerFeatureContextConfigurable(context, beanManager);
+}
+
+/** 
+ * Instantiates the instance of the provider using CDI/BeanManager 
+ */
+private static class CdiInstantiator implements Instantiator {
+private final BeanManager beanManager;
+
+CdiInstantiator(final BeanManager beanManager) {
+this.beanManager = beanManager;
+}
+
+@Override
+public  Object create(Class cls) {
 
 Review comment:
   the client has close() so we can - worse case - use that. Also if the 
beanManager.isNormalScope(bean.getScope()) is true we don't need to call 
context.release()


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Cannot inject field in ContainerRequestFilter
> -
>
> Key: CXF-7501
> URL: https://issues.apache.org/jira/browse/CXF-7501
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.10, 3.2.0
> Environment: Linux Mint 64 bit, TomEE Plus 7.0.3, JavaEE 7 
> application using MVC specification and reference implementation(Libs 
> Attached)
>Reporter: Jeyvison Nascimento
>Assignee: Andriy Redko
>  Labels: cdi
> Attachments: javax-mvc.jar, ozark.jar
>
>
> Hey folks.
> We found a weird behavior while running MVC specification(JSR 371) on TomEE 
> witch CXF. We have a *ContainerRequestFilter* defined called 
> *JaxRsContextFilter* 
> {code:java}
> @PreMatching
> @Priority(0)
> public class JaxRsContextFilter implements ContainerRequestFilter {
> @Inject
> private JaxRsContextProducer jaxRsContextProducer;
> @Context
> private Configuration configuration;
> @Context
> private HttpServletRequest request;
> @Context
> private HttpServletResponse response;
> public JaxRsContextFilter() {
> }
> public void filter(ContainerRequestContext requestContext) throws 
> IOException {
> this.jaxRsContextProducer.populate(this.configuration, this.request, 
> this.response);
> }
> }
> {code}
> You can see that we have a JaxRsContextProducer annotated

[jira] [Commented] (CXF-7501) Cannot inject field in ContainerRequestFilter

2017-10-27 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16222683#comment-16222683
 ] 

ASF GitHub Bot commented on CXF-7501:
-

reta commented on a change in pull request #329: CXF-7501: Cannot inject field 
in ContainerRequestFilter (and generally, into any providers registered using 
FeatureContext)
URL: https://github.com/apache/cxf/pull/329#discussion_r147464372
 
 

 ##
 File path: 
integration/cdi/src/main/java/org/apache/cxf/cdi/CdiServerConfigurableFactory.java
 ##
 @@ -0,0 +1,85 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.cdi;
+
+import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.inject.spi.AnnotatedType;
+import javax.enterprise.inject.spi.Bean;
+import javax.enterprise.inject.spi.BeanAttributes;
+import javax.enterprise.inject.spi.BeanManager;
+import javax.enterprise.inject.spi.InjectionTargetFactory;
+import javax.ws.rs.RuntimeType;
+import javax.ws.rs.core.Configurable;
+import javax.ws.rs.core.FeatureContext;
+
+import org.apache.cxf.jaxrs.impl.ConfigurableImpl;
+import org.apache.cxf.jaxrs.impl.ConfigurableImpl.Instantiator;
+import org.apache.cxf.jaxrs.provider.ServerConfigurableFactory;
+
+/** 
+ * Creates the instance of Configurable suitable for CDI-managed runtime.
+ */
+public class CdiServerConfigurableFactory implements ServerConfigurableFactory 
{
+private final BeanManager beanManager;
+
+CdiServerConfigurableFactory(final BeanManager beanManager) {
+this.beanManager = beanManager;
+}
+
+@Override
+public Configurable create(FeatureContext context) {
+return new CdiServerFeatureContextConfigurable(context, beanManager);
+}
+
+/** 
+ * Instantiates the instance of the provider using CDI/BeanManager 
+ */
+private static class CdiInstantiator implements Instantiator {
+private final BeanManager beanManager;
+
+CdiInstantiator(final BeanManager beanManager) {
+this.beanManager = beanManager;
+}
+
+@Override
+public  Object create(Class cls) {
 
 Review comment:
   This is server-side ... :)


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Cannot inject field in ContainerRequestFilter
> -
>
> Key: CXF-7501
> URL: https://issues.apache.org/jira/browse/CXF-7501
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.10, 3.2.0
> Environment: Linux Mint 64 bit, TomEE Plus 7.0.3, JavaEE 7 
> application using MVC specification and reference implementation(Libs 
> Attached)
>Reporter: Jeyvison Nascimento
>Assignee: Andriy Redko
>  Labels: cdi
> Attachments: javax-mvc.jar, ozark.jar
>
>
> Hey folks.
> We found a weird behavior while running MVC specification(JSR 371) on TomEE 
> witch CXF. We have a *ContainerRequestFilter* defined called 
> *JaxRsContextFilter* 
> {code:java}
> @PreMatching
> @Priority(0)
> public class JaxRsContextFilter implements ContainerRequestFilter {
> @Inject
> private JaxRsContextProducer jaxRsContextProducer;
> @Context
> private Configuration configuration;
> @Context
> private HttpServletRequest request;
> @Context
> private HttpServletResponse response;
> public JaxRsContextFilter() {
> }
> public void filter(ContainerRequestContext requestContext) throws 
> IOException {
> this.jaxRsContextProducer.populate(this.configuration, this.request, 
> this.response);
> }
> }
> {code}
> You can see that we have a JaxRsContextProducer annotated to be injected as a 
> field in our object but when JAXRSUtils is called to run the the container 
> filters it injects the fields annotated a

[jira] [Commented] (CXF-7501) Cannot inject field in ContainerRequestFilter

2017-10-27 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16222704#comment-16222704
 ] 

ASF GitHub Bot commented on CXF-7501:
-

rmannibucau commented on a change in pull request #329: CXF-7501: Cannot inject 
field in ContainerRequestFilter (and generally, into any providers registered 
using FeatureContext)
URL: https://github.com/apache/cxf/pull/329#discussion_r147467401
 
 

 ##
 File path: 
integration/cdi/src/main/java/org/apache/cxf/cdi/CdiServerConfigurableFactory.java
 ##
 @@ -0,0 +1,85 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.cdi;
+
+import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.inject.spi.AnnotatedType;
+import javax.enterprise.inject.spi.Bean;
+import javax.enterprise.inject.spi.BeanAttributes;
+import javax.enterprise.inject.spi.BeanManager;
+import javax.enterprise.inject.spi.InjectionTargetFactory;
+import javax.ws.rs.RuntimeType;
+import javax.ws.rs.core.Configurable;
+import javax.ws.rs.core.FeatureContext;
+
+import org.apache.cxf.jaxrs.impl.ConfigurableImpl;
+import org.apache.cxf.jaxrs.impl.ConfigurableImpl.Instantiator;
+import org.apache.cxf.jaxrs.provider.ServerConfigurableFactory;
+
+/** 
+ * Creates the instance of Configurable suitable for CDI-managed runtime.
+ */
+public class CdiServerConfigurableFactory implements ServerConfigurableFactory 
{
+private final BeanManager beanManager;
+
+CdiServerConfigurableFactory(final BeanManager beanManager) {
+this.beanManager = beanManager;
+}
+
+@Override
+public Configurable create(FeatureContext context) {
+return new CdiServerFeatureContextConfigurable(context, beanManager);
+}
+
+/** 
+ * Instantiates the instance of the provider using CDI/BeanManager 
+ */
+private static class CdiInstantiator implements Instantiator {
+private final BeanManager beanManager;
+
+CdiInstantiator(final BeanManager beanManager) {
+this.beanManager = beanManager;
+}
+
+@Override
+public  Object create(Class cls) {
 
 Review comment:
   -> bam :)
   
   the server has it too (destroy() from memory)


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Cannot inject field in ContainerRequestFilter
> -
>
> Key: CXF-7501
> URL: https://issues.apache.org/jira/browse/CXF-7501
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.10, 3.2.0
> Environment: Linux Mint 64 bit, TomEE Plus 7.0.3, JavaEE 7 
> application using MVC specification and reference implementation(Libs 
> Attached)
>Reporter: Jeyvison Nascimento
>Assignee: Andriy Redko
>  Labels: cdi
> Attachments: javax-mvc.jar, ozark.jar
>
>
> Hey folks.
> We found a weird behavior while running MVC specification(JSR 371) on TomEE 
> witch CXF. We have a *ContainerRequestFilter* defined called 
> *JaxRsContextFilter* 
> {code:java}
> @PreMatching
> @Priority(0)
> public class JaxRsContextFilter implements ContainerRequestFilter {
> @Inject
> private JaxRsContextProducer jaxRsContextProducer;
> @Context
> private Configuration configuration;
> @Context
> private HttpServletRequest request;
> @Context
> private HttpServletResponse response;
> public JaxRsContextFilter() {
> }
> public void filter(ContainerRequestContext requestContext) throws 
> IOException {
> this.jaxRsContextProducer.populate(this.configuration, this.request, 
> this.response);
> }
> }
> {code}
> You can see that we have a JaxRsContextProducer annotated to be injected as a 
> field in our object but when JAXRSUtils is called to run the the container 

[jira] [Commented] (CXF-7501) Cannot inject field in ContainerRequestFilter

2017-10-27 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16222705#comment-16222705
 ] 

ASF GitHub Bot commented on CXF-7501:
-

rmannibucau commented on a change in pull request #329: CXF-7501: Cannot inject 
field in ContainerRequestFilter (and generally, into any providers registered 
using FeatureContext)
URL: https://github.com/apache/cxf/pull/329#discussion_r147467401
 
 

 ##
 File path: 
integration/cdi/src/main/java/org/apache/cxf/cdi/CdiServerConfigurableFactory.java
 ##
 @@ -0,0 +1,85 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.cdi;
+
+import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.inject.spi.AnnotatedType;
+import javax.enterprise.inject.spi.Bean;
+import javax.enterprise.inject.spi.BeanAttributes;
+import javax.enterprise.inject.spi.BeanManager;
+import javax.enterprise.inject.spi.InjectionTargetFactory;
+import javax.ws.rs.RuntimeType;
+import javax.ws.rs.core.Configurable;
+import javax.ws.rs.core.FeatureContext;
+
+import org.apache.cxf.jaxrs.impl.ConfigurableImpl;
+import org.apache.cxf.jaxrs.impl.ConfigurableImpl.Instantiator;
+import org.apache.cxf.jaxrs.provider.ServerConfigurableFactory;
+
+/** 
+ * Creates the instance of Configurable suitable for CDI-managed runtime.
+ */
+public class CdiServerConfigurableFactory implements ServerConfigurableFactory 
{
+private final BeanManager beanManager;
+
+CdiServerConfigurableFactory(final BeanManager beanManager) {
+this.beanManager = beanManager;
+}
+
+@Override
+public Configurable create(FeatureContext context) {
+return new CdiServerFeatureContextConfigurable(context, beanManager);
+}
+
+/** 
+ * Instantiates the instance of the provider using CDI/BeanManager 
+ */
+private static class CdiInstantiator implements Instantiator {
+private final BeanManager beanManager;
+
+CdiInstantiator(final BeanManager beanManager) {
+this.beanManager = beanManager;
+}
+
+@Override
+public  Object create(Class cls) {
 
 Review comment:
   -> bam :)
   
   the server has it too (destroy() from memory), that said it is true for a 
client in a server ;)


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Cannot inject field in ContainerRequestFilter
> -
>
> Key: CXF-7501
> URL: https://issues.apache.org/jira/browse/CXF-7501
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.10, 3.2.0
> Environment: Linux Mint 64 bit, TomEE Plus 7.0.3, JavaEE 7 
> application using MVC specification and reference implementation(Libs 
> Attached)
>Reporter: Jeyvison Nascimento
>Assignee: Andriy Redko
>  Labels: cdi
> Attachments: javax-mvc.jar, ozark.jar
>
>
> Hey folks.
> We found a weird behavior while running MVC specification(JSR 371) on TomEE 
> witch CXF. We have a *ContainerRequestFilter* defined called 
> *JaxRsContextFilter* 
> {code:java}
> @PreMatching
> @Priority(0)
> public class JaxRsContextFilter implements ContainerRequestFilter {
> @Inject
> private JaxRsContextProducer jaxRsContextProducer;
> @Context
> private Configuration configuration;
> @Context
> private HttpServletRequest request;
> @Context
> private HttpServletResponse response;
> public JaxRsContextFilter() {
> }
> public void filter(ContainerRequestContext requestContext) throws 
> IOException {
> this.jaxRsContextProducer.populate(this.configuration, this.request, 
> this.response);
> }
> }
> {code}
> You can see that we have a JaxRsContextProducer annotated to be injected as a 
> field in our object but w

[jira] [Commented] (CXF-7501) Cannot inject field in ContainerRequestFilter

2017-10-27 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16222725#comment-16222725
 ] 

ASF GitHub Bot commented on CXF-7501:
-

reta commented on a change in pull request #329: CXF-7501: Cannot inject field 
in ContainerRequestFilter (and generally, into any providers registered using 
FeatureContext)
URL: https://github.com/apache/cxf/pull/329#discussion_r147470304
 
 

 ##
 File path: 
integration/cdi/src/main/java/org/apache/cxf/cdi/CdiServerConfigurableFactory.java
 ##
 @@ -0,0 +1,85 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.cdi;
+
+import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.inject.spi.AnnotatedType;
+import javax.enterprise.inject.spi.Bean;
+import javax.enterprise.inject.spi.BeanAttributes;
+import javax.enterprise.inject.spi.BeanManager;
+import javax.enterprise.inject.spi.InjectionTargetFactory;
+import javax.ws.rs.RuntimeType;
+import javax.ws.rs.core.Configurable;
+import javax.ws.rs.core.FeatureContext;
+
+import org.apache.cxf.jaxrs.impl.ConfigurableImpl;
+import org.apache.cxf.jaxrs.impl.ConfigurableImpl.Instantiator;
+import org.apache.cxf.jaxrs.provider.ServerConfigurableFactory;
+
+/** 
+ * Creates the instance of Configurable suitable for CDI-managed runtime.
+ */
+public class CdiServerConfigurableFactory implements ServerConfigurableFactory 
{
+private final BeanManager beanManager;
+
+CdiServerConfigurableFactory(final BeanManager beanManager) {
+this.beanManager = beanManager;
+}
+
+@Override
+public Configurable create(FeatureContext context) {
+return new CdiServerFeatureContextConfigurable(context, beanManager);
+}
+
+/** 
+ * Instantiates the instance of the provider using CDI/BeanManager 
+ */
+private static class CdiInstantiator implements Instantiator {
+private final BeanManager beanManager;
+
+CdiInstantiator(final BeanManager beanManager) {
+this.beanManager = beanManager;
+}
+
+@Override
+public  Object create(Class cls) {
 
 Review comment:
   @rmannibucau  let me try to figure out if we could hook in there, thanks for 
the hint


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Cannot inject field in ContainerRequestFilter
> -
>
> Key: CXF-7501
> URL: https://issues.apache.org/jira/browse/CXF-7501
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.10, 3.2.0
> Environment: Linux Mint 64 bit, TomEE Plus 7.0.3, JavaEE 7 
> application using MVC specification and reference implementation(Libs 
> Attached)
>Reporter: Jeyvison Nascimento
>Assignee: Andriy Redko
>  Labels: cdi
> Attachments: javax-mvc.jar, ozark.jar
>
>
> Hey folks.
> We found a weird behavior while running MVC specification(JSR 371) on TomEE 
> witch CXF. We have a *ContainerRequestFilter* defined called 
> *JaxRsContextFilter* 
> {code:java}
> @PreMatching
> @Priority(0)
> public class JaxRsContextFilter implements ContainerRequestFilter {
> @Inject
> private JaxRsContextProducer jaxRsContextProducer;
> @Context
> private Configuration configuration;
> @Context
> private HttpServletRequest request;
> @Context
> private HttpServletResponse response;
> public JaxRsContextFilter() {
> }
> public void filter(ContainerRequestContext requestContext) throws 
> IOException {
> this.jaxRsContextProducer.populate(this.configuration, this.request, 
> this.response);
> }
> }
> {code}
> You can see that we have a JaxRsContextProducer annotated to be injected as a 
> field in our object but when JAXRSUtils is called to run th

[jira] [Commented] (CXF-7501) Cannot inject field in ContainerRequestFilter

2017-10-27 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16222771#comment-16222771
 ] 

ASF GitHub Bot commented on CXF-7501:
-

reta commented on a change in pull request #329: CXF-7501: Cannot inject field 
in ContainerRequestFilter (and generally, into any providers registered using 
FeatureContext)
URL: https://github.com/apache/cxf/pull/329#discussion_r147511834
 
 

 ##
 File path: 
integration/cdi/src/main/java/org/apache/cxf/cdi/CdiServerConfigurableFactory.java
 ##
 @@ -0,0 +1,85 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.cdi;
+
+import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.inject.spi.AnnotatedType;
+import javax.enterprise.inject.spi.Bean;
+import javax.enterprise.inject.spi.BeanAttributes;
+import javax.enterprise.inject.spi.BeanManager;
+import javax.enterprise.inject.spi.InjectionTargetFactory;
+import javax.ws.rs.RuntimeType;
+import javax.ws.rs.core.Configurable;
+import javax.ws.rs.core.FeatureContext;
+
+import org.apache.cxf.jaxrs.impl.ConfigurableImpl;
+import org.apache.cxf.jaxrs.impl.ConfigurableImpl.Instantiator;
+import org.apache.cxf.jaxrs.provider.ServerConfigurableFactory;
+
+/** 
+ * Creates the instance of Configurable suitable for CDI-managed runtime.
+ */
+public class CdiServerConfigurableFactory implements ServerConfigurableFactory 
{
+private final BeanManager beanManager;
+
+CdiServerConfigurableFactory(final BeanManager beanManager) {
+this.beanManager = beanManager;
+}
+
+@Override
+public Configurable create(FeatureContext context) {
+return new CdiServerFeatureContextConfigurable(context, beanManager);
+}
+
+/** 
+ * Instantiates the instance of the provider using CDI/BeanManager 
+ */
+private static class CdiInstantiator implements Instantiator {
+private final BeanManager beanManager;
+
+CdiInstantiator(final BeanManager beanManager) {
+this.beanManager = beanManager;
+}
+
+@Override
+public  Object create(Class cls) {
 
 Review comment:
   @johnament @rmannibucau Haven't found the acceptable way to dispose the 
created beans. It would be good to have that however `Feature`s (and 
`DynamicFeature`s) are instantiated at deployment (when JAX-RS resources are 
discovered) hereby should not be subject of request scoped but only global one. 
When server is shutting down (destroy) everything will be gone so may not worth 
introducing complex disposal mechanisms. Makes sense?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Cannot inject field in ContainerRequestFilter
> -
>
> Key: CXF-7501
> URL: https://issues.apache.org/jira/browse/CXF-7501
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.10, 3.2.0
> Environment: Linux Mint 64 bit, TomEE Plus 7.0.3, JavaEE 7 
> application using MVC specification and reference implementation(Libs 
> Attached)
>Reporter: Jeyvison Nascimento
>Assignee: Andriy Redko
>  Labels: cdi
> Attachments: javax-mvc.jar, ozark.jar
>
>
> Hey folks.
> We found a weird behavior while running MVC specification(JSR 371) on TomEE 
> witch CXF. We have a *ContainerRequestFilter* defined called 
> *JaxRsContextFilter* 
> {code:java}
> @PreMatching
> @Priority(0)
> public class JaxRsContextFilter implements ContainerRequestFilter {
> @Inject
> private JaxRsContextProducer jaxRsContextProducer;
> @Context
> private Configuration configuration;
> @Context
> private HttpServletRequest request;
> @Context
> private HttpServletResponse response;
> public JaxRsContextFilter() {
> }

[jira] [Commented] (CXF-7501) Cannot inject field in ContainerRequestFilter

2017-10-27 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16222798#comment-16222798
 ] 

ASF GitHub Bot commented on CXF-7501:
-

rmannibucau commented on a change in pull request #329: CXF-7501: Cannot inject 
field in ContainerRequestFilter (and generally, into any providers registered 
using FeatureContext)
URL: https://github.com/apache/cxf/pull/329#discussion_r147514227
 
 

 ##
 File path: 
integration/cdi/src/main/java/org/apache/cxf/cdi/CdiServerConfigurableFactory.java
 ##
 @@ -0,0 +1,85 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.cdi;
+
+import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.inject.spi.AnnotatedType;
+import javax.enterprise.inject.spi.Bean;
+import javax.enterprise.inject.spi.BeanAttributes;
+import javax.enterprise.inject.spi.BeanManager;
+import javax.enterprise.inject.spi.InjectionTargetFactory;
+import javax.ws.rs.RuntimeType;
+import javax.ws.rs.core.Configurable;
+import javax.ws.rs.core.FeatureContext;
+
+import org.apache.cxf.jaxrs.impl.ConfigurableImpl;
+import org.apache.cxf.jaxrs.impl.ConfigurableImpl.Instantiator;
+import org.apache.cxf.jaxrs.provider.ServerConfigurableFactory;
+
+/** 
+ * Creates the instance of Configurable suitable for CDI-managed runtime.
+ */
+public class CdiServerConfigurableFactory implements ServerConfigurableFactory 
{
+private final BeanManager beanManager;
+
+CdiServerConfigurableFactory(final BeanManager beanManager) {
+this.beanManager = beanManager;
+}
+
+@Override
+public Configurable create(FeatureContext context) {
+return new CdiServerFeatureContextConfigurable(context, beanManager);
+}
+
+/** 
+ * Instantiates the instance of the provider using CDI/BeanManager 
+ */
+private static class CdiInstantiator implements Instantiator {
+private final BeanManager beanManager;
+
+CdiInstantiator(final BeanManager beanManager) {
+this.beanManager = beanManager;
+}
+
+@Override
+public  Object create(Class cls) {
 
 Review comment:
   Issue is more for dependent beans which must be released to avoid to leak 
data/memory when the app is undeployed but the server is not killed so we 
should really have a lifecycle for the configurable which is bound to the 
underlying instance and worse case to the Server.
   
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Cannot inject field in ContainerRequestFilter
> -
>
> Key: CXF-7501
> URL: https://issues.apache.org/jira/browse/CXF-7501
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.10, 3.2.0
> Environment: Linux Mint 64 bit, TomEE Plus 7.0.3, JavaEE 7 
> application using MVC specification and reference implementation(Libs 
> Attached)
>Reporter: Jeyvison Nascimento
>Assignee: Andriy Redko
>  Labels: cdi
> Attachments: javax-mvc.jar, ozark.jar
>
>
> Hey folks.
> We found a weird behavior while running MVC specification(JSR 371) on TomEE 
> witch CXF. We have a *ContainerRequestFilter* defined called 
> *JaxRsContextFilter* 
> {code:java}
> @PreMatching
> @Priority(0)
> public class JaxRsContextFilter implements ContainerRequestFilter {
> @Inject
> private JaxRsContextProducer jaxRsContextProducer;
> @Context
> private Configuration configuration;
> @Context
> private HttpServletRequest request;
> @Context
> private HttpServletResponse response;
> public JaxRsContextFilter() {
> }
> public void filter(ContainerRequestContext requestContext) throws 
> IOException {
> this.jaxRsContextProducer.populate(this.configur

[jira] [Commented] (CXF-7501) Cannot inject field in ContainerRequestFilter

2017-10-27 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16223083#comment-16223083
 ] 

ASF GitHub Bot commented on CXF-7501:
-

reta commented on a change in pull request #329: CXF-7501: Cannot inject field 
in ContainerRequestFilter (and generally, into any providers registered using 
FeatureContext)
URL: https://github.com/apache/cxf/pull/329#discussion_r147539875
 
 

 ##
 File path: 
integration/cdi/src/main/java/org/apache/cxf/cdi/CdiServerConfigurableFactory.java
 ##
 @@ -0,0 +1,85 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.cdi;
+
+import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.inject.spi.AnnotatedType;
+import javax.enterprise.inject.spi.Bean;
+import javax.enterprise.inject.spi.BeanAttributes;
+import javax.enterprise.inject.spi.BeanManager;
+import javax.enterprise.inject.spi.InjectionTargetFactory;
+import javax.ws.rs.RuntimeType;
+import javax.ws.rs.core.Configurable;
+import javax.ws.rs.core.FeatureContext;
+
+import org.apache.cxf.jaxrs.impl.ConfigurableImpl;
+import org.apache.cxf.jaxrs.impl.ConfigurableImpl.Instantiator;
+import org.apache.cxf.jaxrs.provider.ServerConfigurableFactory;
+
+/** 
+ * Creates the instance of Configurable suitable for CDI-managed runtime.
+ */
+public class CdiServerConfigurableFactory implements ServerConfigurableFactory 
{
+private final BeanManager beanManager;
+
+CdiServerConfigurableFactory(final BeanManager beanManager) {
+this.beanManager = beanManager;
+}
+
+@Override
+public Configurable create(FeatureContext context) {
+return new CdiServerFeatureContextConfigurable(context, beanManager);
+}
+
+/** 
+ * Instantiates the instance of the provider using CDI/BeanManager 
+ */
+private static class CdiInstantiator implements Instantiator {
+private final BeanManager beanManager;
+
+CdiInstantiator(final BeanManager beanManager) {
+this.beanManager = beanManager;
+}
+
+@Override
+public  Object create(Class cls) {
 
 Review comment:
   Hard to disagree with that indeed, CXF should be a good citizen there. So 
I've came up with quite simple solution using CDI events. Whenever we create 
the context in such circumstances, we register it for later disposal inside 
`JAXRSCdiResourceExtension` by firing the event (the same way we manage all 
other managed beans we create inside the CDI extension). It seems to work 
perfectly fine and releases the contexts on shutdown. Thoughts?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Cannot inject field in ContainerRequestFilter
> -
>
> Key: CXF-7501
> URL: https://issues.apache.org/jira/browse/CXF-7501
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.10, 3.2.0
> Environment: Linux Mint 64 bit, TomEE Plus 7.0.3, JavaEE 7 
> application using MVC specification and reference implementation(Libs 
> Attached)
>Reporter: Jeyvison Nascimento
>Assignee: Andriy Redko
>  Labels: cdi
> Attachments: javax-mvc.jar, ozark.jar
>
>
> Hey folks.
> We found a weird behavior while running MVC specification(JSR 371) on TomEE 
> witch CXF. We have a *ContainerRequestFilter* defined called 
> *JaxRsContextFilter* 
> {code:java}
> @PreMatching
> @Priority(0)
> public class JaxRsContextFilter implements ContainerRequestFilter {
> @Inject
> private JaxRsContextProducer jaxRsContextProducer;
> @Context
> private Configuration configuration;
> @Context
> private HttpServletRequest request;
> @Context
> private HttpServletResponse response;
> public JaxRsContextFilter() {

[jira] [Commented] (CXF-7501) Cannot inject field in ContainerRequestFilter

2017-10-28 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16223302#comment-16223302
 ] 

ASF GitHub Bot commented on CXF-7501:
-

rmannibucau commented on a change in pull request #329: CXF-7501: Cannot inject 
field in ContainerRequestFilter (and generally, into any providers registered 
using FeatureContext)
URL: https://github.com/apache/cxf/pull/329#discussion_r147548597
 
 

 ##
 File path: 
integration/cdi/src/main/java/org/apache/cxf/cdi/CdiServerConfigurableFactory.java
 ##
 @@ -0,0 +1,85 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.cdi;
+
+import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.inject.spi.AnnotatedType;
+import javax.enterprise.inject.spi.Bean;
+import javax.enterprise.inject.spi.BeanAttributes;
+import javax.enterprise.inject.spi.BeanManager;
+import javax.enterprise.inject.spi.InjectionTargetFactory;
+import javax.ws.rs.RuntimeType;
+import javax.ws.rs.core.Configurable;
+import javax.ws.rs.core.FeatureContext;
+
+import org.apache.cxf.jaxrs.impl.ConfigurableImpl;
+import org.apache.cxf.jaxrs.impl.ConfigurableImpl.Instantiator;
+import org.apache.cxf.jaxrs.provider.ServerConfigurableFactory;
+
+/** 
+ * Creates the instance of Configurable suitable for CDI-managed runtime.
+ */
+public class CdiServerConfigurableFactory implements ServerConfigurableFactory 
{
+private final BeanManager beanManager;
+
+CdiServerConfigurableFactory(final BeanManager beanManager) {
+this.beanManager = beanManager;
+}
+
+@Override
+public Configurable create(FeatureContext context) {
+return new CdiServerFeatureContextConfigurable(context, beanManager);
+}
+
+/** 
+ * Instantiates the instance of the provider using CDI/BeanManager 
+ */
+private static class CdiInstantiator implements Instantiator {
+private final BeanManager beanManager;
+
+CdiInstantiator(final BeanManager beanManager) {
+this.beanManager = beanManager;
+}
+
+@Override
+public  Object create(Class cls) {
 
 Review comment:
   Looks good for the server side :)


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Cannot inject field in ContainerRequestFilter
> -
>
> Key: CXF-7501
> URL: https://issues.apache.org/jira/browse/CXF-7501
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.10, 3.2.0
> Environment: Linux Mint 64 bit, TomEE Plus 7.0.3, JavaEE 7 
> application using MVC specification and reference implementation(Libs 
> Attached)
>Reporter: Jeyvison Nascimento
>Assignee: Andriy Redko
>  Labels: cdi
> Attachments: javax-mvc.jar, ozark.jar
>
>
> Hey folks.
> We found a weird behavior while running MVC specification(JSR 371) on TomEE 
> witch CXF. We have a *ContainerRequestFilter* defined called 
> *JaxRsContextFilter* 
> {code:java}
> @PreMatching
> @Priority(0)
> public class JaxRsContextFilter implements ContainerRequestFilter {
> @Inject
> private JaxRsContextProducer jaxRsContextProducer;
> @Context
> private Configuration configuration;
> @Context
> private HttpServletRequest request;
> @Context
> private HttpServletResponse response;
> public JaxRsContextFilter() {
> }
> public void filter(ContainerRequestContext requestContext) throws 
> IOException {
> this.jaxRsContextProducer.populate(this.configuration, this.request, 
> this.response);
> }
> }
> {code}
> You can see that we have a JaxRsContextProducer annotated to be injected as a 
> field in our object but when JAXRSUtils is called to run the the container 
> filters it injects the fiel

[jira] [Commented] (CXF-7501) Cannot inject field in ContainerRequestFilter

2017-10-28 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16223478#comment-16223478
 ] 

ASF GitHub Bot commented on CXF-7501:
-

reta closed pull request #329: CXF-7501: Cannot inject field in 
ContainerRequestFilter (and generally, into any providers registered using 
FeatureContext)
URL: https://github.com/apache/cxf/pull/329
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/integration/cdi/src/main/java/org/apache/cxf/cdi/CdiServerConfigurableFactory.java
 
b/integration/cdi/src/main/java/org/apache/cxf/cdi/CdiServerConfigurableFactory.java
new file mode 100644
index 000..15d4643d847
--- /dev/null
+++ 
b/integration/cdi/src/main/java/org/apache/cxf/cdi/CdiServerConfigurableFactory.java
@@ -0,0 +1,91 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.cdi;
+
+import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.inject.spi.AnnotatedType;
+import javax.enterprise.inject.spi.Bean;
+import javax.enterprise.inject.spi.BeanAttributes;
+import javax.enterprise.inject.spi.BeanManager;
+import javax.enterprise.inject.spi.InjectionTargetFactory;
+import javax.ws.rs.RuntimeType;
+import javax.ws.rs.core.Configurable;
+import javax.ws.rs.core.FeatureContext;
+
+import org.apache.cxf.cdi.event.DisposableCreationalContext;
+import org.apache.cxf.jaxrs.impl.ConfigurableImpl;
+import org.apache.cxf.jaxrs.impl.ConfigurableImpl.Instantiator;
+import org.apache.cxf.jaxrs.provider.ServerConfigurableFactory;
+
+/** 
+ * Creates the instance of Configurable suitable for CDI-managed runtime.
+ */
+public class CdiServerConfigurableFactory implements ServerConfigurableFactory 
{
+private final BeanManager beanManager;
+
+CdiServerConfigurableFactory(final BeanManager beanManager) {
+this.beanManager = beanManager;
+}
+
+@Override
+public Configurable create(FeatureContext context) {
+return new CdiServerFeatureContextConfigurable(context, beanManager);
+}
+
+/** 
+ * Instantiates the instance of the provider using CDI/BeanManager 
+ */
+private static class CdiInstantiator implements Instantiator {
+private final BeanManager beanManager;
+
+CdiInstantiator(final BeanManager beanManager) {
+this.beanManager = beanManager;
+}
+
+@Override
+public  Object create(Class cls) {
+final AnnotatedType annotatedType = 
beanManager.createAnnotatedType(cls);
+final InjectionTargetFactory injectionTargetFactory = 
+beanManager.getInjectionTargetFactory(annotatedType);
+final BeanAttributes attributes = 
beanManager.createBeanAttributes(annotatedType);
+final Bean bean = beanManager.createBean(attributes, cls, 
injectionTargetFactory);
+final CreationalContext context = 
beanManager.createCreationalContext(bean);
+
+if (!beanManager.isNormalScope(bean.getScope())) {
+beanManager.fireEvent(new 
DisposableCreationalContext(context));
+}
+
+return beanManager.getReference(bean, cls, context);
+}
+}
+
+private static class CdiServerFeatureContextConfigurable extends 
ConfigurableImpl {
+private final Instantiator instantiator;
+
+CdiServerFeatureContextConfigurable(FeatureContext mc, BeanManager 
beanManager) {
+super(mc, RuntimeType.SERVER, SERVER_FILTER_INTERCEPTOR_CLASSES);
+this.instantiator = new CdiInstantiator(beanManager);
+}
+
+@Override
+protected Instantiator getInstantiator() {
+return instantiator;
+}
+}
+}
diff --git 
a/integration/cdi/src/main/java/org/apache/cxf/cdi/JAXRSCdiResourceExtension.java
 
b/integration/cdi/src/main/java/org/apache/cxf/cdi/JAXRSCd

[jira] [Commented] (CXF-7501) Cannot inject field in ContainerRequestFilter

2017-10-28 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16223477#comment-16223477
 ] 

ASF GitHub Bot commented on CXF-7501:
-

reta commented on a change in pull request #329: CXF-7501: Cannot inject field 
in ContainerRequestFilter (and generally, into any providers registered using 
FeatureContext)
URL: https://github.com/apache/cxf/pull/329#discussion_r147553761
 
 

 ##
 File path: 
integration/cdi/src/main/java/org/apache/cxf/cdi/CdiServerConfigurableFactory.java
 ##
 @@ -0,0 +1,85 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.cdi;
+
+import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.inject.spi.AnnotatedType;
+import javax.enterprise.inject.spi.Bean;
+import javax.enterprise.inject.spi.BeanAttributes;
+import javax.enterprise.inject.spi.BeanManager;
+import javax.enterprise.inject.spi.InjectionTargetFactory;
+import javax.ws.rs.RuntimeType;
+import javax.ws.rs.core.Configurable;
+import javax.ws.rs.core.FeatureContext;
+
+import org.apache.cxf.jaxrs.impl.ConfigurableImpl;
+import org.apache.cxf.jaxrs.impl.ConfigurableImpl.Instantiator;
+import org.apache.cxf.jaxrs.provider.ServerConfigurableFactory;
+
+/** 
+ * Creates the instance of Configurable suitable for CDI-managed runtime.
+ */
+public class CdiServerConfigurableFactory implements ServerConfigurableFactory 
{
+private final BeanManager beanManager;
+
+CdiServerConfigurableFactory(final BeanManager beanManager) {
+this.beanManager = beanManager;
+}
+
+@Override
+public Configurable create(FeatureContext context) {
+return new CdiServerFeatureContextConfigurable(context, beanManager);
+}
+
+/** 
+ * Instantiates the instance of the provider using CDI/BeanManager 
+ */
+private static class CdiInstantiator implements Instantiator {
+private final BeanManager beanManager;
+
+CdiInstantiator(final BeanManager beanManager) {
+this.beanManager = beanManager;
+}
+
+@Override
+public  Object create(Class cls) {
 
 Review comment:
   Thanks guys for the comments, merging ...


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Cannot inject field in ContainerRequestFilter
> -
>
> Key: CXF-7501
> URL: https://issues.apache.org/jira/browse/CXF-7501
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.10, 3.2.0
> Environment: Linux Mint 64 bit, TomEE Plus 7.0.3, JavaEE 7 
> application using MVC specification and reference implementation(Libs 
> Attached)
>Reporter: Jeyvison Nascimento
>Assignee: Andriy Redko
>  Labels: cdi
> Attachments: javax-mvc.jar, ozark.jar
>
>
> Hey folks.
> We found a weird behavior while running MVC specification(JSR 371) on TomEE 
> witch CXF. We have a *ContainerRequestFilter* defined called 
> *JaxRsContextFilter* 
> {code:java}
> @PreMatching
> @Priority(0)
> public class JaxRsContextFilter implements ContainerRequestFilter {
> @Inject
> private JaxRsContextProducer jaxRsContextProducer;
> @Context
> private Configuration configuration;
> @Context
> private HttpServletRequest request;
> @Context
> private HttpServletResponse response;
> public JaxRsContextFilter() {
> }
> public void filter(ContainerRequestContext requestContext) throws 
> IOException {
> this.jaxRsContextProducer.populate(this.configuration, this.request, 
> this.response);
> }
> }
> {code}
> You can see that we have a JaxRsContextProducer annotated to be injected as a 
> field in our object but when JAXRSUtils is called to run the the container 
> filters it injects the fie

[jira] [Commented] (CXF-7501) Cannot inject field in ContainerRequestFilter

2017-10-28 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16223806#comment-16223806
 ] 

ASF GitHub Bot commented on CXF-7501:
-

johnament commented on a change in pull request #329: CXF-7501: Cannot inject 
field in ContainerRequestFilter (and generally, into any providers registered 
using FeatureContext)
URL: https://github.com/apache/cxf/pull/329#discussion_r147568247
 
 

 ##
 File path: 
integration/cdi/src/main/java/org/apache/cxf/cdi/CdiServerConfigurableFactory.java
 ##
 @@ -0,0 +1,85 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.cdi;
+
+import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.inject.spi.AnnotatedType;
+import javax.enterprise.inject.spi.Bean;
+import javax.enterprise.inject.spi.BeanAttributes;
+import javax.enterprise.inject.spi.BeanManager;
+import javax.enterprise.inject.spi.InjectionTargetFactory;
+import javax.ws.rs.RuntimeType;
+import javax.ws.rs.core.Configurable;
+import javax.ws.rs.core.FeatureContext;
+
+import org.apache.cxf.jaxrs.impl.ConfigurableImpl;
+import org.apache.cxf.jaxrs.impl.ConfigurableImpl.Instantiator;
+import org.apache.cxf.jaxrs.provider.ServerConfigurableFactory;
+
+/** 
+ * Creates the instance of Configurable suitable for CDI-managed runtime.
+ */
+public class CdiServerConfigurableFactory implements ServerConfigurableFactory 
{
+private final BeanManager beanManager;
+
+CdiServerConfigurableFactory(final BeanManager beanManager) {
+this.beanManager = beanManager;
+}
+
+@Override
+public Configurable create(FeatureContext context) {
+return new CdiServerFeatureContextConfigurable(context, beanManager);
+}
+
+/** 
+ * Instantiates the instance of the provider using CDI/BeanManager 
+ */
+private static class CdiInstantiator implements Instantiator {
+private final BeanManager beanManager;
+
+CdiInstantiator(final BeanManager beanManager) {
+this.beanManager = beanManager;
+}
+
+@Override
+public  Object create(Class cls) {
 
 Review comment:
   Hmmm I just noticed something looking at another issue.  I think this may 
assume that all providers now registered are within a CDI bean archive.  We may 
want to do a fallback in case the bean cannot be located.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Cannot inject field in ContainerRequestFilter
> -
>
> Key: CXF-7501
> URL: https://issues.apache.org/jira/browse/CXF-7501
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.10, 3.2.0
> Environment: Linux Mint 64 bit, TomEE Plus 7.0.3, JavaEE 7 
> application using MVC specification and reference implementation(Libs 
> Attached)
>Reporter: Jeyvison Nascimento
>Assignee: Andriy Redko
>  Labels: cdi
> Fix For: 3.1.14, 3.2.1
>
> Attachments: javax-mvc.jar, ozark.jar
>
>
> Hey folks.
> We found a weird behavior while running MVC specification(JSR 371) on TomEE 
> witch CXF. We have a *ContainerRequestFilter* defined called 
> *JaxRsContextFilter* 
> {code:java}
> @PreMatching
> @Priority(0)
> public class JaxRsContextFilter implements ContainerRequestFilter {
> @Inject
> private JaxRsContextProducer jaxRsContextProducer;
> @Context
> private Configuration configuration;
> @Context
> private HttpServletRequest request;
> @Context
> private HttpServletResponse response;
> public JaxRsContextFilter() {
> }
> public void filter(ContainerRequestContext requestContext) throws 
> IOException {
> this.jaxRsContextProducer.populate(this.configuration, this.request, 
> this.res

[jira] [Commented] (CXF-7501) Cannot inject field in ContainerRequestFilter

2017-10-29 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16224007#comment-16224007
 ] 

ASF GitHub Bot commented on CXF-7501:
-

reta commented on a change in pull request #329: CXF-7501: Cannot inject field 
in ContainerRequestFilter (and generally, into any providers registered using 
FeatureContext)
URL: https://github.com/apache/cxf/pull/329#discussion_r147582392
 
 

 ##
 File path: 
integration/cdi/src/main/java/org/apache/cxf/cdi/CdiServerConfigurableFactory.java
 ##
 @@ -0,0 +1,85 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.cdi;
+
+import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.inject.spi.AnnotatedType;
+import javax.enterprise.inject.spi.Bean;
+import javax.enterprise.inject.spi.BeanAttributes;
+import javax.enterprise.inject.spi.BeanManager;
+import javax.enterprise.inject.spi.InjectionTargetFactory;
+import javax.ws.rs.RuntimeType;
+import javax.ws.rs.core.Configurable;
+import javax.ws.rs.core.FeatureContext;
+
+import org.apache.cxf.jaxrs.impl.ConfigurableImpl;
+import org.apache.cxf.jaxrs.impl.ConfigurableImpl.Instantiator;
+import org.apache.cxf.jaxrs.provider.ServerConfigurableFactory;
+
+/** 
+ * Creates the instance of Configurable suitable for CDI-managed runtime.
+ */
+public class CdiServerConfigurableFactory implements ServerConfigurableFactory 
{
+private final BeanManager beanManager;
+
+CdiServerConfigurableFactory(final BeanManager beanManager) {
+this.beanManager = beanManager;
+}
+
+@Override
+public Configurable create(FeatureContext context) {
+return new CdiServerFeatureContextConfigurable(context, beanManager);
+}
+
+/** 
+ * Instantiates the instance of the provider using CDI/BeanManager 
+ */
+private static class CdiInstantiator implements Instantiator {
+private final BeanManager beanManager;
+
+CdiInstantiator(final BeanManager beanManager) {
+this.beanManager = beanManager;
+}
+
+@Override
+public  Object create(Class cls) {
 
 Review comment:
   Thanks for spotting that @johnament, I will address it shortly.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Cannot inject field in ContainerRequestFilter
> -
>
> Key: CXF-7501
> URL: https://issues.apache.org/jira/browse/CXF-7501
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.10, 3.2.0
> Environment: Linux Mint 64 bit, TomEE Plus 7.0.3, JavaEE 7 
> application using MVC specification and reference implementation(Libs 
> Attached)
>Reporter: Jeyvison Nascimento
>Assignee: Andriy Redko
>  Labels: cdi
> Fix For: 3.1.14, 3.2.1
>
> Attachments: javax-mvc.jar, ozark.jar
>
>
> Hey folks.
> We found a weird behavior while running MVC specification(JSR 371) on TomEE 
> witch CXF. We have a *ContainerRequestFilter* defined called 
> *JaxRsContextFilter* 
> {code:java}
> @PreMatching
> @Priority(0)
> public class JaxRsContextFilter implements ContainerRequestFilter {
> @Inject
> private JaxRsContextProducer jaxRsContextProducer;
> @Context
> private Configuration configuration;
> @Context
> private HttpServletRequest request;
> @Context
> private HttpServletResponse response;
> public JaxRsContextFilter() {
> }
> public void filter(ContainerRequestContext requestContext) throws 
> IOException {
> this.jaxRsContextProducer.populate(this.configuration, this.request, 
> this.response);
> }
> }
> {code}
> You can see that we have a JaxRsContextProducer annotated to be injected as a 
> field in our object but when JAXRSUtils is 

[jira] [Commented] (CXF-7501) Cannot inject field in ContainerRequestFilter

2017-10-29 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16224044#comment-16224044
 ] 

ASF GitHub Bot commented on CXF-7501:
-

reta commented on a change in pull request #329: CXF-7501: Cannot inject field 
in ContainerRequestFilter (and generally, into any providers registered using 
FeatureContext)
URL: https://github.com/apache/cxf/pull/329#discussion_r147584922
 
 

 ##
 File path: 
integration/cdi/src/main/java/org/apache/cxf/cdi/CdiServerConfigurableFactory.java
 ##
 @@ -0,0 +1,85 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.cdi;
+
+import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.inject.spi.AnnotatedType;
+import javax.enterprise.inject.spi.Bean;
+import javax.enterprise.inject.spi.BeanAttributes;
+import javax.enterprise.inject.spi.BeanManager;
+import javax.enterprise.inject.spi.InjectionTargetFactory;
+import javax.ws.rs.RuntimeType;
+import javax.ws.rs.core.Configurable;
+import javax.ws.rs.core.FeatureContext;
+
+import org.apache.cxf.jaxrs.impl.ConfigurableImpl;
+import org.apache.cxf.jaxrs.impl.ConfigurableImpl.Instantiator;
+import org.apache.cxf.jaxrs.provider.ServerConfigurableFactory;
+
+/** 
+ * Creates the instance of Configurable suitable for CDI-managed runtime.
+ */
+public class CdiServerConfigurableFactory implements ServerConfigurableFactory 
{
+private final BeanManager beanManager;
+
+CdiServerConfigurableFactory(final BeanManager beanManager) {
+this.beanManager = beanManager;
+}
+
+@Override
+public Configurable create(FeatureContext context) {
+return new CdiServerFeatureContextConfigurable(context, beanManager);
+}
+
+/** 
+ * Instantiates the instance of the provider using CDI/BeanManager 
+ */
+private static class CdiInstantiator implements Instantiator {
+private final BeanManager beanManager;
+
+CdiInstantiator(final BeanManager beanManager) {
+this.beanManager = beanManager;
+}
+
+@Override
+public  Object create(Class cls) {
 
 Review comment:
   @johnament hmm (my turn), so in the test case we have there are 2 providers: 
one from bean archive, another from regular JAR file (not a bean archive). In 
both cases, the bean is located successfully. Looking why, BeanManager 
implementation (OWB, Weld) does the fallback in case there is no bean archive 
for a class available.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Cannot inject field in ContainerRequestFilter
> -
>
> Key: CXF-7501
> URL: https://issues.apache.org/jira/browse/CXF-7501
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.10, 3.2.0
> Environment: Linux Mint 64 bit, TomEE Plus 7.0.3, JavaEE 7 
> application using MVC specification and reference implementation(Libs 
> Attached)
>Reporter: Jeyvison Nascimento
>Assignee: Andriy Redko
>  Labels: cdi
> Fix For: 3.1.14, 3.2.1
>
> Attachments: javax-mvc.jar, ozark.jar
>
>
> Hey folks.
> We found a weird behavior while running MVC specification(JSR 371) on TomEE 
> witch CXF. We have a *ContainerRequestFilter* defined called 
> *JaxRsContextFilter* 
> {code:java}
> @PreMatching
> @Priority(0)
> public class JaxRsContextFilter implements ContainerRequestFilter {
> @Inject
> private JaxRsContextProducer jaxRsContextProducer;
> @Context
> private Configuration configuration;
> @Context
> private HttpServletRequest request;
> @Context
> private HttpServletResponse response;
> public JaxRsContextFilter() {
> }
> public void filter(ContainerRequestContext requestContext) th

[jira] [Commented] (CXF-7501) Cannot inject field in ContainerRequestFilter

2017-10-29 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16224045#comment-16224045
 ] 

ASF GitHub Bot commented on CXF-7501:
-

rmannibucau commented on a change in pull request #329: CXF-7501: Cannot inject 
field in ContainerRequestFilter (and generally, into any providers registered 
using FeatureContext)
URL: https://github.com/apache/cxf/pull/329#discussion_r147585124
 
 

 ##
 File path: 
integration/cdi/src/main/java/org/apache/cxf/cdi/CdiServerConfigurableFactory.java
 ##
 @@ -0,0 +1,85 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.cdi;
+
+import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.inject.spi.AnnotatedType;
+import javax.enterprise.inject.spi.Bean;
+import javax.enterprise.inject.spi.BeanAttributes;
+import javax.enterprise.inject.spi.BeanManager;
+import javax.enterprise.inject.spi.InjectionTargetFactory;
+import javax.ws.rs.RuntimeType;
+import javax.ws.rs.core.Configurable;
+import javax.ws.rs.core.FeatureContext;
+
+import org.apache.cxf.jaxrs.impl.ConfigurableImpl;
+import org.apache.cxf.jaxrs.impl.ConfigurableImpl.Instantiator;
+import org.apache.cxf.jaxrs.provider.ServerConfigurableFactory;
+
+/** 
+ * Creates the instance of Configurable suitable for CDI-managed runtime.
+ */
+public class CdiServerConfigurableFactory implements ServerConfigurableFactory 
{
+private final BeanManager beanManager;
+
+CdiServerConfigurableFactory(final BeanManager beanManager) {
+this.beanManager = beanManager;
+}
+
+@Override
+public Configurable create(FeatureContext context) {
+return new CdiServerFeatureContextConfigurable(context, beanManager);
+}
+
+/** 
+ * Instantiates the instance of the provider using CDI/BeanManager 
+ */
+private static class CdiInstantiator implements Instantiator {
+private final BeanManager beanManager;
+
+CdiInstantiator(final BeanManager beanManager) {
+this.beanManager = beanManager;
+}
+
+@Override
+public  Object create(Class cls) {
 
 Review comment:
   @reta if not a bean you will not get a Bean instance doing the lookup 
(empty Set). If it is found it means the jar was scanned and the bean activated 
somehow. The issue can come from the test setup, did you try with jackson for 
instance or a plain custom-provider-nocdi.jar?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Cannot inject field in ContainerRequestFilter
> -
>
> Key: CXF-7501
> URL: https://issues.apache.org/jira/browse/CXF-7501
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.10, 3.2.0
> Environment: Linux Mint 64 bit, TomEE Plus 7.0.3, JavaEE 7 
> application using MVC specification and reference implementation(Libs 
> Attached)
>Reporter: Jeyvison Nascimento
>Assignee: Andriy Redko
>  Labels: cdi
> Fix For: 3.1.14, 3.2.1
>
> Attachments: javax-mvc.jar, ozark.jar
>
>
> Hey folks.
> We found a weird behavior while running MVC specification(JSR 371) on TomEE 
> witch CXF. We have a *ContainerRequestFilter* defined called 
> *JaxRsContextFilter* 
> {code:java}
> @PreMatching
> @Priority(0)
> public class JaxRsContextFilter implements ContainerRequestFilter {
> @Inject
> private JaxRsContextProducer jaxRsContextProducer;
> @Context
> private Configuration configuration;
> @Context
> private HttpServletRequest request;
> @Context
> private HttpServletResponse response;
> public JaxRsContextFilter() {
> }
> public void filter(ContainerRequestContext requestContext) throws 
> IOException {
> this.jaxRsCont

[jira] [Commented] (CXF-7501) Cannot inject field in ContainerRequestFilter

2017-10-29 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16224048#comment-16224048
 ] 

ASF GitHub Bot commented on CXF-7501:
-

reta commented on a change in pull request #329: CXF-7501: Cannot inject field 
in ContainerRequestFilter (and generally, into any providers registered using 
FeatureContext)
URL: https://github.com/apache/cxf/pull/329#discussion_r147585253
 
 

 ##
 File path: 
integration/cdi/src/main/java/org/apache/cxf/cdi/CdiServerConfigurableFactory.java
 ##
 @@ -0,0 +1,85 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.cdi;
+
+import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.inject.spi.AnnotatedType;
+import javax.enterprise.inject.spi.Bean;
+import javax.enterprise.inject.spi.BeanAttributes;
+import javax.enterprise.inject.spi.BeanManager;
+import javax.enterprise.inject.spi.InjectionTargetFactory;
+import javax.ws.rs.RuntimeType;
+import javax.ws.rs.core.Configurable;
+import javax.ws.rs.core.FeatureContext;
+
+import org.apache.cxf.jaxrs.impl.ConfigurableImpl;
+import org.apache.cxf.jaxrs.impl.ConfigurableImpl.Instantiator;
+import org.apache.cxf.jaxrs.provider.ServerConfigurableFactory;
+
+/** 
+ * Creates the instance of Configurable suitable for CDI-managed runtime.
+ */
+public class CdiServerConfigurableFactory implements ServerConfigurableFactory 
{
+private final BeanManager beanManager;
+
+CdiServerConfigurableFactory(final BeanManager beanManager) {
+this.beanManager = beanManager;
+}
+
+@Override
+public Configurable create(FeatureContext context) {
+return new CdiServerFeatureContextConfigurable(context, beanManager);
+}
+
+/** 
+ * Instantiates the instance of the provider using CDI/BeanManager 
+ */
+private static class CdiInstantiator implements Instantiator {
+private final BeanManager beanManager;
+
+CdiInstantiator(final BeanManager beanManager) {
+this.beanManager = beanManager;
+}
+
+@Override
+public  Object create(Class cls) {
 
 Review comment:
   I did with `AtomFeedProvider` from plain no CDI archive, let me try Jackson 
to be sure :)


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Cannot inject field in ContainerRequestFilter
> -
>
> Key: CXF-7501
> URL: https://issues.apache.org/jira/browse/CXF-7501
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.10, 3.2.0
> Environment: Linux Mint 64 bit, TomEE Plus 7.0.3, JavaEE 7 
> application using MVC specification and reference implementation(Libs 
> Attached)
>Reporter: Jeyvison Nascimento
>Assignee: Andriy Redko
>  Labels: cdi
> Fix For: 3.1.14, 3.2.1
>
> Attachments: javax-mvc.jar, ozark.jar
>
>
> Hey folks.
> We found a weird behavior while running MVC specification(JSR 371) on TomEE 
> witch CXF. We have a *ContainerRequestFilter* defined called 
> *JaxRsContextFilter* 
> {code:java}
> @PreMatching
> @Priority(0)
> public class JaxRsContextFilter implements ContainerRequestFilter {
> @Inject
> private JaxRsContextProducer jaxRsContextProducer;
> @Context
> private Configuration configuration;
> @Context
> private HttpServletRequest request;
> @Context
> private HttpServletResponse response;
> public JaxRsContextFilter() {
> }
> public void filter(ContainerRequestContext requestContext) throws 
> IOException {
> this.jaxRsContextProducer.populate(this.configuration, this.request, 
> this.response);
> }
> }
> {code}
> You can see that we have a JaxRsContextProducer annotated to be injected as a 
> field in our obj

[jira] [Commented] (CXF-7501) Cannot inject field in ContainerRequestFilter

2017-10-29 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16224050#comment-16224050
 ] 

ASF GitHub Bot commented on CXF-7501:
-

reta commented on a change in pull request #329: CXF-7501: Cannot inject field 
in ContainerRequestFilter (and generally, into any providers registered using 
FeatureContext)
URL: https://github.com/apache/cxf/pull/329#discussion_r147585376
 
 

 ##
 File path: 
integration/cdi/src/main/java/org/apache/cxf/cdi/CdiServerConfigurableFactory.java
 ##
 @@ -0,0 +1,85 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.cdi;
+
+import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.inject.spi.AnnotatedType;
+import javax.enterprise.inject.spi.Bean;
+import javax.enterprise.inject.spi.BeanAttributes;
+import javax.enterprise.inject.spi.BeanManager;
+import javax.enterprise.inject.spi.InjectionTargetFactory;
+import javax.ws.rs.RuntimeType;
+import javax.ws.rs.core.Configurable;
+import javax.ws.rs.core.FeatureContext;
+
+import org.apache.cxf.jaxrs.impl.ConfigurableImpl;
+import org.apache.cxf.jaxrs.impl.ConfigurableImpl.Instantiator;
+import org.apache.cxf.jaxrs.provider.ServerConfigurableFactory;
+
+/** 
+ * Creates the instance of Configurable suitable for CDI-managed runtime.
+ */
+public class CdiServerConfigurableFactory implements ServerConfigurableFactory 
{
+private final BeanManager beanManager;
+
+CdiServerConfigurableFactory(final BeanManager beanManager) {
+this.beanManager = beanManager;
+}
+
+@Override
+public Configurable create(FeatureContext context) {
+return new CdiServerFeatureContextConfigurable(context, beanManager);
+}
+
+/** 
+ * Instantiates the instance of the provider using CDI/BeanManager 
+ */
+private static class CdiInstantiator implements Instantiator {
+private final BeanManager beanManager;
+
+CdiInstantiator(final BeanManager beanManager) {
+this.beanManager = beanManager;
+}
+
+@Override
+public  Object create(Class cls) {
 
 Review comment:
   @rmannibucau  No issues, works just fine for Jackson as well (no deployment 
archives are present but the bean was synthesized from the class). 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Cannot inject field in ContainerRequestFilter
> -
>
> Key: CXF-7501
> URL: https://issues.apache.org/jira/browse/CXF-7501
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.10, 3.2.0
> Environment: Linux Mint 64 bit, TomEE Plus 7.0.3, JavaEE 7 
> application using MVC specification and reference implementation(Libs 
> Attached)
>Reporter: Jeyvison Nascimento
>Assignee: Andriy Redko
>  Labels: cdi
> Fix For: 3.1.14, 3.2.1
>
> Attachments: javax-mvc.jar, ozark.jar
>
>
> Hey folks.
> We found a weird behavior while running MVC specification(JSR 371) on TomEE 
> witch CXF. We have a *ContainerRequestFilter* defined called 
> *JaxRsContextFilter* 
> {code:java}
> @PreMatching
> @Priority(0)
> public class JaxRsContextFilter implements ContainerRequestFilter {
> @Inject
> private JaxRsContextProducer jaxRsContextProducer;
> @Context
> private Configuration configuration;
> @Context
> private HttpServletRequest request;
> @Context
> private HttpServletResponse response;
> public JaxRsContextFilter() {
> }
> public void filter(ContainerRequestContext requestContext) throws 
> IOException {
> this.jaxRsContextProducer.populate(this.configuration, this.request, 
> this.response);
> }
> }
> {code}
> You can see that we have a JaxRsContextProd

[jira] [Commented] (CXF-7501) Cannot inject field in ContainerRequestFilter

2017-10-29 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16224049#comment-16224049
 ] 

ASF GitHub Bot commented on CXF-7501:
-

reta commented on a change in pull request #329: CXF-7501: Cannot inject field 
in ContainerRequestFilter (and generally, into any providers registered using 
FeatureContext)
URL: https://github.com/apache/cxf/pull/329#discussion_r147585376
 
 

 ##
 File path: 
integration/cdi/src/main/java/org/apache/cxf/cdi/CdiServerConfigurableFactory.java
 ##
 @@ -0,0 +1,85 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.cdi;
+
+import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.inject.spi.AnnotatedType;
+import javax.enterprise.inject.spi.Bean;
+import javax.enterprise.inject.spi.BeanAttributes;
+import javax.enterprise.inject.spi.BeanManager;
+import javax.enterprise.inject.spi.InjectionTargetFactory;
+import javax.ws.rs.RuntimeType;
+import javax.ws.rs.core.Configurable;
+import javax.ws.rs.core.FeatureContext;
+
+import org.apache.cxf.jaxrs.impl.ConfigurableImpl;
+import org.apache.cxf.jaxrs.impl.ConfigurableImpl.Instantiator;
+import org.apache.cxf.jaxrs.provider.ServerConfigurableFactory;
+
+/** 
+ * Creates the instance of Configurable suitable for CDI-managed runtime.
+ */
+public class CdiServerConfigurableFactory implements ServerConfigurableFactory 
{
+private final BeanManager beanManager;
+
+CdiServerConfigurableFactory(final BeanManager beanManager) {
+this.beanManager = beanManager;
+}
+
+@Override
+public Configurable create(FeatureContext context) {
+return new CdiServerFeatureContextConfigurable(context, beanManager);
+}
+
+/** 
+ * Instantiates the instance of the provider using CDI/BeanManager 
+ */
+private static class CdiInstantiator implements Instantiator {
+private final BeanManager beanManager;
+
+CdiInstantiator(final BeanManager beanManager) {
+this.beanManager = beanManager;
+}
+
+@Override
+public  Object create(Class cls) {
 
 Review comment:
   @johnament No issues, works just fine for Jackson as well (no deployment 
archives are present but the bean was synthesized from the class). 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Cannot inject field in ContainerRequestFilter
> -
>
> Key: CXF-7501
> URL: https://issues.apache.org/jira/browse/CXF-7501
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.10, 3.2.0
> Environment: Linux Mint 64 bit, TomEE Plus 7.0.3, JavaEE 7 
> application using MVC specification and reference implementation(Libs 
> Attached)
>Reporter: Jeyvison Nascimento
>Assignee: Andriy Redko
>  Labels: cdi
> Fix For: 3.1.14, 3.2.1
>
> Attachments: javax-mvc.jar, ozark.jar
>
>
> Hey folks.
> We found a weird behavior while running MVC specification(JSR 371) on TomEE 
> witch CXF. We have a *ContainerRequestFilter* defined called 
> *JaxRsContextFilter* 
> {code:java}
> @PreMatching
> @Priority(0)
> public class JaxRsContextFilter implements ContainerRequestFilter {
> @Inject
> private JaxRsContextProducer jaxRsContextProducer;
> @Context
> private Configuration configuration;
> @Context
> private HttpServletRequest request;
> @Context
> private HttpServletResponse response;
> public JaxRsContextFilter() {
> }
> public void filter(ContainerRequestContext requestContext) throws 
> IOException {
> this.jaxRsContextProducer.populate(this.configuration, this.request, 
> this.response);
> }
> }
> {code}
> You can see that we have a JaxRsContextProduce

[jira] [Commented] (CXF-7501) Cannot inject field in ContainerRequestFilter

2017-10-29 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16224056#comment-16224056
 ] 

ASF GitHub Bot commented on CXF-7501:
-

rmannibucau commented on a change in pull request #329: CXF-7501: Cannot inject 
field in ContainerRequestFilter (and generally, into any providers registered 
using FeatureContext)
URL: https://github.com/apache/cxf/pull/329#discussion_r147585617
 
 

 ##
 File path: 
integration/cdi/src/main/java/org/apache/cxf/cdi/CdiServerConfigurableFactory.java
 ##
 @@ -0,0 +1,85 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.cdi;
+
+import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.inject.spi.AnnotatedType;
+import javax.enterprise.inject.spi.Bean;
+import javax.enterprise.inject.spi.BeanAttributes;
+import javax.enterprise.inject.spi.BeanManager;
+import javax.enterprise.inject.spi.InjectionTargetFactory;
+import javax.ws.rs.RuntimeType;
+import javax.ws.rs.core.Configurable;
+import javax.ws.rs.core.FeatureContext;
+
+import org.apache.cxf.jaxrs.impl.ConfigurableImpl;
+import org.apache.cxf.jaxrs.impl.ConfigurableImpl.Instantiator;
+import org.apache.cxf.jaxrs.provider.ServerConfigurableFactory;
+
+/** 
+ * Creates the instance of Configurable suitable for CDI-managed runtime.
+ */
+public class CdiServerConfigurableFactory implements ServerConfigurableFactory 
{
+private final BeanManager beanManager;
+
+CdiServerConfigurableFactory(final BeanManager beanManager) {
+this.beanManager = beanManager;
+}
+
+@Override
+public Configurable create(FeatureContext context) {
+return new CdiServerFeatureContextConfigurable(context, beanManager);
+}
+
+/** 
+ * Instantiates the instance of the provider using CDI/BeanManager 
+ */
+private static class CdiInstantiator implements Instantiator {
+private final BeanManager beanManager;
+
+CdiInstantiator(final BeanManager beanManager) {
+this.beanManager = beanManager;
+}
+
+@Override
+public  Object create(Class cls) {
 
 Review comment:
   this is because you don't lookup a cdi bean but create one, this is probably 
not what we want. We should lookup an existing bean or fallback on creating a 
plain instance (take care of context injection support ;)). If we don't we can 
have side effects in applications duplicating beans during lookup or just 
pollute the CDI context for no reason.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Cannot inject field in ContainerRequestFilter
> -
>
> Key: CXF-7501
> URL: https://issues.apache.org/jira/browse/CXF-7501
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.10, 3.2.0
> Environment: Linux Mint 64 bit, TomEE Plus 7.0.3, JavaEE 7 
> application using MVC specification and reference implementation(Libs 
> Attached)
>Reporter: Jeyvison Nascimento
>Assignee: Andriy Redko
>  Labels: cdi
> Fix For: 3.1.14, 3.2.1
>
> Attachments: javax-mvc.jar, ozark.jar
>
>
> Hey folks.
> We found a weird behavior while running MVC specification(JSR 371) on TomEE 
> witch CXF. We have a *ContainerRequestFilter* defined called 
> *JaxRsContextFilter* 
> {code:java}
> @PreMatching
> @Priority(0)
> public class JaxRsContextFilter implements ContainerRequestFilter {
> @Inject
> private JaxRsContextProducer jaxRsContextProducer;
> @Context
> private Configuration configuration;
> @Context
> private HttpServletRequest request;
> @Context
> private HttpServletResponse response;
> public JaxRsContextFilter() {
> }
> public void filter(ContainerReques

[jira] [Commented] (CXF-7501) Cannot inject field in ContainerRequestFilter

2017-10-29 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16224057#comment-16224057
 ] 

ASF GitHub Bot commented on CXF-7501:
-

reta commented on a change in pull request #329: CXF-7501: Cannot inject field 
in ContainerRequestFilter (and generally, into any providers registered using 
FeatureContext)
URL: https://github.com/apache/cxf/pull/329#discussion_r147585824
 
 

 ##
 File path: 
integration/cdi/src/main/java/org/apache/cxf/cdi/CdiServerConfigurableFactory.java
 ##
 @@ -0,0 +1,85 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.cdi;
+
+import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.inject.spi.AnnotatedType;
+import javax.enterprise.inject.spi.Bean;
+import javax.enterprise.inject.spi.BeanAttributes;
+import javax.enterprise.inject.spi.BeanManager;
+import javax.enterprise.inject.spi.InjectionTargetFactory;
+import javax.ws.rs.RuntimeType;
+import javax.ws.rs.core.Configurable;
+import javax.ws.rs.core.FeatureContext;
+
+import org.apache.cxf.jaxrs.impl.ConfigurableImpl;
+import org.apache.cxf.jaxrs.impl.ConfigurableImpl.Instantiator;
+import org.apache.cxf.jaxrs.provider.ServerConfigurableFactory;
+
+/** 
+ * Creates the instance of Configurable suitable for CDI-managed runtime.
+ */
+public class CdiServerConfigurableFactory implements ServerConfigurableFactory 
{
+private final BeanManager beanManager;
+
+CdiServerConfigurableFactory(final BeanManager beanManager) {
+this.beanManager = beanManager;
+}
+
+@Override
+public Configurable create(FeatureContext context) {
+return new CdiServerFeatureContextConfigurable(context, beanManager);
+}
+
+/** 
+ * Instantiates the instance of the provider using CDI/BeanManager 
+ */
+private static class CdiInstantiator implements Instantiator {
+private final BeanManager beanManager;
+
+CdiInstantiator(final BeanManager beanManager) {
+this.beanManager = beanManager;
+}
+
+@Override
+public  Object create(Class cls) {
 
 Review comment:
   so basically the better way would be to call beanManager.getBeans() to 
ensure there is one in the context, and fallback to createBean if none, right? 
:-)


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Cannot inject field in ContainerRequestFilter
> -
>
> Key: CXF-7501
> URL: https://issues.apache.org/jira/browse/CXF-7501
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.10, 3.2.0
> Environment: Linux Mint 64 bit, TomEE Plus 7.0.3, JavaEE 7 
> application using MVC specification and reference implementation(Libs 
> Attached)
>Reporter: Jeyvison Nascimento
>Assignee: Andriy Redko
>  Labels: cdi
> Fix For: 3.1.14, 3.2.1
>
> Attachments: javax-mvc.jar, ozark.jar
>
>
> Hey folks.
> We found a weird behavior while running MVC specification(JSR 371) on TomEE 
> witch CXF. We have a *ContainerRequestFilter* defined called 
> *JaxRsContextFilter* 
> {code:java}
> @PreMatching
> @Priority(0)
> public class JaxRsContextFilter implements ContainerRequestFilter {
> @Inject
> private JaxRsContextProducer jaxRsContextProducer;
> @Context
> private Configuration configuration;
> @Context
> private HttpServletRequest request;
> @Context
> private HttpServletResponse response;
> public JaxRsContextFilter() {
> }
> public void filter(ContainerRequestContext requestContext) throws 
> IOException {
> this.jaxRsContextProducer.populate(this.configuration, this.request, 
> this.response);
> }
> }
> {code}
> You can see that we have a JaxRs

[jira] [Commented] (CXF-7501) Cannot inject field in ContainerRequestFilter

2017-10-29 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16224059#comment-16224059
 ] 

ASF GitHub Bot commented on CXF-7501:
-

johnament commented on issue #329: CXF-7501: Cannot inject field in 
ContainerRequestFilter (and generally, into any providers registered using 
FeatureContext)
URL: https://github.com/apache/cxf/pull/329#issuecomment-340273268
 
 
   Could you double check with an explicitly @Vetoed provider?  I believe the
   way you run the CDI teats it discovers all veans regardless of beans.xml.
   
   On Oct 29, 2017 11:47 AM, "Andriy Redko"  wrote:
   
   > *@reta* commented on this pull request.
   > --
   >
   > In integration/cdi/src/main/java/org/apache/cxf/cdi/
   > CdiServerConfigurableFactory.java
   > :
   >
   > > +public Configurable create(FeatureContext context) {
   > +return new CdiServerFeatureContextConfigurable(context, 
beanManager);
   > +}
   > +
   > +/**
   > + * Instantiates the instance of the provider using CDI/BeanManager
   > + */
   > +private static class CdiInstantiator implements Instantiator {
   > +private final BeanManager beanManager;
   > +
   > +CdiInstantiator(final BeanManager beanManager) {
   > +this.beanManager = beanManager;
   > +}
   > +
   > +@Override
   > +public  Object create(Class cls) {
   >
   > @johnament  No issues, works just fine for
   > Jackson as well (no deployment archives are present but the bean was
   > synthesized from the class).
   >
   > —
   > You are receiving this because you were mentioned.
   > Reply to this email directly, view it on GitHub
   > , or mute
   > the thread
   > 

   > .
   >
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Cannot inject field in ContainerRequestFilter
> -
>
> Key: CXF-7501
> URL: https://issues.apache.org/jira/browse/CXF-7501
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.10, 3.2.0
> Environment: Linux Mint 64 bit, TomEE Plus 7.0.3, JavaEE 7 
> application using MVC specification and reference implementation(Libs 
> Attached)
>Reporter: Jeyvison Nascimento
>Assignee: Andriy Redko
>  Labels: cdi
> Fix For: 3.1.14, 3.2.1
>
> Attachments: javax-mvc.jar, ozark.jar
>
>
> Hey folks.
> We found a weird behavior while running MVC specification(JSR 371) on TomEE 
> witch CXF. We have a *ContainerRequestFilter* defined called 
> *JaxRsContextFilter* 
> {code:java}
> @PreMatching
> @Priority(0)
> public class JaxRsContextFilter implements ContainerRequestFilter {
> @Inject
> private JaxRsContextProducer jaxRsContextProducer;
> @Context
> private Configuration configuration;
> @Context
> private HttpServletRequest request;
> @Context
> private HttpServletResponse response;
> public JaxRsContextFilter() {
> }
> public void filter(ContainerRequestContext requestContext) throws 
> IOException {
> this.jaxRsContextProducer.populate(this.configuration, this.request, 
> this.response);
> }
> }
> {code}
> You can see that we have a JaxRsContextProducer annotated to be injected as a 
> field in our object but when JAXRSUtils is called to run the the container 
> filters it injects the fields annotated as *@Context* , not the fields 
> annotated with *@Inject*.
> {code:java}
>  for (ProviderInfo filter : containerFilters) {
> try {
> InjectionUtils.injectContexts(filter.getProvider(), 
> filter, m);
> filter.getProvider().filter(context);
> } catch (IOException ex) {
> throw ExceptionUtils.toInternalServerErrorException(ex, 
> null); 
> }
> {code}
> It causes our filter(*JaxRsContextFilter*) to throw a NullPointerException 
> when filtering the request because it uses the producer to perform some 
> actions in  this operation.
> I believe this field should be injected as well, not only the *@Context* 
> fields.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7501) Cannot inject field in ContainerRequestFilter

2017-10-29 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16224075#comment-16224075
 ] 

ASF GitHub Bot commented on CXF-7501:
-

reta commented on issue #329: CXF-7501: Cannot inject field in 
ContainerRequestFilter (and generally, into any providers registered using 
FeatureContext)
URL: https://github.com/apache/cxf/pull/329#issuecomment-340273566
 
 
   @johnament yes, sure, I can add one @Vetoed guy. The tests do not hijack 
anything,  CDI container **does not** discover all the beans, the `bean.xml` 
presence is strictly honored. 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Cannot inject field in ContainerRequestFilter
> -
>
> Key: CXF-7501
> URL: https://issues.apache.org/jira/browse/CXF-7501
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.10, 3.2.0
> Environment: Linux Mint 64 bit, TomEE Plus 7.0.3, JavaEE 7 
> application using MVC specification and reference implementation(Libs 
> Attached)
>Reporter: Jeyvison Nascimento
>Assignee: Andriy Redko
>  Labels: cdi
> Fix For: 3.1.14, 3.2.1
>
> Attachments: javax-mvc.jar, ozark.jar
>
>
> Hey folks.
> We found a weird behavior while running MVC specification(JSR 371) on TomEE 
> witch CXF. We have a *ContainerRequestFilter* defined called 
> *JaxRsContextFilter* 
> {code:java}
> @PreMatching
> @Priority(0)
> public class JaxRsContextFilter implements ContainerRequestFilter {
> @Inject
> private JaxRsContextProducer jaxRsContextProducer;
> @Context
> private Configuration configuration;
> @Context
> private HttpServletRequest request;
> @Context
> private HttpServletResponse response;
> public JaxRsContextFilter() {
> }
> public void filter(ContainerRequestContext requestContext) throws 
> IOException {
> this.jaxRsContextProducer.populate(this.configuration, this.request, 
> this.response);
> }
> }
> {code}
> You can see that we have a JaxRsContextProducer annotated to be injected as a 
> field in our object but when JAXRSUtils is called to run the the container 
> filters it injects the fields annotated as *@Context* , not the fields 
> annotated with *@Inject*.
> {code:java}
>  for (ProviderInfo filter : containerFilters) {
> try {
> InjectionUtils.injectContexts(filter.getProvider(), 
> filter, m);
> filter.getProvider().filter(context);
> } catch (IOException ex) {
> throw ExceptionUtils.toInternalServerErrorException(ex, 
> null); 
> }
> {code}
> It causes our filter(*JaxRsContextFilter*) to throw a NullPointerException 
> when filtering the request because it uses the producer to perform some 
> actions in  this operation.
> I believe this field should be injected as well, not only the *@Context* 
> fields.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7501) Cannot inject field in ContainerRequestFilter

2017-10-29 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16224077#comment-16224077
 ] 

ASF GitHub Bot commented on CXF-7501:
-

rmannibucau commented on a change in pull request #329: CXF-7501: Cannot inject 
field in ContainerRequestFilter (and generally, into any providers registered 
using FeatureContext)
URL: https://github.com/apache/cxf/pull/329#discussion_r147586166
 
 

 ##
 File path: 
integration/cdi/src/main/java/org/apache/cxf/cdi/CdiServerConfigurableFactory.java
 ##
 @@ -0,0 +1,85 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.cdi;
+
+import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.inject.spi.AnnotatedType;
+import javax.enterprise.inject.spi.Bean;
+import javax.enterprise.inject.spi.BeanAttributes;
+import javax.enterprise.inject.spi.BeanManager;
+import javax.enterprise.inject.spi.InjectionTargetFactory;
+import javax.ws.rs.RuntimeType;
+import javax.ws.rs.core.Configurable;
+import javax.ws.rs.core.FeatureContext;
+
+import org.apache.cxf.jaxrs.impl.ConfigurableImpl;
+import org.apache.cxf.jaxrs.impl.ConfigurableImpl.Instantiator;
+import org.apache.cxf.jaxrs.provider.ServerConfigurableFactory;
+
+/** 
+ * Creates the instance of Configurable suitable for CDI-managed runtime.
+ */
+public class CdiServerConfigurableFactory implements ServerConfigurableFactory 
{
+private final BeanManager beanManager;
+
+CdiServerConfigurableFactory(final BeanManager beanManager) {
+this.beanManager = beanManager;
+}
+
+@Override
+public Configurable create(FeatureContext context) {
+return new CdiServerFeatureContextConfigurable(context, beanManager);
+}
+
+/** 
+ * Instantiates the instance of the provider using CDI/BeanManager 
+ */
+private static class CdiInstantiator implements Instantiator {
+private final BeanManager beanManager;
+
+CdiInstantiator(final BeanManager beanManager) {
+this.beanManager = beanManager;
+}
+
+@Override
+public  Object create(Class cls) {
 
 Review comment:
   nop, try getbeans and if resolve() returns null then use standalone logic 
(default newInstance())


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Cannot inject field in ContainerRequestFilter
> -
>
> Key: CXF-7501
> URL: https://issues.apache.org/jira/browse/CXF-7501
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.10, 3.2.0
> Environment: Linux Mint 64 bit, TomEE Plus 7.0.3, JavaEE 7 
> application using MVC specification and reference implementation(Libs 
> Attached)
>Reporter: Jeyvison Nascimento
>Assignee: Andriy Redko
>  Labels: cdi
> Fix For: 3.1.14, 3.2.1
>
> Attachments: javax-mvc.jar, ozark.jar
>
>
> Hey folks.
> We found a weird behavior while running MVC specification(JSR 371) on TomEE 
> witch CXF. We have a *ContainerRequestFilter* defined called 
> *JaxRsContextFilter* 
> {code:java}
> @PreMatching
> @Priority(0)
> public class JaxRsContextFilter implements ContainerRequestFilter {
> @Inject
> private JaxRsContextProducer jaxRsContextProducer;
> @Context
> private Configuration configuration;
> @Context
> private HttpServletRequest request;
> @Context
> private HttpServletResponse response;
> public JaxRsContextFilter() {
> }
> public void filter(ContainerRequestContext requestContext) throws 
> IOException {
> this.jaxRsContextProducer.populate(this.configuration, this.request, 
> this.response);
> }
> }
> {code}
> You can see that we have a JaxRsContextProducer annotated to be injected as a 
> f

[jira] [Commented] (CXF-7501) Cannot inject field in ContainerRequestFilter

2017-10-29 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16224078#comment-16224078
 ] 

ASF GitHub Bot commented on CXF-7501:
-

reta commented on a change in pull request #329: CXF-7501: Cannot inject field 
in ContainerRequestFilter (and generally, into any providers registered using 
FeatureContext)
URL: https://github.com/apache/cxf/pull/329#discussion_r147586312
 
 

 ##
 File path: 
integration/cdi/src/main/java/org/apache/cxf/cdi/CdiServerConfigurableFactory.java
 ##
 @@ -0,0 +1,85 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.cdi;
+
+import javax.enterprise.context.spi.CreationalContext;
+import javax.enterprise.inject.spi.AnnotatedType;
+import javax.enterprise.inject.spi.Bean;
+import javax.enterprise.inject.spi.BeanAttributes;
+import javax.enterprise.inject.spi.BeanManager;
+import javax.enterprise.inject.spi.InjectionTargetFactory;
+import javax.ws.rs.RuntimeType;
+import javax.ws.rs.core.Configurable;
+import javax.ws.rs.core.FeatureContext;
+
+import org.apache.cxf.jaxrs.impl.ConfigurableImpl;
+import org.apache.cxf.jaxrs.impl.ConfigurableImpl.Instantiator;
+import org.apache.cxf.jaxrs.provider.ServerConfigurableFactory;
+
+/** 
+ * Creates the instance of Configurable suitable for CDI-managed runtime.
+ */
+public class CdiServerConfigurableFactory implements ServerConfigurableFactory 
{
+private final BeanManager beanManager;
+
+CdiServerConfigurableFactory(final BeanManager beanManager) {
+this.beanManager = beanManager;
+}
+
+@Override
+public Configurable create(FeatureContext context) {
+return new CdiServerFeatureContextConfigurable(context, beanManager);
+}
+
+/** 
+ * Instantiates the instance of the provider using CDI/BeanManager 
+ */
+private static class CdiInstantiator implements Instantiator {
+private final BeanManager beanManager;
+
+CdiInstantiator(final BeanManager beanManager) {
+this.beanManager = beanManager;
+}
+
+@Override
+public  Object create(Class cls) {
 
 Review comment:
   sounds good, thanks @rmannibucau 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Cannot inject field in ContainerRequestFilter
> -
>
> Key: CXF-7501
> URL: https://issues.apache.org/jira/browse/CXF-7501
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.10, 3.2.0
> Environment: Linux Mint 64 bit, TomEE Plus 7.0.3, JavaEE 7 
> application using MVC specification and reference implementation(Libs 
> Attached)
>Reporter: Jeyvison Nascimento
>Assignee: Andriy Redko
>  Labels: cdi
> Fix For: 3.1.14, 3.2.1
>
> Attachments: javax-mvc.jar, ozark.jar
>
>
> Hey folks.
> We found a weird behavior while running MVC specification(JSR 371) on TomEE 
> witch CXF. We have a *ContainerRequestFilter* defined called 
> *JaxRsContextFilter* 
> {code:java}
> @PreMatching
> @Priority(0)
> public class JaxRsContextFilter implements ContainerRequestFilter {
> @Inject
> private JaxRsContextProducer jaxRsContextProducer;
> @Context
> private Configuration configuration;
> @Context
> private HttpServletRequest request;
> @Context
> private HttpServletResponse response;
> public JaxRsContextFilter() {
> }
> public void filter(ContainerRequestContext requestContext) throws 
> IOException {
> this.jaxRsContextProducer.populate(this.configuration, this.request, 
> this.response);
> }
> }
> {code}
> You can see that we have a JaxRsContextProducer annotated to be injected as a 
> field in our object but when JAXRSUtils is called to run the the containe

[jira] [Commented] (CXF-7501) Cannot inject field in ContainerRequestFilter

2017-10-29 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16224103#comment-16224103
 ] 

ASF GitHub Bot commented on CXF-7501:
-

reta opened a new pull request #330: CXF-7501: Cannot inject field in 
ContainerRequestFilter (and generally, into any providers registered using 
FeatureContext)
URL: https://github.com/apache/cxf/pull/330
 
 
   Using proper CDI bean resolution with fallback to default strategy. The 
`@Vetoed` presented an edge case when CDI runtime won't resolve the bean but we 
have to go over manual instantiation. 
   
   CC @rmannibucau @johnament 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Cannot inject field in ContainerRequestFilter
> -
>
> Key: CXF-7501
> URL: https://issues.apache.org/jira/browse/CXF-7501
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.10, 3.2.0
> Environment: Linux Mint 64 bit, TomEE Plus 7.0.3, JavaEE 7 
> application using MVC specification and reference implementation(Libs 
> Attached)
>Reporter: Jeyvison Nascimento
>Assignee: Andriy Redko
>  Labels: cdi
> Fix For: 3.1.14, 3.2.1
>
> Attachments: javax-mvc.jar, ozark.jar
>
>
> Hey folks.
> We found a weird behavior while running MVC specification(JSR 371) on TomEE 
> witch CXF. We have a *ContainerRequestFilter* defined called 
> *JaxRsContextFilter* 
> {code:java}
> @PreMatching
> @Priority(0)
> public class JaxRsContextFilter implements ContainerRequestFilter {
> @Inject
> private JaxRsContextProducer jaxRsContextProducer;
> @Context
> private Configuration configuration;
> @Context
> private HttpServletRequest request;
> @Context
> private HttpServletResponse response;
> public JaxRsContextFilter() {
> }
> public void filter(ContainerRequestContext requestContext) throws 
> IOException {
> this.jaxRsContextProducer.populate(this.configuration, this.request, 
> this.response);
> }
> }
> {code}
> You can see that we have a JaxRsContextProducer annotated to be injected as a 
> field in our object but when JAXRSUtils is called to run the the container 
> filters it injects the fields annotated as *@Context* , not the fields 
> annotated with *@Inject*.
> {code:java}
>  for (ProviderInfo filter : containerFilters) {
> try {
> InjectionUtils.injectContexts(filter.getProvider(), 
> filter, m);
> filter.getProvider().filter(context);
> } catch (IOException ex) {
> throw ExceptionUtils.toInternalServerErrorException(ex, 
> null); 
> }
> {code}
> It causes our filter(*JaxRsContextFilter*) to throw a NullPointerException 
> when filtering the request because it uses the producer to perform some 
> actions in  this operation.
> I believe this field should be injected as well, not only the *@Context* 
> fields.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7501) Cannot inject field in ContainerRequestFilter

2017-10-29 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16224106#comment-16224106
 ] 

ASF GitHub Bot commented on CXF-7501:
-

rmannibucau commented on issue #330: CXF-7501: Cannot inject field in 
ContainerRequestFilter (and generally, into any providers registered using 
FeatureContext)
URL: https://github.com/apache/cxf/pull/330#issuecomment-340279477
 
 
   LGTM
   
   side note: do we have a test covering @Context injection/instantiation too? 
Wonder if we need a third case where we do the injection normally (standalone) 
then create an InjectionTarget to integrate with CDI.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Cannot inject field in ContainerRequestFilter
> -
>
> Key: CXF-7501
> URL: https://issues.apache.org/jira/browse/CXF-7501
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.10, 3.2.0
> Environment: Linux Mint 64 bit, TomEE Plus 7.0.3, JavaEE 7 
> application using MVC specification and reference implementation(Libs 
> Attached)
>Reporter: Jeyvison Nascimento
>Assignee: Andriy Redko
>  Labels: cdi
> Fix For: 3.1.14, 3.2.1
>
> Attachments: javax-mvc.jar, ozark.jar
>
>
> Hey folks.
> We found a weird behavior while running MVC specification(JSR 371) on TomEE 
> witch CXF. We have a *ContainerRequestFilter* defined called 
> *JaxRsContextFilter* 
> {code:java}
> @PreMatching
> @Priority(0)
> public class JaxRsContextFilter implements ContainerRequestFilter {
> @Inject
> private JaxRsContextProducer jaxRsContextProducer;
> @Context
> private Configuration configuration;
> @Context
> private HttpServletRequest request;
> @Context
> private HttpServletResponse response;
> public JaxRsContextFilter() {
> }
> public void filter(ContainerRequestContext requestContext) throws 
> IOException {
> this.jaxRsContextProducer.populate(this.configuration, this.request, 
> this.response);
> }
> }
> {code}
> You can see that we have a JaxRsContextProducer annotated to be injected as a 
> field in our object but when JAXRSUtils is called to run the the container 
> filters it injects the fields annotated as *@Context* , not the fields 
> annotated with *@Inject*.
> {code:java}
>  for (ProviderInfo filter : containerFilters) {
> try {
> InjectionUtils.injectContexts(filter.getProvider(), 
> filter, m);
> filter.getProvider().filter(context);
> } catch (IOException ex) {
> throw ExceptionUtils.toInternalServerErrorException(ex, 
> null); 
> }
> {code}
> It causes our filter(*JaxRsContextFilter*) to throw a NullPointerException 
> when filtering the request because it uses the producer to perform some 
> actions in  this operation.
> I believe this field should be injected as well, not only the *@Context* 
> fields.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7501) Cannot inject field in ContainerRequestFilter

2017-10-29 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16224107#comment-16224107
 ] 

ASF GitHub Bot commented on CXF-7501:
-

reta commented on issue #330: CXF-7501: Cannot inject field in 
ContainerRequestFilter (and generally, into any providers registered using 
FeatureContext)
URL: https://github.com/apache/cxf/pull/330#issuecomment-340279707
 
 
   Thanks @rmannibucau, we should be good here as `@Context` members are 
injected independently, but sure, it is good idea to have a test case.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Cannot inject field in ContainerRequestFilter
> -
>
> Key: CXF-7501
> URL: https://issues.apache.org/jira/browse/CXF-7501
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.10, 3.2.0
> Environment: Linux Mint 64 bit, TomEE Plus 7.0.3, JavaEE 7 
> application using MVC specification and reference implementation(Libs 
> Attached)
>Reporter: Jeyvison Nascimento
>Assignee: Andriy Redko
>  Labels: cdi
> Fix For: 3.1.14, 3.2.1
>
> Attachments: javax-mvc.jar, ozark.jar
>
>
> Hey folks.
> We found a weird behavior while running MVC specification(JSR 371) on TomEE 
> witch CXF. We have a *ContainerRequestFilter* defined called 
> *JaxRsContextFilter* 
> {code:java}
> @PreMatching
> @Priority(0)
> public class JaxRsContextFilter implements ContainerRequestFilter {
> @Inject
> private JaxRsContextProducer jaxRsContextProducer;
> @Context
> private Configuration configuration;
> @Context
> private HttpServletRequest request;
> @Context
> private HttpServletResponse response;
> public JaxRsContextFilter() {
> }
> public void filter(ContainerRequestContext requestContext) throws 
> IOException {
> this.jaxRsContextProducer.populate(this.configuration, this.request, 
> this.response);
> }
> }
> {code}
> You can see that we have a JaxRsContextProducer annotated to be injected as a 
> field in our object but when JAXRSUtils is called to run the the container 
> filters it injects the fields annotated as *@Context* , not the fields 
> annotated with *@Inject*.
> {code:java}
>  for (ProviderInfo filter : containerFilters) {
> try {
> InjectionUtils.injectContexts(filter.getProvider(), 
> filter, m);
> filter.getProvider().filter(context);
> } catch (IOException ex) {
> throw ExceptionUtils.toInternalServerErrorException(ex, 
> null); 
> }
> {code}
> It causes our filter(*JaxRsContextFilter*) to throw a NullPointerException 
> when filtering the request because it uses the producer to perform some 
> actions in  this operation.
> I believe this field should be injected as well, not only the *@Context* 
> fields.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7501) Cannot inject field in ContainerRequestFilter

2017-10-29 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16224108#comment-16224108
 ] 

ASF GitHub Bot commented on CXF-7501:
-

rmannibucau commented on issue #330: CXF-7501: Cannot inject field in 
ContainerRequestFilter (and generally, into any providers registered using 
FeatureContext)
URL: https://github.com/apache/cxf/pull/330#issuecomment-340279887
 
 
   @ApplicationScoped the provider, will be proxied so the injection will not 
be done as expected ;). A workaround used can be to support @Inject @Context 
but that's a workaround but CDI doesn't enable us to do more yet until you add 
automatically an @AroundConstruct interceptor to do the injection.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Cannot inject field in ContainerRequestFilter
> -
>
> Key: CXF-7501
> URL: https://issues.apache.org/jira/browse/CXF-7501
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.10, 3.2.0
> Environment: Linux Mint 64 bit, TomEE Plus 7.0.3, JavaEE 7 
> application using MVC specification and reference implementation(Libs 
> Attached)
>Reporter: Jeyvison Nascimento
>Assignee: Andriy Redko
>  Labels: cdi
> Fix For: 3.1.14, 3.2.1
>
> Attachments: javax-mvc.jar, ozark.jar
>
>
> Hey folks.
> We found a weird behavior while running MVC specification(JSR 371) on TomEE 
> witch CXF. We have a *ContainerRequestFilter* defined called 
> *JaxRsContextFilter* 
> {code:java}
> @PreMatching
> @Priority(0)
> public class JaxRsContextFilter implements ContainerRequestFilter {
> @Inject
> private JaxRsContextProducer jaxRsContextProducer;
> @Context
> private Configuration configuration;
> @Context
> private HttpServletRequest request;
> @Context
> private HttpServletResponse response;
> public JaxRsContextFilter() {
> }
> public void filter(ContainerRequestContext requestContext) throws 
> IOException {
> this.jaxRsContextProducer.populate(this.configuration, this.request, 
> this.response);
> }
> }
> {code}
> You can see that we have a JaxRsContextProducer annotated to be injected as a 
> field in our object but when JAXRSUtils is called to run the the container 
> filters it injects the fields annotated as *@Context* , not the fields 
> annotated with *@Inject*.
> {code:java}
>  for (ProviderInfo filter : containerFilters) {
> try {
> InjectionUtils.injectContexts(filter.getProvider(), 
> filter, m);
> filter.getProvider().filter(context);
> } catch (IOException ex) {
> throw ExceptionUtils.toInternalServerErrorException(ex, 
> null); 
> }
> {code}
> It causes our filter(*JaxRsContextFilter*) to throw a NullPointerException 
> when filtering the request because it uses the producer to perform some 
> actions in  this operation.
> I believe this field should be injected as well, not only the *@Context* 
> fields.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7501) Cannot inject field in ContainerRequestFilter

2017-10-29 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16224110#comment-16224110
 ] 

ASF GitHub Bot commented on CXF-7501:
-

reta commented on issue #330: CXF-7501: Cannot inject field in 
ContainerRequestFilter (and generally, into any providers registered using 
FeatureContext)
URL: https://github.com/apache/cxf/pull/330#issuecomment-340280285
 
 
   @rmannibucau I see, proxies do mess things up. I think would be good to 
solve that as a separate issue, it has more broad impact that the one this PR 
concerns. I will create a test case to reproduce that and an issue in the 
tracker. Sounds like a plan?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Cannot inject field in ContainerRequestFilter
> -
>
> Key: CXF-7501
> URL: https://issues.apache.org/jira/browse/CXF-7501
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.10, 3.2.0
> Environment: Linux Mint 64 bit, TomEE Plus 7.0.3, JavaEE 7 
> application using MVC specification and reference implementation(Libs 
> Attached)
>Reporter: Jeyvison Nascimento
>Assignee: Andriy Redko
>  Labels: cdi
> Fix For: 3.1.14, 3.2.1
>
> Attachments: javax-mvc.jar, ozark.jar
>
>
> Hey folks.
> We found a weird behavior while running MVC specification(JSR 371) on TomEE 
> witch CXF. We have a *ContainerRequestFilter* defined called 
> *JaxRsContextFilter* 
> {code:java}
> @PreMatching
> @Priority(0)
> public class JaxRsContextFilter implements ContainerRequestFilter {
> @Inject
> private JaxRsContextProducer jaxRsContextProducer;
> @Context
> private Configuration configuration;
> @Context
> private HttpServletRequest request;
> @Context
> private HttpServletResponse response;
> public JaxRsContextFilter() {
> }
> public void filter(ContainerRequestContext requestContext) throws 
> IOException {
> this.jaxRsContextProducer.populate(this.configuration, this.request, 
> this.response);
> }
> }
> {code}
> You can see that we have a JaxRsContextProducer annotated to be injected as a 
> field in our object but when JAXRSUtils is called to run the the container 
> filters it injects the fields annotated as *@Context* , not the fields 
> annotated with *@Inject*.
> {code:java}
>  for (ProviderInfo filter : containerFilters) {
> try {
> InjectionUtils.injectContexts(filter.getProvider(), 
> filter, m);
> filter.getProvider().filter(context);
> } catch (IOException ex) {
> throw ExceptionUtils.toInternalServerErrorException(ex, 
> null); 
> }
> {code}
> It causes our filter(*JaxRsContextFilter*) to throw a NullPointerException 
> when filtering the request because it uses the producer to perform some 
> actions in  this operation.
> I believe this field should be injected as well, not only the *@Context* 
> fields.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7501) Cannot inject field in ContainerRequestFilter

2017-10-29 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16224112#comment-16224112
 ] 

ASF GitHub Bot commented on CXF-7501:
-

rmannibucau commented on issue #330: CXF-7501: Cannot inject field in 
ContainerRequestFilter (and generally, into any providers registered using 
FeatureContext)
URL: https://github.com/apache/cxf/pull/330#issuecomment-340280475
 
 
   +1, that's why it was a side note ;)


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Cannot inject field in ContainerRequestFilter
> -
>
> Key: CXF-7501
> URL: https://issues.apache.org/jira/browse/CXF-7501
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.10, 3.2.0
> Environment: Linux Mint 64 bit, TomEE Plus 7.0.3, JavaEE 7 
> application using MVC specification and reference implementation(Libs 
> Attached)
>Reporter: Jeyvison Nascimento
>Assignee: Andriy Redko
>  Labels: cdi
> Fix For: 3.1.14, 3.2.1
>
> Attachments: javax-mvc.jar, ozark.jar
>
>
> Hey folks.
> We found a weird behavior while running MVC specification(JSR 371) on TomEE 
> witch CXF. We have a *ContainerRequestFilter* defined called 
> *JaxRsContextFilter* 
> {code:java}
> @PreMatching
> @Priority(0)
> public class JaxRsContextFilter implements ContainerRequestFilter {
> @Inject
> private JaxRsContextProducer jaxRsContextProducer;
> @Context
> private Configuration configuration;
> @Context
> private HttpServletRequest request;
> @Context
> private HttpServletResponse response;
> public JaxRsContextFilter() {
> }
> public void filter(ContainerRequestContext requestContext) throws 
> IOException {
> this.jaxRsContextProducer.populate(this.configuration, this.request, 
> this.response);
> }
> }
> {code}
> You can see that we have a JaxRsContextProducer annotated to be injected as a 
> field in our object but when JAXRSUtils is called to run the the container 
> filters it injects the fields annotated as *@Context* , not the fields 
> annotated with *@Inject*.
> {code:java}
>  for (ProviderInfo filter : containerFilters) {
> try {
> InjectionUtils.injectContexts(filter.getProvider(), 
> filter, m);
> filter.getProvider().filter(context);
> } catch (IOException ex) {
> throw ExceptionUtils.toInternalServerErrorException(ex, 
> null); 
> }
> {code}
> It causes our filter(*JaxRsContextFilter*) to throw a NullPointerException 
> when filtering the request because it uses the producer to perform some 
> actions in  this operation.
> I believe this field should be injected as well, not only the *@Context* 
> fields.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7501) Cannot inject field in ContainerRequestFilter

2017-10-29 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16224115#comment-16224115
 ] 

ASF GitHub Bot commented on CXF-7501:
-

reta commented on issue #330: CXF-7501: Cannot inject field in 
ContainerRequestFilter (and generally, into any providers registered using 
FeatureContext)
URL: https://github.com/apache/cxf/pull/330#issuecomment-340281055
 
 
   Done, https://issues.apache.org/jira/browse/CXF-7544. @rmannibucau 
@johnament Thank you guys for helping out with proper implementation. 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Cannot inject field in ContainerRequestFilter
> -
>
> Key: CXF-7501
> URL: https://issues.apache.org/jira/browse/CXF-7501
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.10, 3.2.0
> Environment: Linux Mint 64 bit, TomEE Plus 7.0.3, JavaEE 7 
> application using MVC specification and reference implementation(Libs 
> Attached)
>Reporter: Jeyvison Nascimento
>Assignee: Andriy Redko
>  Labels: cdi
> Fix For: 3.1.14, 3.2.1
>
> Attachments: javax-mvc.jar, ozark.jar
>
>
> Hey folks.
> We found a weird behavior while running MVC specification(JSR 371) on TomEE 
> witch CXF. We have a *ContainerRequestFilter* defined called 
> *JaxRsContextFilter* 
> {code:java}
> @PreMatching
> @Priority(0)
> public class JaxRsContextFilter implements ContainerRequestFilter {
> @Inject
> private JaxRsContextProducer jaxRsContextProducer;
> @Context
> private Configuration configuration;
> @Context
> private HttpServletRequest request;
> @Context
> private HttpServletResponse response;
> public JaxRsContextFilter() {
> }
> public void filter(ContainerRequestContext requestContext) throws 
> IOException {
> this.jaxRsContextProducer.populate(this.configuration, this.request, 
> this.response);
> }
> }
> {code}
> You can see that we have a JaxRsContextProducer annotated to be injected as a 
> field in our object but when JAXRSUtils is called to run the the container 
> filters it injects the fields annotated as *@Context* , not the fields 
> annotated with *@Inject*.
> {code:java}
>  for (ProviderInfo filter : containerFilters) {
> try {
> InjectionUtils.injectContexts(filter.getProvider(), 
> filter, m);
> filter.getProvider().filter(context);
> } catch (IOException ex) {
> throw ExceptionUtils.toInternalServerErrorException(ex, 
> null); 
> }
> {code}
> It causes our filter(*JaxRsContextFilter*) to throw a NullPointerException 
> when filtering the request because it uses the producer to perform some 
> actions in  this operation.
> I believe this field should be injected as well, not only the *@Context* 
> fields.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7501) Cannot inject field in ContainerRequestFilter

2017-10-29 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16224117#comment-16224117
 ] 

ASF GitHub Bot commented on CXF-7501:
-

reta closed pull request #330: CXF-7501: Cannot inject field in 
ContainerRequestFilter (and generally, into any providers registered using 
FeatureContext)
URL: https://github.com/apache/cxf/pull/330
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/integration/cdi/src/main/java/org/apache/cxf/cdi/CdiServerConfigurableFactory.java
 
b/integration/cdi/src/main/java/org/apache/cxf/cdi/CdiServerConfigurableFactory.java
index 15d4643d847..9090bbfa664 100644
--- 
a/integration/cdi/src/main/java/org/apache/cxf/cdi/CdiServerConfigurableFactory.java
+++ 
b/integration/cdi/src/main/java/org/apache/cxf/cdi/CdiServerConfigurableFactory.java
@@ -18,12 +18,11 @@
  */
 package org.apache.cxf.cdi;
 
+import java.util.Set;
+
 import javax.enterprise.context.spi.CreationalContext;
-import javax.enterprise.inject.spi.AnnotatedType;
 import javax.enterprise.inject.spi.Bean;
-import javax.enterprise.inject.spi.BeanAttributes;
 import javax.enterprise.inject.spi.BeanManager;
-import javax.enterprise.inject.spi.InjectionTargetFactory;
 import javax.ws.rs.RuntimeType;
 import javax.ws.rs.core.Configurable;
 import javax.ws.rs.core.FeatureContext;
@@ -31,6 +30,7 @@
 import org.apache.cxf.cdi.event.DisposableCreationalContext;
 import org.apache.cxf.jaxrs.impl.ConfigurableImpl;
 import org.apache.cxf.jaxrs.impl.ConfigurableImpl.Instantiator;
+import org.apache.cxf.jaxrs.impl.ConfigurationImpl;
 import org.apache.cxf.jaxrs.provider.ServerConfigurableFactory;
 
 /** 
@@ -49,7 +49,8 @@
 }
 
 /** 
- * Instantiates the instance of the provider using CDI/BeanManager 
+ * Instantiates the instance of the provider using CDI/BeanManager (or 
fall back
+ * to default strategy of CDI bean is not available).
  */
 private static class CdiInstantiator implements Instantiator {
 private final BeanManager beanManager;
@@ -60,18 +61,21 @@
 
 @Override
 public  Object create(Class cls) {
-final AnnotatedType annotatedType = 
beanManager.createAnnotatedType(cls);
-final InjectionTargetFactory injectionTargetFactory = 
-beanManager.getInjectionTargetFactory(annotatedType);
-final BeanAttributes attributes = 
beanManager.createBeanAttributes(annotatedType);
-final Bean bean = beanManager.createBean(attributes, cls, 
injectionTargetFactory);
-final CreationalContext context = 
beanManager.createCreationalContext(bean);
-
-if (!beanManager.isNormalScope(bean.getScope())) {
-beanManager.fireEvent(new 
DisposableCreationalContext(context));
+final Set> candidates = beanManager.getBeans(cls);
+final Bean bean = beanManager.resolve(candidates);
+
+if (bean != null) {
+final CreationalContext context = 
beanManager.createCreationalContext(bean);
+
+if (!beanManager.isNormalScope(bean.getScope())) {
+beanManager.fireEvent(new 
DisposableCreationalContext(context));
+}
+
+return beanManager.getReference(bean, cls, context);
+} else {
+// No CDI bean available, falling back to default 
instantiation strategy
+return ConfigurationImpl.createProvider(cls);
 }
-
-return beanManager.getReference(bean, cls, context);
 }
 }
 
diff --git 
a/systests/cdi/base/src/main/java/org/apache/cxf/systests/cdi/base/BookStoreRequestFilter.java
 
b/systests/cdi/base/src/main/java/org/apache/cxf/systests/cdi/base/BookStoreRequestFilter.java
index cbd88115afe..4fb8f846c4a 100644
--- 
a/systests/cdi/base/src/main/java/org/apache/cxf/systests/cdi/base/BookStoreRequestFilter.java
+++ 
b/systests/cdi/base/src/main/java/org/apache/cxf/systests/cdi/base/BookStoreRequestFilter.java
@@ -24,14 +24,22 @@
 import javax.inject.Inject;
 import javax.ws.rs.container.ContainerRequestContext;
 import javax.ws.rs.container.ContainerRequestFilter;
+import javax.ws.rs.container.ResourceInfo;
+import javax.ws.rs.core.Context;
 import javax.ws.rs.core.Response;
 import javax.ws.rs.core.Response.Status;
 
 public class BookStoreRequestFilter implements ContainerRequestFilter {
 @Inject private BookStoreAuthenticator authenticator;
+@Context private ResourceInfo resourceInfo;
 
 @Override
 public void filter(ContainerRequestContext requestContext) throws 
IOException {
+// Contextual instan

[jira] [Commented] (CXF-7501) Cannot inject field in ContainerRequestFilter

2017-10-29 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16224121#comment-16224121
 ] 

ASF GitHub Bot commented on CXF-7501:
-

johnament commented on issue #330: CXF-7501: Cannot inject field in 
ContainerRequestFilter (and generally, into any providers registered using 
FeatureContext)
URL: https://github.com/apache/cxf/pull/330#issuecomment-340282232
 
 
   LGTM as well.  FWIW, I was able to cause it to fail using a CDI 2 feature of 
SE initialization.
   
   ```java
   SeContainerInitializer.newInstance()
   .disableDiscovery()
   .addBeanClasses(Resources.class, LoggingReporter.class, 
BraveProducers.class, RestApplication.class, TopCDsEndpoint.class, 
CXFCdiServlet.class)
   .addExtensions(new JAXRSCdiResourceExtension())
   .initialize();
   ```


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Cannot inject field in ContainerRequestFilter
> -
>
> Key: CXF-7501
> URL: https://issues.apache.org/jira/browse/CXF-7501
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.10, 3.2.0
> Environment: Linux Mint 64 bit, TomEE Plus 7.0.3, JavaEE 7 
> application using MVC specification and reference implementation(Libs 
> Attached)
>Reporter: Jeyvison Nascimento
>Assignee: Andriy Redko
>  Labels: cdi
> Fix For: 3.1.14, 3.2.1
>
> Attachments: javax-mvc.jar, ozark.jar
>
>
> Hey folks.
> We found a weird behavior while running MVC specification(JSR 371) on TomEE 
> witch CXF. We have a *ContainerRequestFilter* defined called 
> *JaxRsContextFilter* 
> {code:java}
> @PreMatching
> @Priority(0)
> public class JaxRsContextFilter implements ContainerRequestFilter {
> @Inject
> private JaxRsContextProducer jaxRsContextProducer;
> @Context
> private Configuration configuration;
> @Context
> private HttpServletRequest request;
> @Context
> private HttpServletResponse response;
> public JaxRsContextFilter() {
> }
> public void filter(ContainerRequestContext requestContext) throws 
> IOException {
> this.jaxRsContextProducer.populate(this.configuration, this.request, 
> this.response);
> }
> }
> {code}
> You can see that we have a JaxRsContextProducer annotated to be injected as a 
> field in our object but when JAXRSUtils is called to run the the container 
> filters it injects the fields annotated as *@Context* , not the fields 
> annotated with *@Inject*.
> {code:java}
>  for (ProviderInfo filter : containerFilters) {
> try {
> InjectionUtils.injectContexts(filter.getProvider(), 
> filter, m);
> filter.getProvider().filter(context);
> } catch (IOException ex) {
> throw ExceptionUtils.toInternalServerErrorException(ex, 
> null); 
> }
> {code}
> It causes our filter(*JaxRsContextFilter*) to throw a NullPointerException 
> when filtering the request because it uses the producer to perform some 
> actions in  this operation.
> I believe this field should be injected as well, not only the *@Context* 
> fields.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7501) Cannot inject field in ContainerRequestFilter

2017-10-29 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16224127#comment-16224127
 ] 

ASF GitHub Bot commented on CXF-7501:
-

reta commented on issue #330: CXF-7501: Cannot inject field in 
ContainerRequestFilter (and generally, into any providers registered using 
FeatureContext)
URL: https://github.com/apache/cxf/pull/330#issuecomment-340282842
 
 
   To be fair, we haven't tested with CDI 2 yet :-) But if you could summarize 
your observations, including the example above, it would be great help and 
starting point to address that.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Cannot inject field in ContainerRequestFilter
> -
>
> Key: CXF-7501
> URL: https://issues.apache.org/jira/browse/CXF-7501
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.10, 3.2.0
> Environment: Linux Mint 64 bit, TomEE Plus 7.0.3, JavaEE 7 
> application using MVC specification and reference implementation(Libs 
> Attached)
>Reporter: Jeyvison Nascimento
>Assignee: Andriy Redko
>  Labels: cdi
> Fix For: 3.1.14, 3.2.1
>
> Attachments: javax-mvc.jar, ozark.jar
>
>
> Hey folks.
> We found a weird behavior while running MVC specification(JSR 371) on TomEE 
> witch CXF. We have a *ContainerRequestFilter* defined called 
> *JaxRsContextFilter* 
> {code:java}
> @PreMatching
> @Priority(0)
> public class JaxRsContextFilter implements ContainerRequestFilter {
> @Inject
> private JaxRsContextProducer jaxRsContextProducer;
> @Context
> private Configuration configuration;
> @Context
> private HttpServletRequest request;
> @Context
> private HttpServletResponse response;
> public JaxRsContextFilter() {
> }
> public void filter(ContainerRequestContext requestContext) throws 
> IOException {
> this.jaxRsContextProducer.populate(this.configuration, this.request, 
> this.response);
> }
> }
> {code}
> You can see that we have a JaxRsContextProducer annotated to be injected as a 
> field in our object but when JAXRSUtils is called to run the the container 
> filters it injects the fields annotated as *@Context* , not the fields 
> annotated with *@Inject*.
> {code:java}
>  for (ProviderInfo filter : containerFilters) {
> try {
> InjectionUtils.injectContexts(filter.getProvider(), 
> filter, m);
> filter.getProvider().filter(context);
> } catch (IOException ex) {
> throw ExceptionUtils.toInternalServerErrorException(ex, 
> null); 
> }
> {code}
> It causes our filter(*JaxRsContextFilter*) to throw a NullPointerException 
> when filtering the request because it uses the producer to perform some 
> actions in  this operation.
> I believe this field should be injected as well, not only the *@Context* 
> fields.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7501) Cannot inject field in ContainerRequestFilter

2017-10-29 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16224132#comment-16224132
 ] 

ASF GitHub Bot commented on CXF-7501:
-

johnament commented on issue #330: CXF-7501: Cannot inject field in 
ContainerRequestFilter (and generally, into any providers registered using 
FeatureContext)
URL: https://github.com/apache/cxf/pull/330#issuecomment-340283415
 
 
   In general, there are no issues using CXF with CDI 2, the integration 
continues to work fine.  This was just something I noticed and wanted to 
confirm as a real issue.
   
   `@Vetoed` was the easiest way I had to explain where it would fail from a 
mobile 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Cannot inject field in ContainerRequestFilter
> -
>
> Key: CXF-7501
> URL: https://issues.apache.org/jira/browse/CXF-7501
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.10, 3.2.0
> Environment: Linux Mint 64 bit, TomEE Plus 7.0.3, JavaEE 7 
> application using MVC specification and reference implementation(Libs 
> Attached)
>Reporter: Jeyvison Nascimento
>Assignee: Andriy Redko
>  Labels: cdi
> Fix For: 3.1.14, 3.2.1
>
> Attachments: javax-mvc.jar, ozark.jar
>
>
> Hey folks.
> We found a weird behavior while running MVC specification(JSR 371) on TomEE 
> witch CXF. We have a *ContainerRequestFilter* defined called 
> *JaxRsContextFilter* 
> {code:java}
> @PreMatching
> @Priority(0)
> public class JaxRsContextFilter implements ContainerRequestFilter {
> @Inject
> private JaxRsContextProducer jaxRsContextProducer;
> @Context
> private Configuration configuration;
> @Context
> private HttpServletRequest request;
> @Context
> private HttpServletResponse response;
> public JaxRsContextFilter() {
> }
> public void filter(ContainerRequestContext requestContext) throws 
> IOException {
> this.jaxRsContextProducer.populate(this.configuration, this.request, 
> this.response);
> }
> }
> {code}
> You can see that we have a JaxRsContextProducer annotated to be injected as a 
> field in our object but when JAXRSUtils is called to run the the container 
> filters it injects the fields annotated as *@Context* , not the fields 
> annotated with *@Inject*.
> {code:java}
>  for (ProviderInfo filter : containerFilters) {
> try {
> InjectionUtils.injectContexts(filter.getProvider(), 
> filter, m);
> filter.getProvider().filter(context);
> } catch (IOException ex) {
> throw ExceptionUtils.toInternalServerErrorException(ex, 
> null); 
> }
> {code}
> It causes our filter(*JaxRsContextFilter*) to throw a NullPointerException 
> when filtering the request because it uses the producer to perform some 
> actions in  this operation.
> I believe this field should be injected as well, not only the *@Context* 
> fields.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7535) Support for Project Reactor as rx()

2017-10-29 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16224137#comment-16224137
 ] 

ASF GitHub Bot commented on CXF-7535:
-

johnament opened a new pull request #331: [CXF-7535] Adding client & server 
support for Project Reactor
URL: https://github.com/apache/cxf/pull/331
 
 
   This is still a WIP, so not ready to be merged.
   
   I'm looking to add support for Project Reactor as an rx invoker for CXF.  It 
effectively mirrors what the other two are doing, but using reactor's APIs.
   
   I'm still working on tests (e.g. I don't know if this works).  the biggest 
I'm having right now is getting the `systests` to import in intellij.  I've 
done it previously, but for some reason after switching to 3.2 it's no good.  
I've even gone in, blown away all `.iml` and the `.idea` folder, no luck.  
Anyone else seen something like this?
   
   https://user-images.githubusercontent.com/108167/32147008-28b82138-bcb6-11e7-8744-0fe5e32a2a8f.png";>
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Support for Project Reactor as rx()
> ---
>
> Key: CXF-7535
> URL: https://issues.apache.org/jira/browse/CXF-7535
> Project: CXF
>  Issue Type: New Feature
>  Components: JAX-RS
>Affects Versions: 3.2.0
>Reporter: John D. Ament
>
> It would be good if Project Reactor was supported as an rx() type in CXF.  
> https://github.com/apache/cxf/tree/master/rt/rs/extensions/rx - only shows rx 
> java and rx java 2.  project reactor/reactor core seem like the v3's of this 
> api stack.
> https://projectreactor.io/



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7535) Support for Project Reactor as rx()

2017-10-29 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16224143#comment-16224143
 ] 

ASF GitHub Bot commented on CXF-7535:
-

deki commented on issue #331: [CXF-7535] Adding client & server support for 
Project Reactor
URL: https://github.com/apache/cxf/pull/331#issuecomment-340284830
 
 
   Usually I have this issue if I miss some Maven profile selections. Adjusting 
the checkboxes normally fixes this.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Support for Project Reactor as rx()
> ---
>
> Key: CXF-7535
> URL: https://issues.apache.org/jira/browse/CXF-7535
> Project: CXF
>  Issue Type: New Feature
>  Components: JAX-RS
>Affects Versions: 3.2.0
>Reporter: John D. Ament
>
> It would be good if Project Reactor was supported as an rx() type in CXF.  
> https://github.com/apache/cxf/tree/master/rt/rs/extensions/rx - only shows rx 
> java and rx java 2.  project reactor/reactor core seem like the v3's of this 
> api stack.
> https://projectreactor.io/



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7535) Support for Project Reactor as rx()

2017-10-29 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16224325#comment-16224325
 ] 

ASF GitHub Bot commented on CXF-7535:
-

johnament commented on issue #331: [CXF-7535] Adding client & server support 
for Project Reactor
URL: https://github.com/apache/cxf/pull/331#issuecomment-340328466
 
 
   Hi @deki thanks for the tip.  What profiles would you recommend?  note that 
I only have the jaxrs systests module open in my IDE, but can go back to the 
broader one.
   
   One other thing, i'm noticing that the settings jar from intellij doesn't 
put imports in the right order.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Support for Project Reactor as rx()
> ---
>
> Key: CXF-7535
> URL: https://issues.apache.org/jira/browse/CXF-7535
> Project: CXF
>  Issue Type: New Feature
>  Components: JAX-RS
>Affects Versions: 3.2.0
>Reporter: John D. Ament
>
> It would be good if Project Reactor was supported as an rx() type in CXF.  
> https://github.com/apache/cxf/tree/master/rt/rs/extensions/rx - only shows rx 
> java and rx java 2.  project reactor/reactor core seem like the v3's of this 
> api stack.
> https://projectreactor.io/



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7535) Support for Project Reactor as rx()

2017-10-30 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16224976#comment-16224976
 ] 

ASF GitHub Bot commented on CXF-7535:
-

deki commented on issue #331: [CXF-7535] Adding client & server support for 
Project Reactor
URL: https://github.com/apache/cxf/pull/331#issuecomment-340447162
 
 
   I usually check the everything profile. But in your case it looks more like 
the dependencies are not properly resolve. Hit the refresh button in the Maven 
projects tab (first one on the left). If this doesn't work, run File -> 
Invalidate Caches/ Restart.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Support for Project Reactor as rx()
> ---
>
> Key: CXF-7535
> URL: https://issues.apache.org/jira/browse/CXF-7535
> Project: CXF
>  Issue Type: New Feature
>  Components: JAX-RS
>Affects Versions: 3.2.0
>Reporter: John D. Ament
>
> It would be good if Project Reactor was supported as an rx() type in CXF.  
> https://github.com/apache/cxf/tree/master/rt/rs/extensions/rx - only shows rx 
> java and rx java 2.  project reactor/reactor core seem like the v3's of this 
> api stack.
> https://projectreactor.io/



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7501) Cannot inject field in ContainerRequestFilter

2017-10-30 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16225479#comment-16225479
 ] 

ASF GitHub Bot commented on CXF-7501:
-

sberyozkin commented on issue #329: CXF-7501: Cannot inject field in 
ContainerRequestFilter (and generally, into any providers registered using 
FeatureContext)
URL: https://github.com/apache/cxf/pull/329#issuecomment-340538038
 
 
   Right, the fallback should be available


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Cannot inject field in ContainerRequestFilter
> -
>
> Key: CXF-7501
> URL: https://issues.apache.org/jira/browse/CXF-7501
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.10, 3.2.0
> Environment: Linux Mint 64 bit, TomEE Plus 7.0.3, JavaEE 7 
> application using MVC specification and reference implementation(Libs 
> Attached)
>Reporter: Jeyvison Nascimento
>Assignee: Andriy Redko
>  Labels: cdi
> Fix For: 3.1.14, 3.2.1
>
> Attachments: javax-mvc.jar, ozark.jar
>
>
> Hey folks.
> We found a weird behavior while running MVC specification(JSR 371) on TomEE 
> witch CXF. We have a *ContainerRequestFilter* defined called 
> *JaxRsContextFilter* 
> {code:java}
> @PreMatching
> @Priority(0)
> public class JaxRsContextFilter implements ContainerRequestFilter {
> @Inject
> private JaxRsContextProducer jaxRsContextProducer;
> @Context
> private Configuration configuration;
> @Context
> private HttpServletRequest request;
> @Context
> private HttpServletResponse response;
> public JaxRsContextFilter() {
> }
> public void filter(ContainerRequestContext requestContext) throws 
> IOException {
> this.jaxRsContextProducer.populate(this.configuration, this.request, 
> this.response);
> }
> }
> {code}
> You can see that we have a JaxRsContextProducer annotated to be injected as a 
> field in our object but when JAXRSUtils is called to run the the container 
> filters it injects the fields annotated as *@Context* , not the fields 
> annotated with *@Inject*.
> {code:java}
>  for (ProviderInfo filter : containerFilters) {
> try {
> InjectionUtils.injectContexts(filter.getProvider(), 
> filter, m);
> filter.getProvider().filter(context);
> } catch (IOException ex) {
> throw ExceptionUtils.toInternalServerErrorException(ex, 
> null); 
> }
> {code}
> It causes our filter(*JaxRsContextFilter*) to throw a NullPointerException 
> when filtering the request because it uses the producer to perform some 
> actions in  this operation.
> I believe this field should be injected as well, not only the *@Context* 
> fields.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7535) Support for Project Reactor as rx()

2017-11-04 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16239139#comment-16239139
 ] 

ASF GitHub Bot commented on CXF-7535:
-

reta commented on a change in pull request #331: [CXF-7535] Adding client & 
server support for Project Reactor
URL: https://github.com/apache/cxf/pull/331#discussion_r148937319
 
 

 ##
 File path: 
rt/rs/extensions/reactor/src/main/java/org/apache/cxf/jaxrs/reactor/client/FluxRxInvokerImpl.java
 ##
 @@ -0,0 +1,178 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.jaxrs.reactor.client;
+
+import org.apache.cxf.jaxrs.client.WebClient;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+import reactor.core.scheduler.Scheduler;
+import reactor.core.scheduler.Schedulers;
+
+import javax.ws.rs.HttpMethod;
+import javax.ws.rs.client.Entity;
+import javax.ws.rs.core.GenericType;
+import javax.ws.rs.core.Response;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Future;
+
+import static 
org.apache.cxf.jaxrs.reactor.client.ReactorUtils.toCompletableFuture;
+
+public class FluxRxInvokerImpl implements FluxRxInvoker {
+private static final String TRACE = "TRACE";
+private final WebClient webClient;
+private final Scheduler scheduler;
+
+FluxRxInvokerImpl(WebClient webClient, ExecutorService executorService) {
+this.webClient = webClient;
+this.scheduler = executorService == null ? null : 
Schedulers.fromExecutorService(executorService);
+}
+
+@Override
+public Flux get() {
 
 Review comment:
   `Flux` please :)


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Support for Project Reactor as rx()
> ---
>
> Key: CXF-7535
> URL: https://issues.apache.org/jira/browse/CXF-7535
> Project: CXF
>  Issue Type: New Feature
>  Components: JAX-RS
>Affects Versions: 3.2.0
>Reporter: John D. Ament
>Priority: Major
>
> It would be good if Project Reactor was supported as an rx() type in CXF.  
> https://github.com/apache/cxf/tree/master/rt/rs/extensions/rx - only shows rx 
> java and rx java 2.  project reactor/reactor core seem like the v3's of this 
> api stack.
> https://projectreactor.io/



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7535) Support for Project Reactor as rx()

2017-11-04 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16239146#comment-16239146
 ] 

ASF GitHub Bot commented on CXF-7535:
-

reta commented on a change in pull request #331: [CXF-7535] Adding client & 
server support for Project Reactor
URL: https://github.com/apache/cxf/pull/331#discussion_r148937715
 
 

 ##
 File path: 
rt/rs/extensions/reactor/src/main/java/org/apache/cxf/jaxrs/reactor/client/FluxRxInvokerImpl.java
 ##
 @@ -0,0 +1,178 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.jaxrs.reactor.client;
+
+import org.apache.cxf.jaxrs.client.WebClient;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+import reactor.core.scheduler.Scheduler;
+import reactor.core.scheduler.Schedulers;
+
+import javax.ws.rs.HttpMethod;
+import javax.ws.rs.client.Entity;
+import javax.ws.rs.core.GenericType;
+import javax.ws.rs.core.Response;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Future;
+
+import static 
org.apache.cxf.jaxrs.reactor.client.ReactorUtils.toCompletableFuture;
+
+public class FluxRxInvokerImpl implements FluxRxInvoker {
+private static final String TRACE = "TRACE";
+private final WebClient webClient;
+private final Scheduler scheduler;
+
+FluxRxInvokerImpl(WebClient webClient, ExecutorService executorService) {
+this.webClient = webClient;
+this.scheduler = executorService == null ? null : 
Schedulers.fromExecutorService(executorService);
+}
+
+@Override
+public Flux get() {
+return method(HttpMethod.GET);
+}
+
+@Override
+public  Flux get(Class responseType) {
+return method(HttpMethod.GET, responseType);
+}
+
+@Override
+public  Flux get(GenericType genericType) {
+return method(HttpMethod.GET, genericType);
+}
+
+@Override
+public Flux put(Entity entity) {
+return method(HttpMethod.PUT, entity);
+}
+
+@Override
+public  Flux put(Entity entity, Class responseType) {
+return method(HttpMethod.PUT, responseType);
+}
+
+@Override
+public  Flux put(Entity entity, GenericType genericType) {
+return method(HttpMethod.PUT, entity, genericType);
+}
+
+@Override
+public Flux post(Entity entity) {
+return method(HttpMethod.POST, entity);
+}
+
+@Override
+public  Flux post(Entity entity, Class responseType) {
+return method(HttpMethod.POST, entity, responseType);
+}
+
+@Override
+public  Flux post(Entity entity, GenericType genericType) {
+return method(HttpMethod.POST, entity, genericType);
+}
+
+@Override
+public Flux delete() {
+return method(HttpMethod.DELETE);
+}
+
+@Override
+public  Flux delete(Class responseType) {
+return method(HttpMethod.DELETE, responseType);
+}
+
+@Override
+public  Flux delete(GenericType genericType) {
+return method(HttpMethod.DELETE, genericType);
+}
+
+@Override
+public Flux head() {
+return method(HttpMethod.HEAD);
+}
+
+@Override
+public Flux options() {
+return method(HttpMethod.OPTIONS);
+}
+
+@Override
+public  Flux options(Class responseType) {
+return method(HttpMethod.OPTIONS, responseType);
+}
+
+@Override
+public  Flux options(GenericType genericType) {
+return method(HttpMethod.OPTIONS, genericType);
+}
+
+@Override
+public Flux trace() {
+return method(TRACE);
+}
+
+@Override
+public  Flux trace(Class responseType) {
+return method(TRACE, responseType);
+}
+
+@Override
+public  Flux trace(GenericType genericType) {
+return method(TRACE, genericType);
+}
+
+@Override
+public Flux method(String name) {
+return method(name, Response.class);
+}
+
+@Override
+public  Flux method(String name, Class responseType) {
+return flux(webClient.async().method(name, responseType));
+}
+
+@Override
+public  Flux method(String name, GenericType gener

[jira] [Commented] (CXF-7535) Support for Project Reactor as rx()

2017-11-04 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16239145#comment-16239145
 ] 

ASF GitHub Bot commented on CXF-7535:
-

reta commented on a change in pull request #331: [CXF-7535] Adding client & 
server support for Project Reactor
URL: https://github.com/apache/cxf/pull/331#discussion_r148937715
 
 

 ##
 File path: 
rt/rs/extensions/reactor/src/main/java/org/apache/cxf/jaxrs/reactor/client/FluxRxInvokerImpl.java
 ##
 @@ -0,0 +1,178 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.jaxrs.reactor.client;
+
+import org.apache.cxf.jaxrs.client.WebClient;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+import reactor.core.scheduler.Scheduler;
+import reactor.core.scheduler.Schedulers;
+
+import javax.ws.rs.HttpMethod;
+import javax.ws.rs.client.Entity;
+import javax.ws.rs.core.GenericType;
+import javax.ws.rs.core.Response;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Future;
+
+import static 
org.apache.cxf.jaxrs.reactor.client.ReactorUtils.toCompletableFuture;
+
+public class FluxRxInvokerImpl implements FluxRxInvoker {
+private static final String TRACE = "TRACE";
+private final WebClient webClient;
+private final Scheduler scheduler;
+
+FluxRxInvokerImpl(WebClient webClient, ExecutorService executorService) {
+this.webClient = webClient;
+this.scheduler = executorService == null ? null : 
Schedulers.fromExecutorService(executorService);
+}
+
+@Override
+public Flux get() {
+return method(HttpMethod.GET);
+}
+
+@Override
+public  Flux get(Class responseType) {
+return method(HttpMethod.GET, responseType);
+}
+
+@Override
+public  Flux get(GenericType genericType) {
+return method(HttpMethod.GET, genericType);
+}
+
+@Override
+public Flux put(Entity entity) {
+return method(HttpMethod.PUT, entity);
+}
+
+@Override
+public  Flux put(Entity entity, Class responseType) {
+return method(HttpMethod.PUT, responseType);
+}
+
+@Override
+public  Flux put(Entity entity, GenericType genericType) {
+return method(HttpMethod.PUT, entity, genericType);
+}
+
+@Override
+public Flux post(Entity entity) {
+return method(HttpMethod.POST, entity);
+}
+
+@Override
+public  Flux post(Entity entity, Class responseType) {
+return method(HttpMethod.POST, entity, responseType);
+}
+
+@Override
+public  Flux post(Entity entity, GenericType genericType) {
+return method(HttpMethod.POST, entity, genericType);
+}
+
+@Override
+public Flux delete() {
+return method(HttpMethod.DELETE);
+}
+
+@Override
+public  Flux delete(Class responseType) {
+return method(HttpMethod.DELETE, responseType);
+}
+
+@Override
+public  Flux delete(GenericType genericType) {
+return method(HttpMethod.DELETE, genericType);
+}
+
+@Override
+public Flux head() {
+return method(HttpMethod.HEAD);
+}
+
+@Override
+public Flux options() {
+return method(HttpMethod.OPTIONS);
+}
+
+@Override
+public  Flux options(Class responseType) {
+return method(HttpMethod.OPTIONS, responseType);
+}
+
+@Override
+public  Flux options(GenericType genericType) {
+return method(HttpMethod.OPTIONS, genericType);
+}
+
+@Override
+public Flux trace() {
+return method(TRACE);
+}
+
+@Override
+public  Flux trace(Class responseType) {
+return method(TRACE, responseType);
+}
+
+@Override
+public  Flux trace(GenericType genericType) {
+return method(TRACE, genericType);
+}
+
+@Override
+public Flux method(String name) {
+return method(name, Response.class);
+}
+
+@Override
+public  Flux method(String name, Class responseType) {
+return flux(webClient.async().method(name, responseType));
+}
+
+@Override
+public  Flux method(String name, GenericType gener

[jira] [Commented] (CXF-7535) Support for Project Reactor as rx()

2017-11-05 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16239780#comment-16239780
 ] 

ASF GitHub Bot commented on CXF-7535:
-

johnament commented on a change in pull request #331: [CXF-7535] Adding client 
& server support for Project Reactor
URL: https://github.com/apache/cxf/pull/331#discussion_r148976878
 
 

 ##
 File path: 
rt/rs/extensions/reactor/src/main/java/org/apache/cxf/jaxrs/reactor/client/FluxRxInvokerImpl.java
 ##
 @@ -0,0 +1,178 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.jaxrs.reactor.client;
+
+import org.apache.cxf.jaxrs.client.WebClient;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+import reactor.core.scheduler.Scheduler;
+import reactor.core.scheduler.Schedulers;
+
+import javax.ws.rs.HttpMethod;
+import javax.ws.rs.client.Entity;
+import javax.ws.rs.core.GenericType;
+import javax.ws.rs.core.Response;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Future;
+
+import static 
org.apache.cxf.jaxrs.reactor.client.ReactorUtils.toCompletableFuture;
+
+public class FluxRxInvokerImpl implements FluxRxInvoker {
+private static final String TRACE = "TRACE";
+private final WebClient webClient;
+private final Scheduler scheduler;
+
+FluxRxInvokerImpl(WebClient webClient, ExecutorService executorService) {
+this.webClient = webClient;
+this.scheduler = executorService == null ? null : 
Schedulers.fromExecutorService(executorService);
+}
+
+@Override
+public Flux get() {
 
 Review comment:
   Should be fixed.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Support for Project Reactor as rx()
> ---
>
> Key: CXF-7535
> URL: https://issues.apache.org/jira/browse/CXF-7535
> Project: CXF
>  Issue Type: New Feature
>  Components: JAX-RS
>Affects Versions: 3.2.0
>Reporter: John D. Ament
>
> It would be good if Project Reactor was supported as an rx() type in CXF.  
> https://github.com/apache/cxf/tree/master/rt/rs/extensions/rx - only shows rx 
> java and rx java 2.  project reactor/reactor core seem like the v3's of this 
> api stack.
> https://projectreactor.io/



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7535) Support for Project Reactor as rx()

2017-11-05 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16239781#comment-16239781
 ] 

ASF GitHub Bot commented on CXF-7535:
-

johnament commented on a change in pull request #331: [CXF-7535] Adding client 
& server support for Project Reactor
URL: https://github.com/apache/cxf/pull/331#discussion_r148977058
 
 

 ##
 File path: 
rt/rs/extensions/reactor/src/main/java/org/apache/cxf/jaxrs/reactor/client/FluxRxInvokerImpl.java
 ##
 @@ -0,0 +1,178 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.jaxrs.reactor.client;
+
+import org.apache.cxf.jaxrs.client.WebClient;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+import reactor.core.scheduler.Scheduler;
+import reactor.core.scheduler.Schedulers;
+
+import javax.ws.rs.HttpMethod;
+import javax.ws.rs.client.Entity;
+import javax.ws.rs.core.GenericType;
+import javax.ws.rs.core.Response;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Future;
+
+import static 
org.apache.cxf.jaxrs.reactor.client.ReactorUtils.toCompletableFuture;
+
+public class FluxRxInvokerImpl implements FluxRxInvoker {
+private static final String TRACE = "TRACE";
+private final WebClient webClient;
+private final Scheduler scheduler;
+
+FluxRxInvokerImpl(WebClient webClient, ExecutorService executorService) {
+this.webClient = webClient;
+this.scheduler = executorService == null ? null : 
Schedulers.fromExecutorService(executorService);
+}
+
+@Override
+public Flux get() {
+return method(HttpMethod.GET);
+}
+
+@Override
+public  Flux get(Class responseType) {
+return method(HttpMethod.GET, responseType);
+}
+
+@Override
+public  Flux get(GenericType genericType) {
+return method(HttpMethod.GET, genericType);
+}
+
+@Override
+public Flux put(Entity entity) {
+return method(HttpMethod.PUT, entity);
+}
+
+@Override
+public  Flux put(Entity entity, Class responseType) {
+return method(HttpMethod.PUT, responseType);
+}
+
+@Override
+public  Flux put(Entity entity, GenericType genericType) {
+return method(HttpMethod.PUT, entity, genericType);
+}
+
+@Override
+public Flux post(Entity entity) {
+return method(HttpMethod.POST, entity);
+}
+
+@Override
+public  Flux post(Entity entity, Class responseType) {
+return method(HttpMethod.POST, entity, responseType);
+}
+
+@Override
+public  Flux post(Entity entity, GenericType genericType) {
+return method(HttpMethod.POST, entity, genericType);
+}
+
+@Override
+public Flux delete() {
+return method(HttpMethod.DELETE);
+}
+
+@Override
+public  Flux delete(Class responseType) {
+return method(HttpMethod.DELETE, responseType);
+}
+
+@Override
+public  Flux delete(GenericType genericType) {
+return method(HttpMethod.DELETE, genericType);
+}
+
+@Override
+public Flux head() {
+return method(HttpMethod.HEAD);
+}
+
+@Override
+public Flux options() {
+return method(HttpMethod.OPTIONS);
+}
+
+@Override
+public  Flux options(Class responseType) {
+return method(HttpMethod.OPTIONS, responseType);
+}
+
+@Override
+public  Flux options(GenericType genericType) {
+return method(HttpMethod.OPTIONS, genericType);
+}
+
+@Override
+public Flux trace() {
+return method(TRACE);
+}
+
+@Override
+public  Flux trace(Class responseType) {
+return method(TRACE, responseType);
+}
+
+@Override
+public  Flux trace(GenericType genericType) {
+return method(TRACE, genericType);
+}
+
+@Override
+public Flux method(String name) {
+return method(name, Response.class);
+}
+
+@Override
+public  Flux method(String name, Class responseType) {
+return flux(webClient.async().method(name, responseType));
+}
+
+@Override
+public  Flux method(String name, GenericType 

[jira] [Commented] (CXF-7491) TransformInInterceptor / TransformOutInterceptor assume UTF-8, ignore header-provided character set

2017-11-05 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7491?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16239827#comment-16239827
 ] 

ASF GitHub Bot commented on CXF-7491:
-

cchepelov commented on issue #309: [CXF-7491] Fork Stax & XSLT interceptors to 
make them Charset-aware
URL: https://github.com/apache/cxf/pull/309#issuecomment-342029524
 
 
   @sberyozkin many apologies for not coming back earlier
   
   I've updated the PR to switch back to updating the protected methods, which 
bets hardly anyone extended the classes in question (+ some checkstyle tidying 
up)
   
   I'm not sure adding a message property would work, since the whole point of 
the patch is to read the existing property and add an "encoding" arguments to 
internal methods to pass it on, but I might misread.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> TransformInInterceptor / TransformOutInterceptor assume UTF-8, ignore 
> header-provided character set
> ---
>
> Key: CXF-7491
> URL: https://issues.apache.org/jira/browse/CXF-7491
> Project: CXF
>  Issue Type: Bug
>  Components: Soap Binding
>Affects Versions: 3.1.11, 3.1.12
> Environment: client Linux/Java/CXF (actually scala using 
> sbt-play-soap)  
> server IBMi AS/400
>Reporter: Cyrille Chépélov
>
> When talking to a server using IBMi / RPG-based software and SOAP gateway:
> the returned SOAP message contains XML encoded as ISO-8859-1; the HTTP header 
> do specify a content type of xml+soap with character set ISO-8859-1; however 
> the XML message itself include no character set declaration.
> Due to discrepancies between the official WSDL for the SOAP message and the 
> remote implementation, a couple transforms had to be deployed. This works 
> fine as long as the exchanged messages actually conform to US-ASCII (no 
> diacritics), but whenever any character encoded differently between 
> ISO-8859-1 and UTF-8 is used, the TransformInInterceptor fails to parse the 
> text, as the XMLStreamReader is built to expect UTF-8 and actually receives 
> ISO-8859-1 input



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7535) Support for Project Reactor as rx()

2017-11-05 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16239948#comment-16239948
 ] 

ASF GitHub Bot commented on CXF-7535:
-

cschneider commented on issue #331: [CXF-7535] Adding client & server support 
for Project Reactor
URL: https://github.com/apache/cxf/pull/331#issuecomment-342055544
 
 
   Do we need to specifically support reactor or is it enough to just depend on 
reactive streams?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Support for Project Reactor as rx()
> ---
>
> Key: CXF-7535
> URL: https://issues.apache.org/jira/browse/CXF-7535
> Project: CXF
>  Issue Type: New Feature
>  Components: JAX-RS
>Affects Versions: 3.2.0
>Reporter: John D. Ament
>
> It would be good if Project Reactor was supported as an rx() type in CXF.  
> https://github.com/apache/cxf/tree/master/rt/rs/extensions/rx - only shows rx 
> java and rx java 2.  project reactor/reactor core seem like the v3's of this 
> api stack.
> https://projectreactor.io/



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7535) Support for Project Reactor as rx()

2017-11-06 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16240092#comment-16240092
 ] 

ASF GitHub Bot commented on CXF-7535:
-

sberyozkin commented on a change in pull request #331: [CXF-7535] Adding client 
& server support for Project Reactor
URL: https://github.com/apache/cxf/pull/331#discussion_r149035854
 
 

 ##
 File path: 
rt/rs/extensions/reactor/src/main/java/org/apache/cxf/jaxrs/reactor/client/FluxRxInvokerImpl.java
 ##
 @@ -0,0 +1,178 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.jaxrs.reactor.client;
+
+import org.apache.cxf.jaxrs.client.WebClient;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+import reactor.core.scheduler.Scheduler;
+import reactor.core.scheduler.Schedulers;
+
+import javax.ws.rs.HttpMethod;
+import javax.ws.rs.client.Entity;
+import javax.ws.rs.core.GenericType;
+import javax.ws.rs.core.Response;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Future;
+
+import static 
org.apache.cxf.jaxrs.reactor.client.ReactorUtils.toCompletableFuture;
+
+public class FluxRxInvokerImpl implements FluxRxInvoker {
+private static final String TRACE = "TRACE";
+private final WebClient webClient;
+private final Scheduler scheduler;
+
+FluxRxInvokerImpl(WebClient webClient, ExecutorService executorService) {
+this.webClient = webClient;
+this.scheduler = executorService == null ? null : 
Schedulers.fromExecutorService(executorService);
+}
+
+@Override
+public Flux get() {
+return method(HttpMethod.GET);
+}
+
+@Override
+public  Flux get(Class responseType) {
+return method(HttpMethod.GET, responseType);
+}
+
+@Override
+public  Flux get(GenericType genericType) {
+return method(HttpMethod.GET, genericType);
+}
+
+@Override
+public Flux put(Entity entity) {
+return method(HttpMethod.PUT, entity);
+}
+
+@Override
+public  Flux put(Entity entity, Class responseType) {
+return method(HttpMethod.PUT, responseType);
+}
+
+@Override
+public  Flux put(Entity entity, GenericType genericType) {
+return method(HttpMethod.PUT, entity, genericType);
+}
+
+@Override
+public Flux post(Entity entity) {
+return method(HttpMethod.POST, entity);
+}
+
+@Override
+public  Flux post(Entity entity, Class responseType) {
+return method(HttpMethod.POST, entity, responseType);
+}
+
+@Override
+public  Flux post(Entity entity, GenericType genericType) {
+return method(HttpMethod.POST, entity, genericType);
+}
+
+@Override
+public Flux delete() {
+return method(HttpMethod.DELETE);
+}
+
+@Override
+public  Flux delete(Class responseType) {
+return method(HttpMethod.DELETE, responseType);
+}
+
+@Override
+public  Flux delete(GenericType genericType) {
+return method(HttpMethod.DELETE, genericType);
+}
+
+@Override
+public Flux head() {
+return method(HttpMethod.HEAD);
+}
+
+@Override
+public Flux options() {
+return method(HttpMethod.OPTIONS);
+}
+
+@Override
+public  Flux options(Class responseType) {
+return method(HttpMethod.OPTIONS, responseType);
+}
+
+@Override
+public  Flux options(GenericType genericType) {
+return method(HttpMethod.OPTIONS, genericType);
+}
+
+@Override
+public Flux trace() {
+return method(TRACE);
+}
+
+@Override
+public  Flux trace(Class responseType) {
+return method(TRACE, responseType);
+}
+
+@Override
+public  Flux trace(GenericType genericType) {
+return method(TRACE, genericType);
+}
+
+@Override
+public Flux method(String name) {
+return method(name, Response.class);
+}
+
+@Override
+public  Flux method(String name, Class responseType) {
+return flux(webClient.async().method(name, responseType));
+}
+
+@Override
+public  Flux method(String name, GenericType

[jira] [Commented] (CXF-7535) Support for Project Reactor as rx()

2017-11-06 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16240162#comment-16240162
 ] 

ASF GitHub Bot commented on CXF-7535:
-

johnament commented on issue #331: [CXF-7535] Adding client & server support 
for Project Reactor
URL: https://github.com/apache/cxf/pull/331#issuecomment-342120759
 
 
   @cschneider there's a new `rx()` feature in the client adapter that is meant 
to support converting the response into the appropriate objects.  


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Support for Project Reactor as rx()
> ---
>
> Key: CXF-7535
> URL: https://issues.apache.org/jira/browse/CXF-7535
> Project: CXF
>  Issue Type: New Feature
>  Components: JAX-RS
>Affects Versions: 3.2.0
>Reporter: John D. Ament
>
> It would be good if Project Reactor was supported as an rx() type in CXF.  
> https://github.com/apache/cxf/tree/master/rt/rs/extensions/rx - only shows rx 
> java and rx java 2.  project reactor/reactor core seem like the v3's of this 
> api stack.
> https://projectreactor.io/



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7535) Support for Project Reactor as rx()

2017-11-06 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16240163#comment-16240163
 ] 

ASF GitHub Bot commented on CXF-7535:
-

johnament commented on a change in pull request #331: [CXF-7535] Adding client 
& server support for Project Reactor
URL: https://github.com/apache/cxf/pull/331#discussion_r149055427
 
 

 ##
 File path: 
rt/rs/extensions/reactor/src/main/java/org/apache/cxf/jaxrs/reactor/client/FluxRxInvokerImpl.java
 ##
 @@ -0,0 +1,178 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.jaxrs.reactor.client;
+
+import org.apache.cxf.jaxrs.client.WebClient;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+import reactor.core.scheduler.Scheduler;
+import reactor.core.scheduler.Schedulers;
+
+import javax.ws.rs.HttpMethod;
+import javax.ws.rs.client.Entity;
+import javax.ws.rs.core.GenericType;
+import javax.ws.rs.core.Response;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Future;
+
+import static 
org.apache.cxf.jaxrs.reactor.client.ReactorUtils.toCompletableFuture;
+
+public class FluxRxInvokerImpl implements FluxRxInvoker {
+private static final String TRACE = "TRACE";
+private final WebClient webClient;
+private final Scheduler scheduler;
+
+FluxRxInvokerImpl(WebClient webClient, ExecutorService executorService) {
+this.webClient = webClient;
+this.scheduler = executorService == null ? null : 
Schedulers.fromExecutorService(executorService);
+}
+
+@Override
+public Flux get() {
+return method(HttpMethod.GET);
+}
+
+@Override
+public  Flux get(Class responseType) {
+return method(HttpMethod.GET, responseType);
+}
+
+@Override
+public  Flux get(GenericType genericType) {
+return method(HttpMethod.GET, genericType);
+}
+
+@Override
+public Flux put(Entity entity) {
+return method(HttpMethod.PUT, entity);
+}
+
+@Override
+public  Flux put(Entity entity, Class responseType) {
+return method(HttpMethod.PUT, responseType);
+}
+
+@Override
+public  Flux put(Entity entity, GenericType genericType) {
+return method(HttpMethod.PUT, entity, genericType);
+}
+
+@Override
+public Flux post(Entity entity) {
+return method(HttpMethod.POST, entity);
+}
+
+@Override
+public  Flux post(Entity entity, Class responseType) {
+return method(HttpMethod.POST, entity, responseType);
+}
+
+@Override
+public  Flux post(Entity entity, GenericType genericType) {
+return method(HttpMethod.POST, entity, genericType);
+}
+
+@Override
+public Flux delete() {
+return method(HttpMethod.DELETE);
+}
+
+@Override
+public  Flux delete(Class responseType) {
+return method(HttpMethod.DELETE, responseType);
+}
+
+@Override
+public  Flux delete(GenericType genericType) {
+return method(HttpMethod.DELETE, genericType);
+}
+
+@Override
+public Flux head() {
+return method(HttpMethod.HEAD);
+}
+
+@Override
+public Flux options() {
+return method(HttpMethod.OPTIONS);
+}
+
+@Override
+public  Flux options(Class responseType) {
+return method(HttpMethod.OPTIONS, responseType);
+}
+
+@Override
+public  Flux options(GenericType genericType) {
+return method(HttpMethod.OPTIONS, genericType);
+}
+
+@Override
+public Flux trace() {
+return method(TRACE);
+}
+
+@Override
+public  Flux trace(Class responseType) {
+return method(TRACE, responseType);
+}
+
+@Override
+public  Flux trace(GenericType genericType) {
+return method(TRACE, genericType);
+}
+
+@Override
+public Flux method(String name) {
+return method(name, Response.class);
+}
+
+@Override
+public  Flux method(String name, Class responseType) {
+return flux(webClient.async().method(name, responseType));
+}
+
+@Override
+public  Flux method(String name, GenericType 

[jira] [Commented] (CXF-7535) Support for Project Reactor as rx()

2017-11-06 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16240168#comment-16240168
 ] 

ASF GitHub Bot commented on CXF-7535:
-

cschneider commented on issue #331: [CXF-7535] Adding client & server support 
for Project Reactor
URL: https://github.com/apache/cxf/pull/331#issuecomment-34218
 
 
   Got it now .. looks good this way.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Support for Project Reactor as rx()
> ---
>
> Key: CXF-7535
> URL: https://issues.apache.org/jira/browse/CXF-7535
> Project: CXF
>  Issue Type: New Feature
>  Components: JAX-RS
>Affects Versions: 3.2.0
>Reporter: John D. Ament
>
> It would be good if Project Reactor was supported as an rx() type in CXF.  
> https://github.com/apache/cxf/tree/master/rt/rs/extensions/rx - only shows rx 
> java and rx java 2.  project reactor/reactor core seem like the v3's of this 
> api stack.
> https://projectreactor.io/



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7535) Support for Project Reactor as rx()

2017-11-06 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16240175#comment-16240175
 ] 

ASF GitHub Bot commented on CXF-7535:
-

sberyozkin commented on a change in pull request #331: [CXF-7535] Adding client 
& server support for Project Reactor
URL: https://github.com/apache/cxf/pull/331#discussion_r149057846
 
 

 ##
 File path: 
rt/rs/extensions/reactor/src/main/java/org/apache/cxf/jaxrs/reactor/client/FluxRxInvokerImpl.java
 ##
 @@ -0,0 +1,178 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.jaxrs.reactor.client;
+
+import org.apache.cxf.jaxrs.client.WebClient;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+import reactor.core.scheduler.Scheduler;
+import reactor.core.scheduler.Schedulers;
+
+import javax.ws.rs.HttpMethod;
+import javax.ws.rs.client.Entity;
+import javax.ws.rs.core.GenericType;
+import javax.ws.rs.core.Response;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Future;
+
+import static 
org.apache.cxf.jaxrs.reactor.client.ReactorUtils.toCompletableFuture;
+
+public class FluxRxInvokerImpl implements FluxRxInvoker {
+private static final String TRACE = "TRACE";
+private final WebClient webClient;
+private final Scheduler scheduler;
+
+FluxRxInvokerImpl(WebClient webClient, ExecutorService executorService) {
+this.webClient = webClient;
+this.scheduler = executorService == null ? null : 
Schedulers.fromExecutorService(executorService);
+}
+
+@Override
+public Flux get() {
+return method(HttpMethod.GET);
+}
+
+@Override
+public  Flux get(Class responseType) {
+return method(HttpMethod.GET, responseType);
+}
+
+@Override
+public  Flux get(GenericType genericType) {
+return method(HttpMethod.GET, genericType);
+}
+
+@Override
+public Flux put(Entity entity) {
+return method(HttpMethod.PUT, entity);
+}
+
+@Override
+public  Flux put(Entity entity, Class responseType) {
+return method(HttpMethod.PUT, responseType);
+}
+
+@Override
+public  Flux put(Entity entity, GenericType genericType) {
+return method(HttpMethod.PUT, entity, genericType);
+}
+
+@Override
+public Flux post(Entity entity) {
+return method(HttpMethod.POST, entity);
+}
+
+@Override
+public  Flux post(Entity entity, Class responseType) {
+return method(HttpMethod.POST, entity, responseType);
+}
+
+@Override
+public  Flux post(Entity entity, GenericType genericType) {
+return method(HttpMethod.POST, entity, genericType);
+}
+
+@Override
+public Flux delete() {
+return method(HttpMethod.DELETE);
+}
+
+@Override
+public  Flux delete(Class responseType) {
+return method(HttpMethod.DELETE, responseType);
+}
+
+@Override
+public  Flux delete(GenericType genericType) {
+return method(HttpMethod.DELETE, genericType);
+}
+
+@Override
+public Flux head() {
+return method(HttpMethod.HEAD);
+}
+
+@Override
+public Flux options() {
+return method(HttpMethod.OPTIONS);
+}
+
+@Override
+public  Flux options(Class responseType) {
+return method(HttpMethod.OPTIONS, responseType);
+}
+
+@Override
+public  Flux options(GenericType genericType) {
+return method(HttpMethod.OPTIONS, genericType);
+}
+
+@Override
+public Flux trace() {
+return method(TRACE);
+}
+
+@Override
+public  Flux trace(Class responseType) {
+return method(TRACE, responseType);
+}
+
+@Override
+public  Flux trace(GenericType genericType) {
+return method(TRACE, genericType);
+}
+
+@Override
+public Flux method(String name) {
+return method(name, Response.class);
+}
+
+@Override
+public  Flux method(String name, Class responseType) {
+return flux(webClient.async().method(name, responseType));
+}
+
+@Override
+public  Flux method(String name, GenericType

[jira] [Commented] (CXF-7535) Support for Project Reactor as rx()

2017-11-06 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16241365#comment-16241365
 ] 

ASF GitHub Bot commented on CXF-7535:
-

reta commented on a change in pull request #331: [CXF-7535] Adding client & 
server support for Project Reactor
URL: https://github.com/apache/cxf/pull/331#discussion_r149258822
 
 

 ##
 File path: rt/rs/extensions/reactor/pom.xml
 ##
 @@ -0,0 +1,127 @@
+
+
+http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
+4.0.0
+cxf-rt-rs-extension-reactor
+bundle
+Apache CXF JAX-RS Extensions: Project Reactor
+Apache CXF JAX-RS Extensions: Project Reactor
+http://cxf.apache.org
+
+org.apache.cxf
+cxf-parent
+3.2.1-SNAPSHOT
 
 Review comment:
   3.2.2-SNAPSHOT :)


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Support for Project Reactor as rx()
> ---
>
> Key: CXF-7535
> URL: https://issues.apache.org/jira/browse/CXF-7535
> Project: CXF
>  Issue Type: New Feature
>  Components: JAX-RS
>Affects Versions: 3.2.0
>Reporter: John D. Ament
>
> It would be good if Project Reactor was supported as an rx() type in CXF.  
> https://github.com/apache/cxf/tree/master/rt/rs/extensions/rx - only shows rx 
> java and rx java 2.  project reactor/reactor core seem like the v3's of this 
> api stack.
> https://projectreactor.io/



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7535) Support for Project Reactor as rx()

2017-11-06 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16241368#comment-16241368
 ] 

ASF GitHub Bot commented on CXF-7535:
-

reta commented on a change in pull request #331: [CXF-7535] Adding client & 
server support for Project Reactor
URL: https://github.com/apache/cxf/pull/331#discussion_r149259533
 
 

 ##
 File path: 
rt/rs/extensions/reactor/src/main/java/org/apache/cxf/jaxrs/reactor/client/FluxRxInvokerImpl.java
 ##
 @@ -0,0 +1,178 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.jaxrs.reactor.client;
+
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Future;
+import javax.ws.rs.HttpMethod;
+import javax.ws.rs.client.Entity;
+import javax.ws.rs.core.GenericType;
+import javax.ws.rs.core.Response;
+import org.apache.cxf.jaxrs.client.WebClient;
+import static 
org.apache.cxf.jaxrs.reactor.client.ReactorUtils.toCompletableFuture;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+import reactor.core.scheduler.Scheduler;
+import reactor.core.scheduler.Schedulers;
+
+public class FluxRxInvokerImpl implements FluxRxInvoker {
+private static final String TRACE = "TRACE";
+private final WebClient webClient;
+private final Scheduler scheduler;
+private final ExecutorService executorService;
+
+FluxRxInvokerImpl(WebClient webClient, ExecutorService executorService) {
+this.webClient = webClient;
+this.executorService = executorService;
+this.scheduler = executorService == null ? null : 
Schedulers.fromExecutorService(executorService);
+}
+
+@Override
+public Flux get() {
+return method(HttpMethod.GET);
+}
+
+@Override
+public  Flux get(Class responseType) {
+return method(HttpMethod.GET, responseType);
+}
+
+@Override
+public  Flux get(GenericType genericType) {
+return method(HttpMethod.GET, genericType);
+}
+
+@Override
+public Flux put(Entity entity) {
+return method(HttpMethod.PUT, entity);
+}
+
+@Override
+public  Flux put(Entity entity, Class responseType) {
+return method(HttpMethod.PUT, responseType);
+}
+
+@Override
+public  Flux put(Entity entity, GenericType genericType) {
+return method(HttpMethod.PUT, entity, genericType);
+}
+
+@Override
+public Flux post(Entity entity) {
+return method(HttpMethod.POST, entity);
+}
+
+@Override
+public  Flux post(Entity entity, Class responseType) {
+return method(HttpMethod.POST, entity, responseType);
+}
+
+@Override
+public  Flux post(Entity entity, GenericType genericType) {
+return method(HttpMethod.POST, entity, genericType);
+}
+
+@Override
+public Flux delete() {
+return method(HttpMethod.DELETE);
+}
+
+@Override
+public  Flux delete(Class responseType) {
+return method(HttpMethod.DELETE, responseType);
+}
+
+@Override
+public  Flux delete(GenericType genericType) {
+return method(HttpMethod.DELETE, genericType);
+}
+
+@Override
+public Flux head() {
+return method(HttpMethod.HEAD);
+}
+
+@Override
+public Flux options() {
+return method(HttpMethod.OPTIONS);
+}
+
+@Override
+public  Flux options(Class responseType) {
+return method(HttpMethod.OPTIONS, responseType);
+}
+
+@Override
+public  Flux options(GenericType genericType) {
+return method(HttpMethod.OPTIONS, genericType);
+}
+
+@Override
+public Flux trace() {
+return method(TRACE);
+}
+
+@Override
+public  Flux trace(Class responseType) {
+return method(TRACE, responseType);
+}
+
+@Override
+public  Flux trace(GenericType genericType) {
+return method(TRACE, genericType);
+}
+
+@Override
+public Flux method(String name) {
+return method(name, Response.class);
+}
+
+@Override
+public  Flux method(String name, Class responseType) {
+return flux(webClient.async().method(name

[jira] [Commented] (CXF-7535) Support for Project Reactor as rx()

2017-11-06 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16241370#comment-16241370
 ] 

ASF GitHub Bot commented on CXF-7535:
-

reta commented on a change in pull request #331: [CXF-7535] Adding client & 
server support for Project Reactor
URL: https://github.com/apache/cxf/pull/331#discussion_r149259891
 
 

 ##
 File path: 
rt/rs/extensions/reactor/src/main/java/org/apache/cxf/jaxrs/reactor/client/MonoRxInvoker.java
 ##
 @@ -0,0 +1,103 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.jaxrs.reactor.client;
+
+import javax.ws.rs.client.Entity;
+import javax.ws.rs.client.RxInvoker;
+import javax.ws.rs.core.GenericType;
+import javax.ws.rs.core.Response;
+import reactor.core.publisher.Mono;
+
+@SuppressWarnings("rawtypes")
+public interface MonoRxInvoker extends RxInvoker {
 
 Review comment:
   If you use `extends RxInvoker>`, you could get rid of 
`@SuppressWarnings("rawtypes")`


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Support for Project Reactor as rx()
> ---
>
> Key: CXF-7535
> URL: https://issues.apache.org/jira/browse/CXF-7535
> Project: CXF
>  Issue Type: New Feature
>  Components: JAX-RS
>Affects Versions: 3.2.0
>Reporter: John D. Ament
>
> It would be good if Project Reactor was supported as an rx() type in CXF.  
> https://github.com/apache/cxf/tree/master/rt/rs/extensions/rx - only shows rx 
> java and rx java 2.  project reactor/reactor core seem like the v3's of this 
> api stack.
> https://projectreactor.io/



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7535) Support for Project Reactor as rx()

2017-11-06 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16241382#comment-16241382
 ] 

ASF GitHub Bot commented on CXF-7535:
-

reta commented on a change in pull request #331: [CXF-7535] Adding client & 
server support for Project Reactor
URL: https://github.com/apache/cxf/pull/331#discussion_r149260129
 
 

 ##
 File path: 
rt/rs/extensions/reactor/src/main/java/org/apache/cxf/jaxrs/reactor/client/FluxRxInvoker.java
 ##
 @@ -0,0 +1,103 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.jaxrs.reactor.client;
+
+import javax.ws.rs.client.Entity;
+import javax.ws.rs.client.RxInvoker;
+import javax.ws.rs.core.GenericType;
+import javax.ws.rs.core.Response;
+import reactor.core.publisher.Flux;
+
+@SuppressWarnings("rawtypes")
+public interface FluxRxInvoker extends RxInvoker {
 
 Review comment:
   Same as for `MonoRxInvoker`, if you use `extends RxInvoker>` you 
could remove `@SuppressWarnings("rawtypes")`


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Support for Project Reactor as rx()
> ---
>
> Key: CXF-7535
> URL: https://issues.apache.org/jira/browse/CXF-7535
> Project: CXF
>  Issue Type: New Feature
>  Components: JAX-RS
>Affects Versions: 3.2.0
>Reporter: John D. Ament
>
> It would be good if Project Reactor was supported as an rx() type in CXF.  
> https://github.com/apache/cxf/tree/master/rt/rs/extensions/rx - only shows rx 
> java and rx java 2.  project reactor/reactor core seem like the v3's of this 
> api stack.
> https://projectreactor.io/



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7535) Support for Project Reactor as rx()

2017-11-06 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16241384#comment-16241384
 ] 

ASF GitHub Bot commented on CXF-7535:
-

reta commented on a change in pull request #331: [CXF-7535] Adding client & 
server support for Project Reactor
URL: https://github.com/apache/cxf/pull/331#discussion_r149260513
 
 

 ##
 File path: 
rt/rs/extensions/reactor/src/main/java/org/apache/cxf/jaxrs/reactor/client/ReactorUtils.java
 ##
 @@ -0,0 +1,46 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.jaxrs.reactor.client;
+
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Executor;
+import java.util.concurrent.Future;
+import java.util.function.Supplier;
+
+final class ReactorUtils {
+static final String TRACE = "TRACE";
+private ReactorUtils() {
+
+}
+static  CompletableFuture toCompletableFuture(Future future, 
Executor executor) {
+Supplier supplier = () -> {
+try {
+return future.get();
+} catch (InterruptedException | ExecutionException e) {
+throw new RuntimeException(e);
 
 Review comment:
   Using `CompletionException` would be more appropriate I think.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Support for Project Reactor as rx()
> ---
>
> Key: CXF-7535
> URL: https://issues.apache.org/jira/browse/CXF-7535
> Project: CXF
>  Issue Type: New Feature
>  Components: JAX-RS
>Affects Versions: 3.2.0
>Reporter: John D. Ament
>
> It would be good if Project Reactor was supported as an rx() type in CXF.  
> https://github.com/apache/cxf/tree/master/rt/rs/extensions/rx - only shows rx 
> java and rx java 2.  project reactor/reactor core seem like the v3's of this 
> api stack.
> https://projectreactor.io/



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7535) Support for Project Reactor as rx()

2017-11-06 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16241386#comment-16241386
 ] 

ASF GitHub Bot commented on CXF-7535:
-

reta commented on a change in pull request #331: [CXF-7535] Adding client & 
server support for Project Reactor
URL: https://github.com/apache/cxf/pull/331#discussion_r149260513
 
 

 ##
 File path: 
rt/rs/extensions/reactor/src/main/java/org/apache/cxf/jaxrs/reactor/client/ReactorUtils.java
 ##
 @@ -0,0 +1,46 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.jaxrs.reactor.client;
+
+import java.util.concurrent.CompletableFuture;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Executor;
+import java.util.concurrent.Future;
+import java.util.function.Supplier;
+
+final class ReactorUtils {
+static final String TRACE = "TRACE";
+private ReactorUtils() {
+
+}
+static  CompletableFuture toCompletableFuture(Future future, 
Executor executor) {
+Supplier supplier = () -> {
+try {
+return future.get();
+} catch (InterruptedException | ExecutionException e) {
+throw new RuntimeException(e);
 
 Review comment:
   Using `CompletionException` would be more appropriate I think. Otherwise we 
would end up with longer `ex-> RuntimeException(ex) -> CompletionException` 
chain of causes.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Support for Project Reactor as rx()
> ---
>
> Key: CXF-7535
> URL: https://issues.apache.org/jira/browse/CXF-7535
> Project: CXF
>  Issue Type: New Feature
>  Components: JAX-RS
>Affects Versions: 3.2.0
>Reporter: John D. Ament
>
> It would be good if Project Reactor was supported as an rx() type in CXF.  
> https://github.com/apache/cxf/tree/master/rt/rs/extensions/rx - only shows rx 
> java and rx java 2.  project reactor/reactor core seem like the v3's of this 
> api stack.
> https://projectreactor.io/



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7535) Support for Project Reactor as rx()

2017-11-06 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16241390#comment-16241390
 ] 

ASF GitHub Bot commented on CXF-7535:
-

johnament commented on a change in pull request #331: [CXF-7535] Adding client 
& server support for Project Reactor
URL: https://github.com/apache/cxf/pull/331#discussion_r149260816
 
 

 ##
 File path: rt/rs/extensions/reactor/pom.xml
 ##
 @@ -0,0 +1,127 @@
+
+
+http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
+4.0.0
+cxf-rt-rs-extension-reactor
+bundle
+Apache CXF JAX-RS Extensions: Project Reactor
+Apache CXF JAX-RS Extensions: Project Reactor
+http://cxf.apache.org
+
+org.apache.cxf
+cxf-parent
+3.2.1-SNAPSHOT
 
 Review comment:
   Yep, just saw it.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Support for Project Reactor as rx()
> ---
>
> Key: CXF-7535
> URL: https://issues.apache.org/jira/browse/CXF-7535
> Project: CXF
>  Issue Type: New Feature
>  Components: JAX-RS
>Affects Versions: 3.2.0
>Reporter: John D. Ament
>
> It would be good if Project Reactor was supported as an rx() type in CXF.  
> https://github.com/apache/cxf/tree/master/rt/rs/extensions/rx - only shows rx 
> java and rx java 2.  project reactor/reactor core seem like the v3's of this 
> api stack.
> https://projectreactor.io/



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7535) Support for Project Reactor as rx()

2017-11-06 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16241395#comment-16241395
 ] 

ASF GitHub Bot commented on CXF-7535:
-

johnament commented on a change in pull request #331: [CXF-7535] Adding client 
& server support for Project Reactor
URL: https://github.com/apache/cxf/pull/331#discussion_r149261048
 
 

 ##
 File path: 
rt/rs/extensions/reactor/src/main/java/org/apache/cxf/jaxrs/reactor/client/MonoRxInvoker.java
 ##
 @@ -0,0 +1,103 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.jaxrs.reactor.client;
+
+import javax.ws.rs.client.Entity;
+import javax.ws.rs.client.RxInvoker;
+import javax.ws.rs.core.GenericType;
+import javax.ws.rs.core.Response;
+import reactor.core.publisher.Mono;
+
+@SuppressWarnings("rawtypes")
+public interface MonoRxInvoker extends RxInvoker {
 
 Review comment:
   Yes, but then the overrides don't line up properly.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Support for Project Reactor as rx()
> ---
>
> Key: CXF-7535
> URL: https://issues.apache.org/jira/browse/CXF-7535
> Project: CXF
>  Issue Type: New Feature
>  Components: JAX-RS
>Affects Versions: 3.2.0
>Reporter: John D. Ament
>
> It would be good if Project Reactor was supported as an rx() type in CXF.  
> https://github.com/apache/cxf/tree/master/rt/rs/extensions/rx - only shows rx 
> java and rx java 2.  project reactor/reactor core seem like the v3's of this 
> api stack.
> https://projectreactor.io/



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7535) Support for Project Reactor as rx()

2017-11-06 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16241393#comment-16241393
 ] 

ASF GitHub Bot commented on CXF-7535:
-

johnament commented on a change in pull request #331: [CXF-7535] Adding client 
& server support for Project Reactor
URL: https://github.com/apache/cxf/pull/331#discussion_r149260988
 
 

 ##
 File path: 
rt/rs/extensions/reactor/src/main/java/org/apache/cxf/jaxrs/reactor/client/FluxRxInvokerImpl.java
 ##
 @@ -0,0 +1,178 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.jaxrs.reactor.client;
+
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Future;
+import javax.ws.rs.HttpMethod;
+import javax.ws.rs.client.Entity;
+import javax.ws.rs.core.GenericType;
+import javax.ws.rs.core.Response;
+import org.apache.cxf.jaxrs.client.WebClient;
+import static 
org.apache.cxf.jaxrs.reactor.client.ReactorUtils.toCompletableFuture;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+import reactor.core.scheduler.Scheduler;
+import reactor.core.scheduler.Schedulers;
+
+public class FluxRxInvokerImpl implements FluxRxInvoker {
+private static final String TRACE = "TRACE";
+private final WebClient webClient;
+private final Scheduler scheduler;
+private final ExecutorService executorService;
+
+FluxRxInvokerImpl(WebClient webClient, ExecutorService executorService) {
+this.webClient = webClient;
+this.executorService = executorService;
+this.scheduler = executorService == null ? null : 
Schedulers.fromExecutorService(executorService);
+}
+
+@Override
+public Flux get() {
+return method(HttpMethod.GET);
+}
+
+@Override
+public  Flux get(Class responseType) {
+return method(HttpMethod.GET, responseType);
+}
+
+@Override
+public  Flux get(GenericType genericType) {
+return method(HttpMethod.GET, genericType);
+}
+
+@Override
+public Flux put(Entity entity) {
+return method(HttpMethod.PUT, entity);
+}
+
+@Override
+public  Flux put(Entity entity, Class responseType) {
+return method(HttpMethod.PUT, responseType);
+}
+
+@Override
+public  Flux put(Entity entity, GenericType genericType) {
+return method(HttpMethod.PUT, entity, genericType);
+}
+
+@Override
+public Flux post(Entity entity) {
+return method(HttpMethod.POST, entity);
+}
+
+@Override
+public  Flux post(Entity entity, Class responseType) {
+return method(HttpMethod.POST, entity, responseType);
+}
+
+@Override
+public  Flux post(Entity entity, GenericType genericType) {
+return method(HttpMethod.POST, entity, genericType);
+}
+
+@Override
+public Flux delete() {
+return method(HttpMethod.DELETE);
+}
+
+@Override
+public  Flux delete(Class responseType) {
+return method(HttpMethod.DELETE, responseType);
+}
+
+@Override
+public  Flux delete(GenericType genericType) {
+return method(HttpMethod.DELETE, genericType);
+}
+
+@Override
+public Flux head() {
+return method(HttpMethod.HEAD);
+}
+
+@Override
+public Flux options() {
+return method(HttpMethod.OPTIONS);
+}
+
+@Override
+public  Flux options(Class responseType) {
+return method(HttpMethod.OPTIONS, responseType);
+}
+
+@Override
+public  Flux options(GenericType genericType) {
+return method(HttpMethod.OPTIONS, genericType);
+}
+
+@Override
+public Flux trace() {
+return method(TRACE);
+}
+
+@Override
+public  Flux trace(Class responseType) {
+return method(TRACE, responseType);
+}
+
+@Override
+public  Flux trace(GenericType genericType) {
+return method(TRACE, genericType);
+}
+
+@Override
+public Flux method(String name) {
+return method(name, Response.class);
+}
+
+@Override
+public  Flux method(String name, Class responseType) {
+return flux(webClient.async().method

[jira] [Commented] (CXF-7535) Support for Project Reactor as rx()

2017-11-06 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16241409#comment-16241409
 ] 

ASF GitHub Bot commented on CXF-7535:
-

johnament commented on a change in pull request #331: [CXF-7535] Adding client 
& server support for Project Reactor
URL: https://github.com/apache/cxf/pull/331#discussion_r149262685
 
 

 ##
 File path: 
rt/rs/extensions/reactor/src/main/java/org/apache/cxf/jaxrs/reactor/client/MonoRxInvoker.java
 ##
 @@ -0,0 +1,103 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.jaxrs.reactor.client;
+
+import javax.ws.rs.client.Entity;
+import javax.ws.rs.client.RxInvoker;
+import javax.ws.rs.core.GenericType;
+import javax.ws.rs.core.Response;
+import reactor.core.publisher.Mono;
+
+@SuppressWarnings("rawtypes")
+public interface MonoRxInvoker extends RxInvoker {
 
 Review comment:
   Nevermind, whatever was happening isn't any longer.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Support for Project Reactor as rx()
> ---
>
> Key: CXF-7535
> URL: https://issues.apache.org/jira/browse/CXF-7535
> Project: CXF
>  Issue Type: New Feature
>  Components: JAX-RS
>Affects Versions: 3.2.0
>Reporter: John D. Ament
>
> It would be good if Project Reactor was supported as an rx() type in CXF.  
> https://github.com/apache/cxf/tree/master/rt/rs/extensions/rx - only shows rx 
> java and rx java 2.  project reactor/reactor core seem like the v3's of this 
> api stack.
> https://projectreactor.io/



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7549) Can't register Feature from inside another Feature in JAX-RS

2017-11-07 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7549?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16241933#comment-16241933
 ] 

ASF GitHub Bot commented on CXF-7549:
-

csierra opened a new pull request #334: [CXF-7549] test for bug of feature 
inside a feature
URL: https://github.com/apache/cxf/pull/334
 
 
   Tests to highlight the bug described in 
https://issues.apache.org/jira/browse/CXF-7549
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Can't register Feature from inside another Feature in JAX-RS
> 
>
> Key: CXF-7549
> URL: https://issues.apache.org/jira/browse/CXF-7549
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.2.0, 3.2.1
>Reporter: Carlos Sierra
>
> Registering a Feature from within a Feature lead to ServiceConstruction 
> exception.
> It is explicitly stated in the spec that it must be possible to register a 
> feature inside another feature. In CXF this leads to a ServiceContruction 
> exception caused by a NullPointerException.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7535) Support for Project Reactor as rx()

2017-11-07 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16242002#comment-16242002
 ] 

ASF GitHub Bot commented on CXF-7535:
-

reta commented on issue #331: [CXF-7535] Adding client & server support for 
Project Reactor
URL: https://github.com/apache/cxf/pull/331#issuecomment-342484274
 
 
   @johnament It looks pretty good in general, thanks for addressing the 
comments. Are there any outstanding issues you are struggling with / need help?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Support for Project Reactor as rx()
> ---
>
> Key: CXF-7535
> URL: https://issues.apache.org/jira/browse/CXF-7535
> Project: CXF
>  Issue Type: New Feature
>  Components: JAX-RS
>Affects Versions: 3.2.0
>Reporter: John D. Ament
>
> It would be good if Project Reactor was supported as an rx() type in CXF.  
> https://github.com/apache/cxf/tree/master/rt/rs/extensions/rx - only shows rx 
> java and rx java 2.  project reactor/reactor core seem like the v3's of this 
> api stack.
> https://projectreactor.io/



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7535) Support for Project Reactor as rx()

2017-11-07 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16243104#comment-16243104
 ] 

ASF GitHub Bot commented on CXF-7535:
-

johnament commented on issue #331: [CXF-7535] Adding client & server support 
for Project Reactor
URL: https://github.com/apache/cxf/pull/331#issuecomment-342663821
 
 
   @reta there's open questions I have:
   
   - Leave the tests here or move into systests?  Personally I don't like not 
having tests with the main code, and it's a trivial impact (14s build + test 
time).
   - Creating examples?  Maybe later.
   - Should I add CDI integration? E.g. an implementation of 
`JAXRSServerFactoryCustomizationExtension` that adds the `ReactorInvoker` to 
the runtime.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Support for Project Reactor as rx()
> ---
>
> Key: CXF-7535
> URL: https://issues.apache.org/jira/browse/CXF-7535
> Project: CXF
>  Issue Type: New Feature
>  Components: JAX-RS
>Affects Versions: 3.2.0
>Reporter: John D. Ament
>
> It would be good if Project Reactor was supported as an rx() type in CXF.  
> https://github.com/apache/cxf/tree/master/rt/rs/extensions/rx - only shows rx 
> java and rx java 2.  project reactor/reactor core seem like the v3's of this 
> api stack.
> https://projectreactor.io/



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7535) Support for Project Reactor as rx()

2017-11-07 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16243311#comment-16243311
 ] 

ASF GitHub Bot commented on CXF-7535:
-

reta commented on issue #331: [CXF-7535] Adding client & server support for 
Project Reactor
URL: https://github.com/apache/cxf/pull/331#issuecomment-342694875
 
 
   @johnament my few cents on the questions you have:
   - I would suggest to move it to `systests`, not necessarily due to execution 
time but because of the fact we spawn servers (external components). This is 
not the official rule I think but it serves as the litmus test where tests 
belong.
   - Yes, this would be very good to have, at least 1 example in the `samples` 
distribution, but I can help with that (as well as adding the documentation to 
the CXF Wiki)
   - CDI would be good to have but it could be done later I think (unless you 
really need it from day 1).
   
   @sberyozkin What do you think?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Support for Project Reactor as rx()
> ---
>
> Key: CXF-7535
> URL: https://issues.apache.org/jira/browse/CXF-7535
> Project: CXF
>  Issue Type: New Feature
>  Components: JAX-RS
>Affects Versions: 3.2.0
>Reporter: John D. Ament
>
> It would be good if Project Reactor was supported as an rx() type in CXF.  
> https://github.com/apache/cxf/tree/master/rt/rs/extensions/rx - only shows rx 
> java and rx java 2.  project reactor/reactor core seem like the v3's of this 
> api stack.
> https://projectreactor.io/



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Commented] (CXF-7535) Support for Project Reactor as rx()

2017-11-07 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/CXF-7535?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16243425#comment-16243425
 ] 

ASF GitHub Bot commented on CXF-7535:
-

cschneider commented on issue #331: [CXF-7535] Adding client & server support 
for Project Reactor
URL: https://github.com/apache/cxf/pull/331#issuecomment-342719451
 
 
   I would keep tests with the module unless they are slow or very involved. We 
spawn CXF endpoints in a lot of other modules tests. 
   The full cxf build takes quite a while. So it is very useful to be able to 
build a single module and get some good feedback if it is correct.
   One other thing about the tests. There are a lot of sleeps in the tests. 
This is not good. I propose to replace this with Awaitility based retries. 
   For example:
assertEquals("Hello, world!", holder.value);
   could be:
   Awaitility.await().until(()->holder.value, equalTo("Hello world!"));
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Support for Project Reactor as rx()
> ---
>
> Key: CXF-7535
> URL: https://issues.apache.org/jira/browse/CXF-7535
> Project: CXF
>  Issue Type: New Feature
>  Components: JAX-RS
>Affects Versions: 3.2.0
>Reporter: John D. Ament
>
> It would be good if Project Reactor was supported as an rx() type in CXF.  
> https://github.com/apache/cxf/tree/master/rt/rs/extensions/rx - only shows rx 
> java and rx java 2.  project reactor/reactor core seem like the v3's of this 
> api stack.
> https://projectreactor.io/



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


<    5   6   7   8   9   10   11   12   13   14   >