Meaningless Drivel is fun!*
The moose likes JDBC and the fly likes security and performance issue with java codes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "security and performance issue with java codes" Watch "security and performance issue with java codes" New topic
Author

security and performance issue with java codes

Prabhudatta Choudhury
Greenhorn

Joined: Jul 03, 2009
Posts: 20

Hi All,

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.

<code>

UI.java

public class test
{

public static int changedvalue;

public int show()
{
changedvalue = 93;
System.out.println(changedvalue);
}

public void init()
{

//some code here for screen painting...
}
}


BEAN.java

Public class ejbBean extends UI
{

private static int oldValue = UI.changedvalue;

public static void main()
{

System.out.println("old value is " +oldValue);
}
}

</Code>



Thanks
Prabhudatta
 
jQuery in Action, 2nd edition
 
subject: security and performance issue with java codes
 
Similar Threads
Postfix Operator
JFileChooser modification
JScrollPane Frustrations
overriding vs hiding
Weird thing happening in Linked Lists