If I deploy a @ManagedBean or CDI @Named JSF backing bean in one application EAR within a GlassFish domain and then deploy the same managed or named bean in a different application EAR within the same GlassFish domain, will this cause a collision or any problems? For example, I have a LoginController class that is registered as a managed or named bean that I use for login to different applications. I also have some other common, horizontal utilities that are registered as managed or named beans that I would like to reuse across different applications deployed as different EARs that may or may not be deployed to the same GlassFish domain or server. I have implemented this already and am wondering about the scope of managed or named beans relative to the GlassFish domains and across applications / EARs. What is the best way to accomplish this within JEE and GlassFish?
1
votes
side note: JSF Managed Beans are deprecated (as of JSF 2.3). Instead you should use CDI @Named beans
- Andy Guibert
Did you try? Should not be that difficult
- Kukeltje
Thanks @AndyGuibert. I have converted remaining ManagedBean annotations to CDI Named beans, but the fundamental question about scope of the JSF backing beans within the GlassFish environment has not yet been answered.
- Chris
@Kukeltje I have already implemented, but it is difficult to tell if problems that occur may be due to this type of conflict or possibly some other problem with the reused components' implementation, so I am looking for a definitive answer.
- Chris