[jira] [Commented] (CXF-7000) Allow logging to be enabled on-the-fly

2016-08-15 Thread Sergey Beryozkin (JIRA)

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

Sergey Beryozkin commented on CXF-7000:
---

Hi, 
what do you think of using a property instead ?
This way one would have not only a bus to switch it on/off but with the current 
client or, on, on the server side, with the current message context. 

Thanks

> Allow logging to be enabled on-the-fly
> --
>
> Key: CXF-7000
> URL: https://issues.apache.org/jira/browse/CXF-7000
> Project: CXF
>  Issue Type: Improvement
>  Components: Core, logging
>Affects Versions: 3.1.7
>Reporter: Ingo Weiss
>
> Allow the logging feature to be enabled on-the-fly without restarting the bus.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CXF-7000) Allow logging to be enabled on-the-fly

2016-08-15 Thread Sergey Beryozkin (JIRA)

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

Sergey Beryozkin commented on CXF-7000:
---

Can you also explain please why the existing logging interceptors can not be 
modified to check the contextual property ?


> Allow logging to be enabled on-the-fly
> --
>
> Key: CXF-7000
> URL: https://issues.apache.org/jira/browse/CXF-7000
> Project: CXF
>  Issue Type: Improvement
>  Components: Core, logging
>Affects Versions: 3.1.7
>Reporter: Ingo Weiss
>
> Allow the logging feature to be enabled on-the-fly without restarting the bus.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CXF-7000) Allow logging to be enabled on-the-fly

2016-08-15 Thread Ingo Weiss (JIRA)

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

Ingo Weiss commented on CXF-7000:
-

If I understand you correctly, there is a property already, 
{{org.apache.cxf.logging.enabled}}, that is read during the 
{{ExtensionManagerBus}} instantiation.

What I am proposing is a way to attach a {{LoggingFeature}} without restarting 
the bus and thus replicating the behaviour of 
{{org.apache.cxf.logging.enabled=true}} when needed.

I did a bit of over-engineering by introducing {{LiveLoggingInInterceptor}} and 
{{LiveLoggingOutInterceptor}} so to allow others to extend 
{{LoggingInInterceptor}} and {{LoggingOutInterceptor}} and still have this 
feature available.

Makes sense?

> Allow logging to be enabled on-the-fly
> --
>
> Key: CXF-7000
> URL: https://issues.apache.org/jira/browse/CXF-7000
> Project: CXF
>  Issue Type: Improvement
>  Components: Core, logging
>Affects Versions: 3.1.7
>Reporter: Ingo Weiss
>
> Allow the logging feature to be enabled on-the-fly without restarting the bus.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CXF-7000) Allow logging to be enabled on-the-fly

2016-08-15 Thread Sergey Beryozkin (JIRA)

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

Sergey Beryozkin commented on CXF-7000:
---

Yes, the idea makes sense. And I see it can work. 

But what about simply having the existing logging interceptors updated to check 
the existing property:
{code:java}

// adds LoggingFeature if it is not already added
// and makes sure the contextual property is also set
bus.setEnableLogging(true); 
// Logging in/out interceptors check this contextual property in their 
handleMessage()

bus.setEnableLogging(false);
// only removes the property
{code}

This way we have a consistent treatment of org.apache.cxf.logging.enabled 
property without introducing a new wrapper feature which only enables/disables 
other feature.
Thoughts ?


> Allow logging to be enabled on-the-fly
> --
>
> Key: CXF-7000
> URL: https://issues.apache.org/jira/browse/CXF-7000
> Project: CXF
>  Issue Type: Improvement
>  Components: Core, logging
>Affects Versions: 3.1.7
>Reporter: Ingo Weiss
>
> Allow the logging feature to be enabled on-the-fly without restarting the bus.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CXF-7000) Allow logging to be enabled on-the-fly

2016-08-15 Thread Ingo Weiss (JIRA)

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

Ingo Weiss commented on CXF-7000:
-

Wouldn't that create a {{Interceptor->Bus}} relationship? I thought the 
relationship in one direction, {{Bus->Interceptor}}, was more than enough.

Also, adding this to {{handleMessage()}} would for the boolean to be checked 
for every message handled. I believe my proposal would make it part of the 
Interceptor chain and, in turn, less intrusive. I might be wrong on that though.

