cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Edward Ost (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CXF-3492) Spring OSGI Service Reference as JAXWS:endpoint implementor
Date Thu, 05 May 2011 21:03:03 GMT

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

Edward Ost commented on CXF-3492:
---------------------------------

Actually the solution in that thread does work:

<jaxws:endpoint id="morticeAdapterEndpoint"
implementor="#MorticeCourseUnitService"
implementorClass="au.edu.mq.informatics.dataswitch.poc.mortice.common.MorticeCourseUnitService"
address="/MorticeAdapterServiceProvider">

The error was because org.springframework.osgi.service.util.internal.aop.ProxyUtils.createProxy
calls ProxyFactory.setOpaque(true), which prevents the Advised interface being set on the
proxy.

So org.apache.cxf.common.util.SpringAopClassHelper.getRealClassInternal should probably check
first whether it's assignable to Advised, and if not throw an more meaningful exception up
to EndpointImpl.getImplementorClass for an "implementorClass must be supplied" message.

Maybe this was obvious from the stacktrace in hindsight  ;-)

 

On Fri, Apr 29, 2011 at 10:10 AM, David Metcalf <david.metcalf@mq.edu.au> wrote:
Hi Ed,

To me this looks like a bug in Spring's  org.springframework.aop.support.AopUtils.isAopProxy(Object
object)

It returns true for any JDK or CGLIB proxy, whether or not the object is assignable to org.springframework.aop.framework.Advised.
 (I think this is because before Spring DM they assumed all SpringProxy instances were proxies
for AOP advice, but I expect they're now SpringProxys for OSGI too).

org.apache.cxf.common.util.SpringAopClassHelper.getRealClassInternal assumes it must be assignable
to Advised, because Spring told it it was an AopProxy.

I found this thread too http://mail-archives.apache.org/mod_mbox/cxf-users/201004.mbox/%3C28168894.post@talk.nabble.com%3E,

but the originator's solution doesn't seem to help and I suspect the change Dan Kulp refers
too is different (I can dig into that to check later) 
  
I think I may need a patch for either CXF or Spring to get this working.

> Spring OSGI Service Reference as JAXWS:endpoint implementor
> -----------------------------------------------------------
>
>                 Key: CXF-3492
>                 URL: https://issues.apache.org/jira/browse/CXF-3492
>             Project: CXF
>          Issue Type: Bug
>          Components: OSGi
>    Affects Versions: 2.4
>            Reporter: Edward Ost
>
> Problem pointing <jaxws:endpoint> to an implementor that's provided by <osgi:reference>

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message