Details
-
Type:
New Feature
-
Status: Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: None
-
Component/s: Analysis, Development, Version Compatibility
-
Labels:None
-
Rice Module:KSB
-
KAI Review Status:Not Required
-
KTI Review Status:Not Required
Description
The requirement here as to do with a rice standalone server making a callback into an older client application. There are many places where this might occur, most notably with the Kim*TypeServices which service derived roles and custom permission logic, as well as WorkflowAttribute which is used by the rule system and the SecurityAttribute used in doc search (among others).
Typical access to a remote service will be done in the following way:
Object serviceProxy = GlobalResourceLoader.getService(new QName(..., ...));
So the challenge here is determining what the service should be cast to in the calling client code. Which could possibly be one of the following:
org.kuali.rice...v1.MyService serviceProxy = (org.kuali.rice...v1.MyService)GlobalResourceLoader.getService(new QName(..., ...));
or:
org.kuali.rice...v2.MyService serviceProxy = (org.kuali.rice...v2.MyService)GlobalResourceLoader.getService(new QName(..., ...));
Depending on what version the client application is using.
So I think there are a few options that I can think of off the top of my head:
1) Add a method to the service registry to query for the service information (or just add it to the ServiceDefinition):
– ServiceDefinition def = ServiceRegistry.getServiceDefinition(QName);
– if (def.getVersion() == 1) // get service from GRL and cast to v1.MyService
– if (def.getVersion() == 2) // get service from GRL and cast to v2.MyService
2) Add a method to GRL that returns more information about the service
– ServiceDefinition def = GRL.getServiceDefinition(QName);
– if (def.getVersion() == 1) // get the remote service proxy off of the service definition
3) I'm not sure how possible this is, but if we wrote adapters between the different service versions, perhaps we could have GRL.getService always return the same service interface which is essentially a proxy that delegates to the appropriate service version behind the scenes? The thing that worries me about the previous two approaches is that if you add a version 3 you have to go back and remember to manually update the code to add a new condition. So if we can prevent this from being done manually, that's probably ideal.
Attachments
Issue Links
- discovered by
-
KULRICE-6021 Identify and document where the Rice standalone server can make calls back into client applications
-
- Closed
-
- relies on
-
KULRICE-4816 Implement interaction with the service registry so that it goes over remote connection instead of direct database access
-
- Closed
-
Added Jason and Jeff as watchers.