> Allow logging to be enabled on-the-fly
> --
>
> Key: CXF-7000
> URL: https://issues.apache.org/jira/browse/CXF-7000
> Project: CXF
>  Issue Type: Improvement
>  Components: Core, logging
>Affects Versions: 3.1.7
>Reporter: Ingo Weiss
>
> Allow the logging feature to be enabled on-the-fly without restarting the bus.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CXF-7000) Allow logging to be enabled on-the-fly

2016-08-15 Thread Sergey Beryozkin (JIRA)

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

Sergey Beryozkin commented on CXF-7000:
---

Hi, no, in the interceptors one would do
{code:java}
// AbstractLoggingInterceptor
protected static boolean isLoggingDisabled(Message message) throws Fault {
Object liveLoggingProp = 
message.getContextualProperty("org.apache.cxf.logging.enable");
return liveLoggingProp != null && 
PropertyUtils.isFalse(liveLoggingProp);
}
// LoggingIn/Out interceptors
public void handleMessage(Message message) throws Fault {
// skip logging only if "org.apache.cxf.logging.enable" is explicitly 
set to false
if (isLoggingDisabled(message)) {
return; 
}
// continue
}
{code} 

This will work irrespectively of how these interceptors have been added, via a 
system "org.apache.cxf.logging.enable"=true or manually on the client'/server 
factory bean or via bus.

What I mentioned earlier though than now it may be possible, on the client 
side, do per-client as opposed to per-bus logging. Or per-response on the 
server.

It does add a minor initial overhead but the contextual properties are cached.

I do like your idea of the dynamic, on the fly logging. I'm only trying to see 
if adding a feature does not add anything of its own can be avoided. thanks


> Allow logging to be enabled on-the-fly
> --
>
> Key: CXF-7000
> URL: https://issues.apache.org/jira/browse/CXF-7000
> Project: CXF
>  Issue Type: Improvement
>  Components: Core, logging
>Affects Versions: 3.1.7
>Reporter: Ingo Weiss
>
> Allow the logging feature to be enabled on-the-fly without restarting the bus.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CXF-7000) Allow logging to be enabled on-the-fly

2016-08-15 Thread Ingo Weiss (JIRA)

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

Ingo Weiss commented on CXF-7000:
-

I see what you mean. I don't think I can speculate on the full impact of 
changing the already existing {{LoggingInterceptor}}s but it looks more 
interesting if not a bit intrusive.

Regarding enabling per-client logging, I can't comment on it but, IMHO, I 
believe it is a trade-off that can have security implications and be exploited 
the wrong way, if I'm understanding your point correctly.

> Allow logging to be enabled on-the-fly
> --
>
> Key: CXF-7000
> URL: https://issues.apache.org/jira/browse/CXF-7000
> Project: CXF
>  Issue Type: Improvement
>  Components: Core, logging
>Affects Versions: 3.1.7
>Reporter: Ingo Weiss
>
> Allow the logging feature to be enabled on-the-fly without restarting the bus.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (CXF-7000) Allow logging to be enabled on-the-fly

2016-08-15 Thread Ingo Weiss (JIRA)

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

Ingo Weiss edited comment on CXF-7000 at 8/15/16 1:33 PM:
--

I see what you mean. I don't think I can speculate on the full impact of 
changing the already existing {{LoggingInterceptor}} but it looks more 
interesting if not a bit intrusive.

Regarding enabling per-client logging, I can't comment on it but, IMHO, I 
believe it is a trade-off that can have security implications and be exploited 
the wrong way, if I'm understanding your point correctly.


was (Author: iweiss):
I see what you mean. I don't think I can speculate on the full impact of 
changing the already existing {{LoggingInterceptor}}s but it looks more 
interesting if not a bit intrusive.

Regarding enabling per-client logging, I can't comment on it but, IMHO, I 
believe it is a trade-off that can have security implications and be exploited 
the wrong way, if I'm understanding your point correctly.

> Allow logging to be enabled on-the-fly
> --
>
> Key: CXF-7000
> URL: https://issues.apache.org/jira/browse/CXF-7000
> Project: CXF
>  Issue Type: Improvement
>  Components: Core, logging
>Affects Versions: 3.1.7
>Reporter: Ingo Weiss
>
> Allow the logging feature to be enabled on-the-fly without restarting the bus.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CXF-7000) Allow logging to be enabled on-the-fly

2016-08-15 Thread Sergey Beryozkin (JIRA)

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

Sergey Beryozkin commented on CXF-7000:
---

FYI most of CXF code depends a lot on checking the contextual properties when 
deciding whether to enable or disable some actions at runtime. I'm also not 
sure what you mean about the security trade-offs - I doubt it will help us 
finding an optimal solution.

