what you describe is somewhat grey area which may or may not work as you think/expect.
Have you tried using initializer method instead of `@PostConstruct` call? Should do the job done for you and might just work in external module.
Myself, I'll have to find out more about external modules to investigate this - if you could attach sources/reproducer, that would be great.
Injection method solved the problem, or maybe it should be viewed as a workaround, since I'm not dependent on an orderly shutdown through @PreDestroy. However, it would still be of value to understand why it happens. I can clearly see from trace logging that CDI is populating the client proxy object with post construct method interceptors.
Alright, so after some investigation (most credits go to mkouba), we found the issue.
In your module.xml, you want to add a dependency on
and then post construct interceptor starts working.
As it stands, if you do not add this dependency, the annotation will be ignored.
Normally, if you miss a dependency in module.xml, it would blow up, but it looks like there is some tweak (making it look intended) for annotations where it ignores the missing pieces.
As a consequence, when Weld attempts to grab this class and turn it into proxy, it no longer sees the annotation hence cannot do post construct properly.
EDIT: Actually this behaviour seems to be expected as it is defined by JVM - when you miss the class on CP at runtime, the program will still execute and ignore the annotations.
It had been explained in this SO question (and by extension in the JLS).