[jbossws-dev] jbossws-cxf and try-catch blocks

Alessio Soldano asoldano at redhat.com
Tue May 24 10:00:26 EDT 2016


Il 24/05/2016 15:49, Rostislav Svoboda ha scritto:
> Hi.
>
> I'd like to have your feedback on 2 logging items related to jbossws-cxf and try-catch [1].
>
> 1) Usage of Exception.printStackTrace() instead of logging feature
>    https://github.com/jbossws/jbossws-cxf/blob/master/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFHandlerResolverImpl.java#L331
>    https://github.com/jbossws/jbossws-cxf/blob/master/modules/client/src/main/java/org/jboss/wsf/stack/cxf/client/serviceref/CXFHandlerResolverImpl.java#L373
>    https://github.com/jbossws/jbossws-cxf/blob/master/modules/addons/transports/udp/src/main/java/org/jboss/wsf/stack/cxf/addons/transports/udp/UDPDestination.java#L113
>    https://github.com/jbossws/jbossws-cxf/blob/master/modules/addons/transports/udp/src/main/java/org/jboss/wsf/stack/cxf/addons/transports/udp/UDPDestination.java#L200
>
> Is there any reason to call printStackTrace() directly ? If not I can create JIRA for cleanup ++ check other jbossws-* projects.
Most likely leftovers from initial development; not a major issue, but 
yes, should be replaced with proper logging.

>
> 2) // ignore in catch block
>    https://github.com/jbossws/jbossws-cxf/blob/master/modules/client/src/main/java/org/jboss/wsf/stack/cxf/saaj/SOAPConnectionImpl.java#L251
>    https://github.com/jbossws/jbossws-cxf/blob/master/modules/addons/transports/udp/src/main/java/org/jboss/wsf/stack/cxf/addons/transports/udp/UDPConduit.java#L165
>    https://github.com/jbossws/jbossws-cxf/blob/master/modules/addons/transports/udp/src/main/java/org/jboss/wsf/stack/cxf/addons/transports/udp/UDPConduit.java#L179
>    https://github.com/jbossws/jbossws-cxf/blob/master/modules/jaspi/src/main/java/org/jboss/wsf/stack/cxf/jaspi/config/JBossWSServerAuthConfig.java#L193
>
> What about logging on trace level ? In case of UDPConduid it's catching exception on socket.send() while looping across all network interfaces ... logging at trace could potentially help when troubleshooting
> What do you think about these items? Should I proceed with JIRA and other jbossws-* projects?
A simple message at TRACE level could be ok in these cases, yes.

Yes, please create 2 jiras.
Thanks
Alessio

-- 
Alessio Soldano
Web Service Lead, JBoss



More information about the jbossws-dev mailing list