The problem I see with your proposal is that if I add LoggingFeature manually 
then then calling bus.setLiveLogging  will add more interceptors with the 
diffwhich I don't need. Having both LoggingFeature & LiveLoggingFeature seems 
problematic to me.

> Allow logging to be enabled on-the-fly
> --
>
> Key: CXF-7000
> URL: https://issues.apache.org/jira/browse/CXF-7000
> Project: CXF
>  Issue Type: Improvement
>  Components: Core, logging
>Affects Versions: 3.1.7
>Reporter: Ingo Weiss
>
> Allow the logging feature to be enabled on-the-fly without restarting the bus.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (CXF-7000) Allow logging to be enabled on-the-fly

2016-08-15 Thread Sergey Beryozkin (JIRA)

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

Sergey Beryozkin edited comment on CXF-7000 at 8/15/16 1:57 PM:


FYI most of CXF code depends a lot on checking the contextual properties when 
deciding whether to enable or disable some actions at runtime. I'm also not 
sure what you mean about the security trade-offs - I doubt it will help us 
finding an optimal solution.

The problem I see with your proposal is that if I add LoggingFeature manually 
then calling bus.setLiveLogging  will add more interceptors with which I don't 
need. Having both LoggingFeature & LiveLoggingFeature seems problematic to me.


was (Author: sergey_beryozkin):
FYI most of CXF code depends a lot on checking the contextual properties when 
deciding whether to enable or disable some actions at runtime. I'm also not 
sure what you mean about the security trade-offs - I doubt it will help us 
finding an optimal solution.

The problem I see with your proposal is that if I add LoggingFeature manually 
then then calling bus.setLiveLogging  will add more interceptors with the 
diffwhich I don't need. Having both LoggingFeature & LiveLoggingFeature seems 
problematic to me.

> Allow logging to be enabled on-the-fly
> --
>
> Key: CXF-7000
> URL: https://issues.apache.org/jira/browse/CXF-7000
> Project: CXF
>  Issue Type: Improvement
>  Components: Core, logging
>Affects Versions: 3.1.7
>Reporter: Ingo Weiss
>
> Allow the logging feature to be enabled on-the-fly without restarting the bus.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CXF-7010) Swagger2Feature can not auto-link to SwaggerUi in OSGI

2016-08-15 Thread Sergey Beryozkin (JIRA)

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

Sergey Beryozkin commented on CXF-7010:
---

Hey Łukasz

Can you give me a favour and check this code:

https://github.com/apache/cxf/blob/3.1.x-fixes/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/OsgiSwaggerUiResolver.java

Thanks, Sergey

> Swagger2Feature can not auto-link to SwaggerUi in OSGI
> --
>
> Key: CXF-7010
> URL: https://issues.apache.org/jira/browse/CXF-7010
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.7
>Reporter: Sergey Beryozkin
> Fix For: 3.2.0, 3.1.8
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CXF-7011) same method signature needs to be added in Continuation

2016-08-15 Thread Sergey Beryozkin (JIRA)

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

Sergey Beryozkin commented on CXF-7011:
---

Hi, 
I wonder, does the fact that two of 3 CXF Continuation implementations have to 
have a no-op isExpired implementations added implies that may be the solution 
to a Camel issue might need to be coded around Continuation.isPending() ? It is 
set false on compete/timeout


 

> same method signature needs to be added in Continuation
> ---
>
> Key: CXF-7011
> URL: https://issues.apache.org/jira/browse/CXF-7011
> Project: CXF
>  Issue Type: Sub-task
>  Components: Transports
>Affects Versions: 3.1.7
>Reporter: onder sezgin
> Fix For: 3.2.0
>
>
> As this method requires access over Continuation interface this should be 
> provided and other implementations like transport-jms and transport-http with 
>  default implementation and transport-http-jetty with real implemenration 
> should be provided.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CXF-7000) Allow logging to be enabled on-the-fly

2016-08-15 Thread Sergey Beryozkin (JIRA)

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

Sergey Beryozkin commented on CXF-7000:
---

That said, one can do bus.setLiveLogging and then add manually the logging 
interceptors so having the interceptors being aware of the property is not a 
duplication protector. But it does appear more likely than not that having both 
'plain' and LiveLoggingFeature is much more likely to lead to the duplication 
and perhaps some confusion. For example, people do set Logging features from 
annotations, and Spring.   
As I said I'm not against the idea but marginally prefer the properties 
approach, it also offers more options.
Dan, Christian, comment please if you have some ideas

 



