alex-plekhanov commented on a change in pull request #8431:
URL: https://github.com/apache/ignite/pull/8431#discussion_r525307406



##########
File path: 
modules/core/src/main/java/org/apache/ignite/internal/processors/service/ServiceInfo.java
##########
@@ -116,15 +125,28 @@ public IgniteUuid serviceId() {
     }
 
     /** {@inheritDoc} */
-    @SuppressWarnings("unchecked")
     @Override public Class<? extends Service> serviceClass() {
         if (cfg instanceof LazyServiceConfiguration) {
+            if (srvcCls != null)
+                return srvcCls;
+
             String clsName = 
((LazyServiceConfiguration)cfg).serviceClassName();
 
             try {
-                return (Class<? extends Service>)Class.forName(clsName);
+                srvcCls = (Class<? extends Service>)Class.forName(clsName);
+
+                return srvcCls;
             }
             catch (ClassNotFoundException e) {
+                GridDeployment srvcDep = ctx.deploy().getDeployment(clsName);

Review comment:
       I've tried to implement class resolving logic in 
`IgniteServiceProcessor` before `ServiceInfo` constructor and pass it as an 
argument, but I think it's risky if we fail in `processServicesChangeRequest`, 
so I've moved class resolving logic to  `ServiceInfo.serviceClass()` method. 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to