So do you want to destroy an dependent instance immediately after it was injected in constructor right? Am I understanding it correctly? You can use javax.enterprise.inject.Instance Contexts and Dependency Injection for the Java EE platform
you could make use of
@javax.enterprise.inject.TransientReference. The producer method for SimpleResource is
@Dependentso the disposer method should be called when the invocation of the constructor completes.
Thank you very much. It is very ellegant solution