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 New Feature
    • Status: Closed Closed
    • Priority: Major 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
    • Similar issues:
      KULRICE-7628MessageServiceInvoker#getQueueService doesn't use the application ID to look up service
      KULRICE-5857Add ability to detete Service Registry entries by application id
      KULRICE-6511Implement ability to load remote services lazily
      KULRICE-4409Add Ability to delete 'localhost' entries in Service Registry from Interface
      KULRICE-3548Add a method to the WorkflowUtility and WorkflowInfo service to fetch the app doc id for a document
      KULRICE-5369Combine Group and GroupUpate services
      KULRICE-12275KSB functionality which deletes services by application ID does not remove inactive service endpoints
      KULRICE-12286New KIM API to bulk fetch display name information
      KULRICE-886ServiceLookup Context Object to fetch services through service locators and Return a LocatorResult instead of object from both getObject and getService from locators
      KULRICE-4553KEW is publishing services to the registry with bad service names like "enWorkflowUtilityService", etc.
    • 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.

        Activity

        Hide
        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
        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
        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
        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
        Eric Westfall added a comment -

        Implementation committed. Resolving this jira.

        Show
        Eric Westfall added a comment - Implementation committed. Resolving this jira.
        Hide
        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
        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
        Jessica Coltrin (Inactive) added a comment -

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

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

          People

          • Assignee:
            Eric Westfall
            Reporter:
            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

                Structure Helper Panel