use of org.jboss.as.ee.component.ComponentFactory in project wildfly by wildfly.
the class ApplicationClientComponentDescription method createConfiguration.
@Override
public ComponentConfiguration createConfiguration(final ClassReflectionIndex classIndex, final ClassLoader moduleClassLoader, final ModuleLoader moduleLoader) {
final ComponentConfiguration configuration = super.createConfiguration(classIndex, moduleClassLoader, moduleLoader);
configuration.setInstanceFactory(new ComponentFactory() {
@Override
public ManagedReference create(final InterceptorContext context) {
return new ManagedReference() {
@Override
public void release() {
}
@Override
public Object getInstance() {
return null;
}
};
}
});
return configuration;
}
use of org.jboss.as.ee.component.ComponentFactory in project wildfly by wildfly.
the class ServiceComponentDescription method createConfiguration.
@Override
public ComponentConfiguration createConfiguration(final ClassReflectionIndex classIndex, final ClassLoader moduleClassLoader, final ModuleLoader moduleLoader) {
final ComponentConfiguration configuration = super.createConfiguration(classIndex, moduleClassLoader, moduleLoader);
// will not be used, but if instance factory is not set then components must have default constructor, which is not a
// requirement for MBeans
configuration.setInstanceFactory(new ComponentFactory() {
@Override
public ManagedReference create(final InterceptorContext context) {
return new ManagedReference() {
@Override
public void release() {
}
@Override
public Object getInstance() {
return null;
}
};
}
});
return configuration;
}
Aggregations