> Allow logging to be enabled on-the-fly
> --
>
> Key: CXF-7000
> URL: https://issues.apache.org/jira/browse/CXF-7000
> Project: CXF
>  Issue Type: Improvement
>  Components: Core, logging
>Affects Versions: 3.1.7
>Reporter: Ingo Weiss
>
> Allow the logging feature to be enabled on-the-fly without restarting the bus.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CXF-7000) Allow logging to be enabled on-the-fly

2016-08-15 Thread Ingo Weiss (JIRA)

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

Ingo Weiss commented on CXF-7000:
-

My security concern is thinking that if logging becomes client controlled a 
malicious user can try to abuse this mechanism.

I see what you mean by duplicated interceptors. My line of thought is having 
LiveLogging for debug purposes only and have that being enabled for a short 
period of time. I believe a LoggingInterceptor, extended or not, can be used 
for all kinds of purposes, live debugging not so much.

[~asoldano], any thoughts?

> Allow logging to be enabled on-the-fly
> --
>
> Key: CXF-7000
> URL: https://issues.apache.org/jira/browse/CXF-7000
> Project: CXF
>  Issue Type: Improvement
>  Components: Core, logging
>Affects Versions: 3.1.7
>Reporter: Ingo Weiss
>
> Allow the logging feature to be enabled on-the-fly without restarting the bus.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CXF-7000) Allow logging to be enabled on-the-fly

2016-08-15 Thread Sergey Beryozkin (JIRA)

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

Sergey Beryozkin commented on CXF-7000:
---

If we follow your line of thinking then we need to block the clients from 
setting the contextual properties completely because a malicious user can come 
in and mess things up. IMHO it does not help at all.

So yes the question is how to enable the transient logging. If people have 
Logging interceptors added from Spring/annotations then your solution does not 
work because even if you disable a 'live' logging on the bus the regular 
logging interceptors will continue logging as if nothing happened

> Allow logging to be enabled on-the-fly
> --
>
> Key: CXF-7000
> URL: https://issues.apache.org/jira/browse/CXF-7000
> Project: CXF
>  Issue Type: Improvement
>  Components: Core, logging
>Affects Versions: 3.1.7
>Reporter: Ingo Weiss
>
> Allow the logging feature to be enabled on-the-fly without restarting the bus.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CXF-7000) Allow logging to be enabled on-the-fly

2016-08-15 Thread Sergey Beryozkin (JIRA)

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

Sergey Beryozkin commented on CXF-7000:
---

Oh, it occurred to me why you might be referring to the "client" security. I 
did not mean per-user specific logging. I was referring to CXF client proxies 
(or web clients) switching the logging on/off as an extra option to using a bus 
to do it.

> Allow logging to be enabled on-the-fly
> --
>
> Key: CXF-7000
> URL: https://issues.apache.org/jira/browse/CXF-7000
> Project: CXF
>  Issue Type: Improvement
>  Components: Core, logging
>Affects Versions: 3.1.7
>Reporter: Ingo Weiss
>
> Allow the logging feature to be enabled on-the-fly without restarting the bus.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CXF-7000) Allow logging to be enabled on-the-fly

2016-08-15 Thread Ingo Weiss (JIRA)

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

Ingo Weiss commented on CXF-7000:
-

Ah! Now I get it better :-)

> Allow logging to be enabled on-the-fly
> --
>
> Key: CXF-7000
> URL: https://issues.apache.org/jira/browse/CXF-7000
> Project: CXF
>  Issue Type: Improvement
>  Components: Core, logging
>Affects Versions: 3.1.7
>Reporter: Ingo Weiss
>
> Allow the logging feature to be enabled on-the-fly without restarting the bus.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CXF-7000) Allow logging to be enabled on-the-fly

2016-08-15 Thread Ingo Weiss (JIRA)

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

Ingo Weiss commented on CXF-7000:
-

{quote}
So yes the question is how to enable the transient logging. If people have 
Logging interceptors added from Spring/annotations then your solution does not 
work because even if you disable a 'live' logging on the bus the regular 
logging interceptors will continue logging as if nothing happened
{quote}

That is exactly the point. A way to introduce message logging on the fly 
without disrupting other logging interceptors.

