dependency injection - Injecting Statefull Bean inside Stateless bean -
dependency injection - Injecting Statefull Bean inside Stateless bean -
when injecting stateful session bean
within stateless session bean
using di
, happens exactelly : did container inject new instance of statefull bean every stateless bean (wich exists in pool), or same instance shared between them?
why indicated using jndi
in case improve di?
i didn't :)
thank :)
basically doesn't create sense inject stateful stateless, because stateful shared many clients, if happen same stateless instance, or 1 client can access different stateful instances, if access different stateless instances.
using jndi or not, doesn't create difference in case. stateful cannot shared many clients , each statelss instance different client. if utilize jndi depending lookup can end new stateful instance every phone call stateless.
any reason why inject stateful in stateless?
dependency-injection ejb-3.0 jndi stateful-session-bean stateless-session
Comments
Post a Comment