Hi @taimanov ,
Thank you for the response. I have tried the tutorial. And below are my findings.
- The TenantBean Class which is not annotated with @Component. So, we cannot able to inject any jmix object into the TenantBean.
public class TenantBean {
private final String name;
public TenantBean(String name) {
this.name = name;
}
public void sayHello() {
System.out.println(
String.format("Hello from %s of type %s",
this.name,
this.getClass().getName()));
}
}
- We have to configure each tenant in the TenantBeansConfig class. So, we unable to create Tenants on runtime.
@Configuration
public class TenantBeansConfig {
@Scope(scopeName = "tenant")
@Bean
public TenantBean foo() {
return new TenantBean("foo");
}
@Scope(scopeName = "tenant")
@Bean
public TenantBean bar() {
return new TenantBean("bar");
}
}
Attached the sample project here multitenancy-test.zip (186.9 KB)
.