> Allow logging to be enabled on-the-fly
> --
>
> Key: CXF-7000
> URL: https://issues.apache.org/jira/browse/CXF-7000
> Project: CXF
>  Issue Type: Improvement
>  Components: Core, logging
>Affects Versions: 3.1.7
>Reporter: Ingo Weiss
>
> Allow the logging feature to be enabled on-the-fly without restarting the bus.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CXF-7010) Swagger2Feature can not auto-link to SwaggerUi in OSGI

2016-08-15 Thread JIRA

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

Łukasz Dywicki commented on CXF-7010:
-

Hey Sergey,
It is working fine when version is set, and no problems are reported. I am just 
a bit concerned about passing String as URI to SwaggerUIService. Classloader 
would be safer and can be achieved without wrapping logic by this sequence:
{code:lang=java}
bundle.adapt(BundleWiring.class).getClassLoader
{code}

Not sure if its a bug but service listing (http://localhost:8181/cxf) still 
doesn't show up link to swagger ui.

> Swagger2Feature can not auto-link to SwaggerUi in OSGI
> --
>
> Key: CXF-7010
> URL: https://issues.apache.org/jira/browse/CXF-7010
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.7
>Reporter: Sergey Beryozkin
> Fix For: 3.2.0, 3.1.8
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (CXF-7010) Swagger2Feature can not auto-link to SwaggerUi in OSGI

2016-08-15 Thread JIRA

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

Łukasz Dywicki edited comment on CXF-7010 at 8/15/16 7:40 PM:
--

Hey Sergey,
It is working fine when ui version is set, and no problems are reported. I am 
just a bit concerned about passing String as URI to SwaggerUIService. 
Classloader would be safer and can be achieved without wrapping logic by this 
sequence:
{code:lang=java}
bundle.adapt(BundleWiring.class).getClassLoader
{code}

Not sure if its a bug but service listing (http://localhost:8181/cxf) still 
doesn't show up link to swagger ui.


was (Author: splatch):
Hey Sergey,
It is working fine when version is set, and no problems are reported. I am just 
a bit concerned about passing String as URI to SwaggerUIService. Classloader 
would be safer and can be achieved without wrapping logic by this sequence:
{code:lang=java}
bundle.adapt(BundleWiring.class).getClassLoader
{code}

Not sure if its a bug but service listing (http://localhost:8181/cxf) still 
doesn't show up link to swagger ui.

> Swagger2Feature can not auto-link to SwaggerUi in OSGI
> --
>
> Key: CXF-7010
> URL: https://issues.apache.org/jira/browse/CXF-7010
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.7
>Reporter: Sergey Beryozkin
> Fix For: 3.2.0, 3.1.8
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CXF-7000) Allow logging to be enabled on-the-fly

2016-08-15 Thread Sergey Beryozkin (JIRA)

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

Sergey Beryozkin commented on CXF-7000:
---

OK, nice we are clear on one point, sorry I was not clear earlier.

But I do see now clearly you differentiate between what 
LoggingIn/OutInterceptor do and what your more 'live' logging interceptors will 
do. People add LoggingIn/OutInterceptor interceptors to do exact;y this, the 
live logging for the purpose of debugging.  

I'm sorry, introducing some extra logging interceptors which will work without 
worrying what the otherwise installed LoggingIn/OutInterceptor do is not good. 
IMHO it is not the way to go. 

> Allow logging to be enabled on-the-fly
> --
>
> Key: CXF-7000
> URL: https://issues.apache.org/jira/browse/CXF-7000
> Project: CXF
>  Issue Type: Improvement
>  Components: Core, logging
>Affects Versions: 3.1.7
>Reporter: Ingo Weiss
>
> Allow the logging feature to be enabled on-the-fly without restarting the bus.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CXF-7010) Swagger2Feature can not auto-link to SwaggerUi in OSGI

2016-08-15 Thread Sergey Beryozkin (JIRA)

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

Sergey Beryozkin commented on CXF-7010:
---

Hi Lukazh, thanks for a quick test, nice start.

I thought after I left the 1st comment that may be String would not be enough 
but then realized that obviously OSGI has a 'bundle:' URL handler. I guess 
under the hood it all gets back to this Classloader. And in case of 
URLClassLoader we have a URL.
But we can tweak this SwaggerUiResolver code as often as we need :-), ping me 
please whenever you see an issue. 
Let me look at the service page issue now...


> Swagger2Feature can not auto-link to SwaggerUi in OSGI
> --
>
> Key: CXF-7010
> URL: https://issues.apache.org/jira/browse/CXF-7010
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.7
>Reporter: Sergey Beryozkin
> Fix For: 3.2.0, 3.1.8
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (CXF-7010) Swagger2Feature can not auto-link to SwaggerUi in OSGI

