I am using dependency injection by the container and injecting SessionBean into my JSF backing beans. Will this work if I deploy web application (.war containing JSF stuff) on a separate web server and .ear containing session beans on a separate application server?
SCJP, SCJD, SCEA
xsunil kumar
Ranch Hand
Joined: Dec 14, 2009
Posts: 125
posted
0
Amit, as per my understanding it will not work. if DI releated code has been deployed as an EAR and you are trying to pull that value in web application ( assuming webapplication is not a part of EAR), it will not work. Instead you can try using JNDI lookup.
Marcelo Ortego
Greenhorn
Joined: May 31, 2005
Posts: 9
posted
0
I agree with Xsunil. This is my understanding also. If the .ear contains the .war, then DI will work. Otherwise you will need to perform context lookups.
If anyone can prove the contrary, please do.
Kumar Amit
Ranch Hand
Joined: Aug 13, 2001
Posts: 103
posted
0
Thanks guys. Since I am using DI and injecting SessionBean into JSF backing bean, thus I will keep both .war in the same .ear.
Hi rancher
Reading this post I was thinking...I need to declare in my assignment How I'll be generated as the war + ejb jar's or ear?
The proposed solution is not a high level?