-
Assume we have some singleton class ala public class SomeSingleton {
public static synchronized SomeSingleton getInstance() {
if (instance == null) {
instance = new SomeSingleton();
}
return instance;
}
} I tried creating a syntetic in my custom extension like so // in a processor inside the deployment module
@BuildStep
@Record(STATIC_INIT)
void makeSomeSingletonBean(
final BuildProducer<SyntheticBeanBuildItem> syntheticBeanBuildItemBuildProducer
) {
syntheticBeanBuildItemBuildProducer.produce(
SyntheticBeanBuildItem.configure(SomeSingleton.class)
.supplier(SomeSingleton::getInstance)
.done()
);
} Edit: after fixing that arc did not start the corresponding app in dev mode, I saw that the build step is not executed, so maybe a caching issue. I use gradle and have a multi module setup. This somehow does not work. I always get an arc error that the bean is missing, what am I missing? |
Beta Was this translation helpful? Give feedback.
Answered by
bulldog98
Mar 20, 2023
Replies: 1 comment
-
Found the problem, was that I misspelled the module name in the build.gradle for the deployment module. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
bulldog98
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Found the problem, was that I misspelled the module name in the build.gradle for the deployment module.