2016-08-15 Thread Sergey Beryozkin (JIRA)

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

Sergey Beryozkin edited comment on CXF-7010 at 8/15/16 8:27 PM:


Hi Łukasz, thanks for a quick test, nice start.

I thought after I left the 1st comment that may be String would not be enough 
but then realized that obviously OSGI has a 'bundle:' URL handler. I guess 
under the hood it all gets back to this Classloader. And in case of 
URLClassLoader we have a URL.
But we can tweak this SwaggerUiResolver code as often as we need :-), ping me 
please whenever you see an issue. 
Let me look at the service page issue now...



was (Author: sergey_beryozkin):
Hi Lukazh, thanks for a quick test, nice start.

I thought after I left the 1st comment that may be String would not be enough 
but then realized that obviously OSGI has a 'bundle:' URL handler. I guess 
under the hood it all gets back to this Classloader. And in case of 
URLClassLoader we have a URL.
But we can tweak this SwaggerUiResolver code as often as we need :-), ping me 
please whenever you see an issue. 
Let me look at the service page issue now...


> Swagger2Feature can not auto-link to SwaggerUi in OSGI
> --
>
> Key: CXF-7010
> URL: https://issues.apache.org/jira/browse/CXF-7010
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.7
>Reporter: Sergey Beryozkin
> Fix For: 3.2.0, 3.1.8
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CXF-7010) Swagger2Feature can not auto-link to SwaggerUi in OSGI

2016-08-15 Thread Sergey Beryozkin (JIRA)

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

Sergey Beryozkin commented on CXF-7010:
---

Hi Łukasz, 
Hmm, I wonder if a bus visible to ServletController is different to the one 
which Swagger2Feature uses to set a swaggerUiAvailability flag. Should be the 
same but may be it is not the case in your deployment, can you please 
check bus instances at
https://github.com/apache/cxf/blob/3.1.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/servicelist/FormattedServiceListWriter.java#L176
and  
https://github.com/apache/cxf/blob/3.1.x-fixes/rt/rs/description-swagger/src/main/java/org/apache/cxf/jaxrs/swagger/Swagger2Feature.java#L99
thanks, Sergey

> Swagger2Feature can not auto-link to SwaggerUi in OSGI
> --
>
> Key: CXF-7010
> URL: https://issues.apache.org/jira/browse/CXF-7010
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.7
>Reporter: Sergey Beryozkin
> Fix For: 3.2.0, 3.1.8
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CXF-7010) Swagger2Feature can not auto-link to SwaggerUi in OSGI

2016-08-15 Thread JIRA

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

Łukasz Dywicki commented on CXF-7010:
-

I reached these points as well. Property is properly set, however bus argument 
is null in FormattedServiceListWriter. I can see here a small conflict because 
SwaggerFeature must be added to endpoint, how service list will work if there 
will be multiple endpoints on the same bus?

> Swagger2Feature can not auto-link to SwaggerUi in OSGI
> --
>
> Key: CXF-7010
> URL: https://issues.apache.org/jira/browse/CXF-7010
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.7
>Reporter: Sergey Beryozkin
> Fix For: 3.2.0, 3.1.8
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CXF-7010) Swagger2Feature can not auto-link to SwaggerUi in OSGI

2016-08-15 Thread Sergey Beryozkin (JIRA)

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

Sergey Beryozkin commented on CXF-7010:
---

I updated FormattedServiceListWriter to check a default bus in case the one 
passed to it is null. That should do it, hopefully.
For every endpoint there will be its own link, that should be fine too

> Swagger2Feature can not auto-link to SwaggerUi in OSGI
> --
>
> Key: CXF-7010
> URL: https://issues.apache.org/jira/browse/CXF-7010
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.7
>Reporter: Sergey Beryozkin
> Fix For: 3.2.0, 3.1.8
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (CXF-7010) Swagger2Feature can not auto-link to SwaggerUi in OSGI

2016-08-15 Thread JIRA

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

Łukasz Dywicki commented on CXF-7010:
-

It works like a charm! :-)

> Swagger2Feature can not auto-link to SwaggerUi in OSGI
> --
>
> Key: CXF-7010
> URL: https://issues.apache.org/jira/browse/CXF-7010
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-RS
>Affects Versions: 3.1.7
>Reporter: Sergey Beryozkin
> Fix For: 3.2.0, 3.1.8
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)