Did you load the configuration from the filesystem? This is against the EJB specification.
Anyway, If you inject a EJB it will have the same lifecycle as the injection target. It depends on the method how you initialize the configuration.
If you use @PostConstruct that mean after the container creates the EJB and it will not be done again. Only if the container does not pool both instances the EJB will be created and destroyed every invocation.
That might help, but may cause performance issues.
Other option, which is against the spec, is to check a timestamp whether the configuration is out of date.
Sorry for delay, vacation was welcome
1) my configuration is loaded from database. I think it's authorized.
2) I use @Inject on private attribute from the EJB instance, I understand that this injection is done only once per instance.
@Inject @Configurable @ConfigurableOptions(...) private Integer maxResultForSearch;
3) even if I could use timestamp, I don't see how to force JBoss to destroy a particular EJB instance which could be "timed-out".
Anyway, thanks for your reply
From the EJB specification the container is responsible to create and destroy the Bean.
You could not have contol for this.