DWR

DWR Namespace bean reference

Details

  • Type: Improvement Improvement
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 2.0.2
  • Fix Version/s: 3.0.RC1
  • Component/s: spring
  • Description:
    Hide
    Hi,

    The current namespace Spring integration does not play nicely with multi-modular projects where service bean definitions might reside in a different file which can not be modified.

    Can you please look at adding an extra attribute to the dwr:remote tag (eg. bean-ref) which allows the bean id to be passed in, thus allowing the dwr:remote tag to reside in a separate file. eg.

    (applicationContext-services.xml)
    <bean id="simpleService" class="nz.co.curlybrackets.tutorial.newspringmvc.services.SimpleServiceImpl">
       <property name="simpleRepository" ref="aSimpleRepository"/>
       <property name="emailService" ref="anEmailService"/>
       <property name="importantThing" ref="anImportantThing"/>
    </bean>

    (applicationContext-dwr.xml)
    <dwr:remote bean-ref="myServiceBean" javascript="myAjaxService">
         <dwr:include method="*"/>
    </dwr:remote>

    Currently I acheive this by using Spring proxies eg.
    <bean id="mySimpleService" class="org.springframework.aop.framework.ProxyFactoryBean">
       <property name="proxyInterfaces" value="nz.co.curlybrackets.tutorial.services.SimpleService"/>
       <property name="target" ref="simpleService"/>
       <dwr:remote javascript="MySimpleAjaxService" />
    </bean>

    This would also reduce pollution of bean definitions and promote separation of concerns.

    Thanks

    http://developingdeveloper.wordpress.com/2008/02/16/spring-dwr-namespaces-aop/
    Show
    Hi, The current namespace Spring integration does not play nicely with multi-modular projects where service bean definitions might reside in a different file which can not be modified. Can you please look at adding an extra attribute to the dwr:remote tag (eg. bean-ref) which allows the bean id to be passed in, thus allowing the dwr:remote tag to reside in a separate file. eg. (applicationContext-services.xml) <bean id="simpleService" class="nz.co.curlybrackets.tutorial.newspringmvc.services.SimpleServiceImpl">    <property name="simpleRepository" ref="aSimpleRepository"/>    <property name="emailService" ref="anEmailService"/>    <property name="importantThing" ref="anImportantThing"/> </bean> (applicationContext-dwr.xml) <dwr:remote bean-ref="myServiceBean" javascript="myAjaxService">      <dwr:include method="*"/> </dwr:remote> Currently I acheive this by using Spring proxies eg. <bean id="mySimpleService" class="org.springframework.aop.framework.ProxyFactoryBean">    <property name="proxyInterfaces" value="nz.co.curlybrackets.tutorial.services.SimpleService"/>    <property name="target" ref="simpleService"/>    <dwr:remote javascript="MySimpleAjaxService" /> </bean> This would also reduce pollution of bean definitions and promote separation of concerns. Thanks http://developingdeveloper.wordpress.com/2008/02/16/spring-dwr-namespaces-aop/

Activity

Joe Walker made changes - 26/Feb/08 3:08 PM
Field Original Value New Value
Assignee Joe Walker [ joe ] Jose Noheda [ xmaniac ]
Jose Noheda made changes - 26/Feb/08 3:29 PM
Status Open [ 1 ] In Progress [ 3 ]
Jose Noheda made changes - 27/Feb/08 10:59 AM
Status In Progress [ 3 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
Fix Version/s 3.0.M2 [ 10051 ]

People

Dates

  • Created:
    26/Feb/08 2:16 AM
    Updated:
    27/Feb/08 10:59 AM
    Resolved:
    27/Feb/08 10:59 AM