You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Olivier Lamy (JIRA)" <ji...@apache.org> on 2011/08/09 21:24:27 UTC

[jira] [Created] (CXF-3725) JAXRS must be able to expose all spring components marked with @Path

JAXRS must be able to expose all spring components marked with @Path
--------------------------------------------------------------------

                 Key: CXF-3725
                 URL: https://issues.apache.org/jira/browse/CXF-3725
             Project: CXF
          Issue Type: New Feature
            Reporter: Olivier Lamy


To ease dev and not to have to declare all beans.
See sample :
{code}
not   
<jaxrs:server id="bookservice" address="/">
  <jaxrs:serviceBeans>
    <ref bean="bookstore"/>
    <ref bean="bookstoreInterface"/>
  </jaxrs:serviceBeans>
</jaxrs:server>

but 

<jaxrs:server id="bookservice" address="/">
  <jaxrs:serviceBeans all-beans="true">
    
  </jaxrs:serviceBeans>
</jaxrs:server>

All spring components marked with @Path as it will be exposed
@Path( "/userService/" )
@Service("userService#rest")
public class DefaultUserService
    implements UserService
{code}

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

        

[jira] [Commented] (CXF-3725) JAXRS must be able to expose all spring components marked with @Path

Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13081870#comment-13081870 ] 

Sergey Beryozkin commented on CXF-3725:
---------------------------------------

Hi Olivier - sounds good. 

I'd simplify further,

<jaxrs:server address="/"/>

or may be

<jaxrs:server id="bookservice" address="/">
  <jaxrs:serviceBeans/>
</jaxrs:server>
means scan all the @Path annotated components. 
That would also be simpler to implement as jaxrs:serviceBeans at the moment is just a basic schema component.

FYI, I deliberately did not implement the scanning feature for non-Spring apps - realistically it is causing issues and I can see users
elsewhere are asking how to limit the scanning scope and this feature is also disabled by default...That said, that's another feature which
may be needed for certain integration scenarios
thanks

> JAXRS must be able to expose all spring components marked with @Path
> --------------------------------------------------------------------
>
>                 Key: CXF-3725
>                 URL: https://issues.apache.org/jira/browse/CXF-3725
>             Project: CXF
>          Issue Type: New Feature
>            Reporter: Olivier Lamy
>
> To ease dev and not to have to declare all beans.
> See sample :
> {code}
> not   
> <jaxrs:server id="bookservice" address="/">
>   <jaxrs:serviceBeans>
>     <ref bean="bookstore"/>
>     <ref bean="bookstoreInterface"/>
>   </jaxrs:serviceBeans>
> </jaxrs:server>
> but 
> <jaxrs:server id="bookservice" address="/">
>   <jaxrs:serviceBeans all-beans="true">
>     
>   </jaxrs:serviceBeans>
> </jaxrs:server>
> All spring components marked with @Path as it will be exposed
> @Path( "/userService/" )
> @Service("userService#rest")
> public class DefaultUserService
>     implements UserService
> {code}

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

        

[jira] [Commented] (CXF-3725) JAXRS must be able to expose all spring components marked with @Path

Posted by "Olivier Lamy (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-3725?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13082191#comment-13082191 ] 

Olivier Lamy commented on CXF-3725:
-----------------------------------

An other possibility I like :
{code:xml}
<jaxrs:server id="bookservice" address="/">
  <jaxrs:serviceBeans scan-packages="org.apache.foo,org.apache.bar">    
</jaxrs:server>
{code}
Packages and sub packages will be added/scanned.
It's something similar to spring :
{code:xml}
<context:component-scan
    base-package="org.apache.foo,org.apache.bar"/>
{code}
Makes sense ?

> JAXRS must be able to expose all spring components marked with @Path
> --------------------------------------------------------------------
>
>                 Key: CXF-3725
>                 URL: https://issues.apache.org/jira/browse/CXF-3725
>             Project: CXF
>          Issue Type: New Feature
>            Reporter: Olivier Lamy
>
> To ease dev and not to have to declare all beans.
> See sample :
> {code}
> not   
> <jaxrs:server id="bookservice" address="/">
>   <jaxrs:serviceBeans>
>     <ref bean="bookstore"/>
>     <ref bean="bookstoreInterface"/>
>   </jaxrs:serviceBeans>
> </jaxrs:server>
> but 
> <jaxrs:server id="bookservice" address="/">
>   <jaxrs:serviceBeans all-beans="true">
>     
>   </jaxrs:serviceBeans>
> </jaxrs:server>
> All spring components marked with @Path as it will be exposed
> @Path( "/userService/" )
> @Service("userService#rest")
> public class DefaultUserService
>     implements UserService
> {code}

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