L
lourduraj.s
Hi,
I have a scenario where based on some config parameters, I create
an appropriate Business class instance using java reflection and
invoke a specific method. Now to avoid creating instances for each
request using reflection, I place the java object in a Hashmap once I
create it and serve the class from there.
1. Now I am not sure if doing this would cause threading issues or any
other issues, if there are simultaneous requests to the same Business
class instance. What would be the behaviour in that case?
2. If my Business class were an Stateless EJB and I store the EJB Home
object reference in a Hashmap and serve it for all requests, will it
also cause issues?
Any help is greatly appreciated.
Regards,
Raj
I have a scenario where based on some config parameters, I create
an appropriate Business class instance using java reflection and
invoke a specific method. Now to avoid creating instances for each
request using reflection, I place the java object in a Hashmap once I
create it and serve the class from there.
1. Now I am not sure if doing this would cause threading issues or any
other issues, if there are simultaneous requests to the same Business
class instance. What would be the behaviour in that case?
2. If my Business class were an Stateless EJB and I store the EJB Home
object reference in a Hashmap and serve it for all requests, will it
also cause issues?
Any help is greatly appreciated.
Regards,
Raj