You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Jervis Liu (JIRA)" <ji...@apache.org> on 2008/02/05 04:33:11 UTC

[jira] Created: (CXF-1416) Enhancement to JAX-RS spring configuration.

Enhancement to JAX-RS spring configuration. 
--------------------------------------------

                 Key: CXF-1416
                 URL: https://issues.apache.org/jira/browse/CXF-1416
             Project: CXF
          Issue Type: Sub-task
          Components: REST
    Affects Versions: 2.1
            Reporter: Jervis Liu


JAX-RS allows multiple root resources, for example, using  JAXRSServerFactoryBean.setResourceClasses(Class... classes) . But the corresponding Spring configuration only allows setting one root resource class, eg:

  <jaxrs:server id="bookservice"  address="/">
    <jaxrs:serviceBeans>
      <ref bean="bookstore"/>
    </jaxrs:serviceBeans>		   
  </jaxrs:server>
  <bean id="bookstore" scope="prototype" class="org.apache.cxf.systest.jaxrs.BookStore">
  </bean>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CXF-1416) Enhancement to JAX-RS spring configuration.

Posted by "Barry Fitzgerald (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-1416?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Barry Fitzgerald updated CXF-1416:
----------------------------------

    Attachment: CXF-1416.patch

This works for me. But I'm not really sure if it right. Also there are currently no tests for the Spring Parser and I'm not sure how to go about making one.

Barry

> Enhancement to JAX-RS spring configuration. 
> --------------------------------------------
>
>                 Key: CXF-1416
>                 URL: https://issues.apache.org/jira/browse/CXF-1416
>             Project: CXF
>          Issue Type: Sub-task
>          Components: REST
>    Affects Versions: 2.1
>            Reporter: Jervis Liu
>         Attachments: CXF-1416.patch
>
>
> JAX-RS allows multiple root resources, for example, using  JAXRSServerFactoryBean.setResourceClasses(Class... classes) . But the corresponding Spring configuration only allows setting one root resource class, eg:
>   <jaxrs:server id="bookservice"  address="/">
>     <jaxrs:serviceBeans>
>       <ref bean="bookstore"/>
>     </jaxrs:serviceBeans>		   
>   </jaxrs:server>
>   <bean id="bookstore" scope="prototype" class="org.apache.cxf.systest.jaxrs.BookStore">
>   </bean>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CXF-1416) Enhancement to JAX-RS spring configuration.

Posted by "Barry Fitzgerald (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-1416?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Barry Fitzgerald updated CXF-1416:
----------------------------------

    Attachment: CXF-1416-test.patch

Test for the above patch. Uses the following spring config:

  <jaxrs:server id="bookservice"
		        address="/">
    <jaxrs:serviceBeans>
      <ref bean="petstore"/>	
      <ref bean="bookstore"/>
    </jaxrs:serviceBeans>		   
  </jaxrs:server>
  
  <bean id="bookstore" scope="prototype" class="org.apache.cxf.systest.jaxrs.BookStore">
  </bean>
  <bean id="petstore" scope="prototype" class="org.apache.cxf.systest.jaxrs.PetStore">
  </bean>

As far as I can see the existing Spring test was not using the Spring config - this is now also resolved.

> Enhancement to JAX-RS spring configuration. 
> --------------------------------------------
>
>                 Key: CXF-1416
>                 URL: https://issues.apache.org/jira/browse/CXF-1416
>             Project: CXF
>          Issue Type: Sub-task
>          Components: REST
>    Affects Versions: 2.1
>            Reporter: Jervis Liu
>         Attachments: CXF-1416-test.patch, CXF-1416.patch
>
>
> JAX-RS allows multiple root resources, for example, using  JAXRSServerFactoryBean.setResourceClasses(Class... classes) . But the corresponding Spring configuration only allows setting one root resource class, eg:
>   <jaxrs:server id="bookservice"  address="/">
>     <jaxrs:serviceBeans>
>       <ref bean="bookstore"/>
>     </jaxrs:serviceBeans>		   
>   </jaxrs:server>
>   <bean id="bookstore" scope="prototype" class="org.apache.cxf.systest.jaxrs.BookStore">
>   </bean>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (CXF-1416) Enhancement to JAX-RS spring configuration.

Posted by "Jervis Liu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-1416?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jervis Liu resolved CXF-1416.
-----------------------------

       Resolution: Fixed
    Fix Version/s: 2.1

> Enhancement to JAX-RS spring configuration. 
> --------------------------------------------
>
>                 Key: CXF-1416
>                 URL: https://issues.apache.org/jira/browse/CXF-1416
>             Project: CXF
>          Issue Type: Sub-task
>          Components: REST
>    Affects Versions: 2.1
>            Reporter: Jervis Liu
>             Fix For: 2.1
>
>         Attachments: CXF-1416-test.patch, CXF-1416.patch, PetStore.java
>
>
> JAX-RS allows multiple root resources, for example, using  JAXRSServerFactoryBean.setResourceClasses(Class... classes) . But the corresponding Spring configuration only allows setting one root resource class, eg:
>   <jaxrs:server id="bookservice"  address="/">
>     <jaxrs:serviceBeans>
>       <ref bean="bookstore"/>
>     </jaxrs:serviceBeans>		   
>   </jaxrs:server>
>   <bean id="bookstore" scope="prototype" class="org.apache.cxf.systest.jaxrs.BookStore">
>   </bean>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (CXF-1416) Enhancement to JAX-RS spring configuration.

Posted by "Jervis Liu (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-1416?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jervis Liu closed CXF-1416.
---------------------------


