daradurvs commented on a change in pull request #8431:
URL: https://github.com/apache/ignite/pull/8431#discussion_r525293391
##########
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 didn't mean copy/paste :)
I thought that there is another way to load className.
For example, load and set a className externally (without KernalContext
field in `ServiceInfo`).
Not sure if `IgniteServiceProcessor#copyAndInject` is a suitable place for
that or not.
----------------------------------------------------------------
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]