I have a question regarding the security and code performance of java files. I have 4 files in my webapp.
1. ui.java which is having only screem painting (coded in swing only)
2. servlet.java for server side data sending
3. BO.java contains only variables declaration with a no-arg constructor
4. Bean.java which has stateless EJB bean to connect to DB.
If I am extending the bean.java in ui.java is that going to do any performance issue or security issue there? performance and security in terms of BEAN object is being public. is there any other way to do so?
the actual purpose is I need the changing value of variable which is defined in UI.for that i have to preserve the data there in UI, transfer that to servlet through object and read that in servlet and transfer that to BEAN to write into DB.
So, What i did is: i declared a static variable in UI.assign that value to there. Extend the UI in Bean and call that static variable directly by class name and used that in bean.
Please suggest whether my approach is right or not.