Spring configuration (in)consistency between JAX-RS and JAX-WS

View: New views
2 Messages — Rating Filter:   Alert me  

Spring configuration (in)consistency between JAX-RS and JAX-WS

by bimargulies :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

One needs a #, one doesn't.

    <bean id="extractionImpl" class="com.basistech.vws.ExtractionImpl"
        autowire="byName" />

    <jaxws:endpoint id="extraction" implementor="#extractionImpl"
        address="/Extraction" />

    <bean id="configServiceImpl"
class="com.basistech.vws.ConfigurationDatabaseService"
        autowire="byName" />

    <jaxrs:server id="configService" address="/configuration">
        <jaxrs:serviceBeans>
            <ref bean="configServiceImpl" />
        </jaxrs:serviceBeans>
          <jaxrs:providers>
            <bean class="org.codehaus.jackson.jaxrs.JacksonJsonProvider"/>
        </jaxrs:providers>
    </jaxrs:server>

Re: Spring configuration (in)consistency between JAX-RS and JAX-WS

by dkulp :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Benson,

Not COMPLETELY inconsistent as:
<jaxws:endpoint id="extraction" address="/Extraction">
   <jaxws:implementor>
        <ref bean="extractionImpl/>
   </jaxws:implementor>
</jaxws:endpoint>

Works which would match the jaxrs case more.    The implementor attribute is
more of a "short hand".   The # is used to distinguish between a bean
reference and a class name.    You could do

<jaxws:endpoint id="extraction"
          implementor="com.basistech.vws.ExtractionImpl"
         address="/Extraction" />

and it would create a new instance of the ExtractionImpl.

Dan



On Wed October 21 2009 3:45:35 pm Benson Margulies wrote:

> One needs a #, one doesn't.
>
>     <bean id="extractionImpl" class="com.basistech.vws.ExtractionImpl"
>         autowire="byName" />
>
>     <jaxws:endpoint id="extraction" implementor="#extractionImpl"
>         address="/Extraction" />
>
>     <bean id="configServiceImpl"
> class="com.basistech.vws.ConfigurationDatabaseService"
>         autowire="byName" />
>
>     <jaxrs:server id="configService" address="/configuration">
>         <jaxrs:serviceBeans>
>             <ref bean="configServiceImpl" />
>         </jaxrs:serviceBeans>
>           <jaxrs:providers>
>             <bean class="org.codehaus.jackson.jaxrs.JacksonJsonProvider"/>
>         </jaxrs:providers>
>     </jaxrs:server>
>

--
Daniel Kulp
dkulp@...
http://www.dankulp.com/blog