Search in sources :

Example 1 with KieScannerMBeanImpl

use of org.kie.scanner.management.KieScannerMBeanImpl in project drools by kiegroup.

the class KieRepositoryScannerImpl method setKieContainer.

public synchronized void setKieContainer(KieContainer kieContainer) {
    if (this.kieContainer != null) {
        throw new RuntimeException("Cannot change KieContainer on an already initialized KieScanner");
    }
    this.kieContainer = (InternalKieContainer) kieContainer;
    if (this.kieContainer.getContainerReleaseId() == null) {
        throw new RuntimeException("The KieContainer's ReleaseId cannot be null. Are you using a KieClasspathContainer?");
    }
    artifactResolver = getResolverFor(this.kieContainer, true);
    kieProjectDescr = new DependencyDescriptor(this.kieContainer.getReleaseId(), this.kieContainer.getCreationTimestamp());
    usedDependencies = indexArtifacts();
    KieScannersRegistry.register(this);
    changeStatus(Status.STOPPED);
    if (MBeanUtils.isMBeanEnabled()) {
        mbean = new KieScannerMBeanImpl(this);
    }
}
Also used : DependencyDescriptor(org.appformer.maven.integration.DependencyDescriptor) KieScannerMBeanImpl(org.kie.scanner.management.KieScannerMBeanImpl)

Aggregations

DependencyDescriptor (org.appformer.maven.integration.DependencyDescriptor)1 KieScannerMBeanImpl (org.kie.scanner.management.KieScannerMBeanImpl)1