> Enhancement to JAX-RS spring configuration. 
> --------------------------------------------
>
>                 Key: CXF-1416
>                 URL: https://issues.apache.org/jira/browse/CXF-1416
>             Project: CXF
>          Issue Type: Sub-task
>          Components: REST
>    Affects Versions: 2.1
>            Reporter: Jervis Liu
>             Fix For: 2.1
>
>         Attachments: CXF-1416-test.patch, CXF-1416.patch, PetStore.java
>
>
> JAX-RS allows multiple root resources, for example, using  JAXRSServerFactoryBean.setResourceClasses(Class... classes) . But the corresponding Spring configuration only allows setting one root resource class, eg:
>   <jaxrs:server id="bookservice"  address="/">
>     <jaxrs:serviceBeans>
>       <ref bean="bookstore"/>
>     </jaxrs:serviceBeans>		   
>   </jaxrs:server>
>   <bean id="bookstore" scope="prototype" class="org.apache.cxf.systest.jaxrs.BookStore">
>   </bean>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (CXF-1416) Enhancement to JAX-RS spring configuration.

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

barfitzgerald edited comment on CXF-1416 at 2/6/08 6:21 AM:
---------------------------------------------------------------

This works for me. But I'm not really sure if it is right. Also there are currently no tests for the Spring Parser and I'm not sure how to go about making one.

Barry

      was (Author: barfitzgerald):
    This works for me. But I'm not really sure if it right. Also there are currently no tests for the Spring Parser and I'm not sure how to go about making one.

Barry
  
> Enhancement to JAX-RS spring configuration. 
> --------------------------------------------
>
>                 Key: CXF-1416
>                 URL: https://issues.apache.org/jira/browse/CXF-1416
>             Project: CXF
>          Issue Type: Sub-task
>          Components: REST
>    Affects Versions: 2.1
>            Reporter: Jervis Liu
>         Attachments: CXF-1416.patch
>
>
> JAX-RS allows multiple root resources, for example, using  JAXRSServerFactoryBean.setResourceClasses(Class... classes) . But the corresponding Spring configuration only allows setting one root resource class, eg:
>   <jaxrs:server id="bookservice"  address="/">
>     <jaxrs:serviceBeans>
>       <ref bean="bookstore"/>
>     </jaxrs:serviceBeans>		   
>   </jaxrs:server>
>   <bean id="bookstore" scope="prototype" class="org.apache.cxf.systest.jaxrs.BookStore">
>   </bean>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CXF-1416) Enhancement to JAX-RS spring configuration.

Posted by "Barry Fitzgerald (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-1416?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Barry Fitzgerald updated CXF-1416:
----------------------------------

    Attachment: PetStore.java

Petstore class missing from above patch

> Enhancement to JAX-RS spring configuration. 
> --------------------------------------------
>
>                 Key: CXF-1416
>                 URL: https://issues.apache.org/jira/browse/CXF-1416
>             Project: CXF
>          Issue Type: Sub-task
>          Components: REST
>    Affects Versions: 2.1
>            Reporter: Jervis Liu
>         Attachments: CXF-1416-test.patch, CXF-1416.patch, PetStore.java
>
>
> JAX-RS allows multiple root resources, for example, using  JAXRSServerFactoryBean.setResourceClasses(Class... classes) . But the corresponding Spring configuration only allows setting one root resource class, eg:
>   <jaxrs:server id="bookservice"  address="/">
>     <jaxrs:serviceBeans>
>       <ref bean="bookstore"/>
>     </jaxrs:serviceBeans>		   
>   </jaxrs:server>
>   <bean id="bookstore" scope="prototype" class="org.apache.cxf.systest.jaxrs.BookStore">
>   </bean>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CXF-1416) Enhancement to JAX-RS spring configuration.

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

Jervis Liu commented on CXF-1416:
---------------------------------

Hi Barry, if you use CXF api to programmatically set root resource classes, you shall be able to do sth like below:

JAXRSServerFactoryBean.setResourceClasses(BookStore.class, CDStore.class) . In this case, both BookStore.class and CDStore.class are the root resources of the JAX-RS runtime. A corresponding spring configuration should look like below:

  <jaxrs:server id="bookservice" address="/"> 
    <jaxrs:serviceBeans> 
      <ref bean="bookstore"/> 
      <ref bean="cdstore"/> 
    </jaxrs:serviceBeans> 
  </jaxrs:server> 
  <bean id="bookstore" scope="prototype" class="org.apache.cxf.systest.jaxrs.BookStore"> 
  </bean>
  <bean id="cdstore" scope="prototype" class="org.apache.cxf.systest.jaxrs.CDStore"> 
  </bean>

However this is not supported in CXF right now

> Enhancement to JAX-RS spring configuration. 
> --------------------------------------------
>
>                 Key: CXF-1416
>                 URL: https://issues.apache.org/jira/browse/CXF-1416
>             Project: CXF
>          Issue Type: Sub-task
>          Components: REST
>    Affects Versions: 2.1
>            Reporter: Jervis Liu
>         Attachments: CXF-1416.patch
>
>
> JAX-RS allows multiple root resources, for example, using  JAXRSServerFactoryBean.setResourceClasses(Class... classes) . But the corresponding Spring configuration only allows setting one root resource class, eg:
>   <jaxrs:server id="bookservice"  address="/">
>     <jaxrs:serviceBeans>
>       <ref bean="bookstore"/>
>     </jaxrs:serviceBeans>		   
>   </jaxrs:server>
>   <bean id="bookstore" scope="prototype" class="org.apache.cxf.systest.jaxrs.BookStore">
>   </bean>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.