Uploaded image for project: 'Kuali Rice Development'
  1. Kuali Rice Development
  2. KULRICE-5230

Add ability to fetch a service from the ServiceBus by a combination of service name and application id

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.0-m6, 2.0
    • Component/s: Version Compatibility
    • Security Level: Public (Public: Anyone can view)
    • Labels:
      None
    • Rice Module:
      KEW
    • KAI Review Status:
      Not Required
    • KTI Review Status:
      Not Required

      Description

      This will allow for us to publish services like the WorkflowDocumentActionsService under the same namespace on multiple machines, but still make it eacy for the Rice Standalone Server to call back into those client applications when executing things like super user and route log future projection.

        Attachments

          Activity

          Hide
          ewestfal Eric Westfall added a comment -

          James, for this one you will want to add the appropriate method to org.kuali.rice.ksb.api.bus.ServiceBus...and make sure to javadoc it! so as not to create a gap in all the beautiful javadocing i did on the various KSB apis

          Show
          ewestfal Eric Westfall added a comment - James, for this one you will want to add the appropriate method to org.kuali.rice.ksb.api.bus.ServiceBus...and make sure to javadoc it! so as not to create a gap in all the beautiful javadocing i did on the various KSB apis
          Hide
          ewestfal Eric Westfall added a comment -

          I actually ended up needing to do this for one of the other pieces of work i was doing. Will be committing this shortly.

          Effectively added two methods to service bus:

          /**
               * Returns an available endpoint for the service with the given name which is hosted by the
               * application with the given application id. This operation functions the same as
               * {@link #getEndpoint(QName)} with the exception that it will only consider endpoints with the
               * given application id.
               * 
               * <p>
               * Invoking this method with a null or blank value for {@code applicationId} is equivalent to
               * invoking {@link #getEndpoint(QName)}.
               * 
               * @param serviceName the name of the service for which to locate an available endpoint
               * @param applicationId the id of the application for which to locate an available endpoint for
               *        the given service name
               * @return an available endpoint for the service with the given name and application id, or null
               *         if none is available
               * @throws IllegalArgumentException if serviceName is null
               */
              public Endpoint getEndpoint(QName serviceName, String applicationId);
          
              /**
               * Returns a proxy to the service with the given name which is hosted by the application with
               * the given application id. This operation functions the same as {@link #getService(QName)}
               * with the exception that it will only consider endpoints with the given application id.
               * 
               * <p>
               * Invoking this method with a null or blank value for {@code applicationId} is equivalent to
               * invoking {@link #getService(QName)}. This method is also equivalent to invoking
               * {@link #getEndpoint(QName, String).getService()}.
               * 
               * @param serviceName the name of the service for which to locate an available proxy
               * @param applicationId the id of the application for which to locate an available proxy for the
               *        given service name
               * @return an available proxy for the service with the given name, or null if none is available
               * @throws IllegalArgumentException if serviceName is null
               */
              public Object getService(QName serviceName, String applicationId);
          
          Show
          ewestfal Eric Westfall added a comment - I actually ended up needing to do this for one of the other pieces of work i was doing. Will be committing this shortly. Effectively added two methods to service bus: /** * Returns an available endpoint for the service with the given name which is hosted by the * application with the given application id. This operation functions the same as * {@link #getEndpoint(QName)} with the exception that it will only consider endpoints with the * given application id. * * <p> * Invoking this method with a null or blank value for {@code applicationId} is equivalent to * invoking {@link #getEndpoint(QName)}. * * @param serviceName the name of the service for which to locate an available endpoint * @param applicationId the id of the application for which to locate an available endpoint for * the given service name * @ return an available endpoint for the service with the given name and application id, or null * if none is available * @ throws IllegalArgumentException if serviceName is null */ public Endpoint getEndpoint(QName serviceName, String applicationId); /** * Returns a proxy to the service with the given name which is hosted by the application with * the given application id. This operation functions the same as {@link #getService(QName)} * with the exception that it will only consider endpoints with the given application id. * * <p> * Invoking this method with a null or blank value for {@code applicationId} is equivalent to * invoking {@link #getService(QName)}. This method is also equivalent to invoking * {@link #getEndpoint(QName, String ).getService()}. * * @param serviceName the name of the service for which to locate an available proxy * @param applicationId the id of the application for which to locate an available proxy for the * given service name * @ return an available proxy for the service with the given name, or null if none is available * @ throws IllegalArgumentException if serviceName is null */ public Object getService(QName serviceName, String applicationId);
          Hide
          ewestfal Eric Westfall added a comment -

          Implementation committed. Resolving this jira.

          Show
          ewestfal Eric Westfall added a comment - Implementation committed. Resolving this jira.
          Hide
          riceci Rice-CI User (Inactive) added a comment -

          Integrated in rice-trunk-nightly #111 (See http://ci.rice.kuali.org/job/rice-trunk-nightly/111/)
          KULRICE-4555, KULRICE-5230 - removed WorkflowDocumentActions completely, updated spring files so WorkflowDocumentActionsService is getting published properly. Implemented KSB apis to lookup services by name and application id.

          Show
          riceci Rice-CI User (Inactive) added a comment - Integrated in rice-trunk-nightly #111 (See http://ci.rice.kuali.org/job/rice-trunk-nightly/111/ ) KULRICE-4555 , KULRICE-5230 - removed WorkflowDocumentActions completely, updated spring files so WorkflowDocumentActionsService is getting published properly. Implemented KSB apis to lookup services by name and application id.
          Hide
          jcoltrin Jessica Coltrin (Inactive) added a comment -

          Closing since this item is now in the 2.0 release notes.

          Show
          jcoltrin Jessica Coltrin (Inactive) added a comment - Closing since this item is now in the 2.0 release notes.

            People

            • Assignee:
              ewestfal Eric Westfall
              Reporter:
              ewestfal Eric Westfall
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 2 hours
                2h
                Remaining:
                Remaining Estimate - 2 hours
                2h
                Logged:
                Time Spent - Not Specified
                Not Specified