Is it possible to invoke (from a client) a business method in all the "ready" instances of a Stateless session bean?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Friday, July 26, 2002 02:11 AM


I have a stateless session bean and I want, depending on some circunstances to change its behaviour. Its behaviour is defined in a set of configuration files.


When the container creates an instance all the configuration files are read. But if some file is changed all the current "ready" instances must be notified.


The processing of these files could be very "heavy". Then it's not a good idea to check them every time.


From the client point of view I can have access to one instance and invoke a business method to change its behaviour. But how can I do it for all the instances?

Re: Is it possible to invoke (from a client) a business method in all the "ready" instances of a Stateless session bean?

Posted By:   Bozidar_Dangubic  
Posted On:   Friday, July 26, 2002 07:05 AM

can't do it. stateless sessions beans should never have to be notified of anything. they are stateless. the best way to think of that is to know that stateless session bean can accomplish its job only from things that it contains and/or are sent to it during method invocation. so not only that you cannot notify all ready stateless session beans but you actually should never even design it so that you would require such functionality.

of course this is just my opinion and software architecture is more art than an exact science.
About | Sitemap | Contact