Uploaded image for project: 'HiveMind'
  1. HiveMind
  2. HIVEMIND-141

May extend element <set-object> of <invoke-factory> to support create a ojbect by calling some service's method (probly with param?)

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.1
    • None
    • framework
    • None

    Description

      If I want to create a service with some property coming frome another service's method ,for example, serivceb.getOjbect(param), how can I do ?
      I tried another way , first define a service that implement BeanFactory which can provide defferent (or the same) object based on calling param "locator", so I can use ObjectProvider to set this ojbect to another service's property by " <set-object property="logger" value="bean:MyLoggerFactory:name=AdderImplLogger"/> "
      but this is some complex ,if you can improve OjbectProvider ,let it complete the following job ,I think it's great for IOC container
      <set-ojbect property="logger" value="bean-method:serviceB:method=createLogger(theName,theLevel)/>
      or
      <set-object property="logger" value="bean-method:serviceB:method=createLogger">
      <param name="logName">theName</param>
      </set-oject>
      and define serviceB's service port (web-service ???) schema
      <service-schema service-id="serviceB">
      <method name="createLogger">
      <param name="logName">
      <parse-rule class="String" />
      </param>
      <param name="logLevel">
      <parse-rule class="Integer" />
      </param>
      <param name="theDate">
      <parse-rule class="Date(yyyy-mm-dd)" />
      </param>
      <param name="theDate">
      <parse-rule class="custom:usesDefined" />
      </param>
      </service-schema>

      ha ,ha ....,may be my thought is greate? ,may be hivemind can be the greatest service (web service?) oriented IOC container ?

      Attachments

        Activity

          People

            Unassigned Unassigned
            etome2008 wu zhi hui
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: