-
1. Re: Reset EJB 'slsb' pool : force reinject ESB instances
wdfink Dec 21, 2013 10:41 AM (in response to pleutre)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.
-
2. Re: Reset EJB 'slsb' pool : force reinject ESB instances
pleutre Jan 6, 2014 6:26 AM (in response to pleutre)Hi,
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.
Example :
@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
-
3. Re: Reset EJB 'slsb' pool : force reinject ESB instances
wdfink Jan 6, 2014 12:57 PM (in response to pleutre)From the EJB specification the container is responsible to create and destroy the Bean.
You could not have contol for this.