Fred Barnes

Ranch Hand
+ Follow
since Jun 11, 2002
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Fred Barnes

Hi Guys
Please add mine...
Passed 84% South Africa.
Regards
Fred
16 years ago
Hi Guys,
I was wondering why the application server makes so many calls to the ejbStore method?
I am using Orion 1.5.2 application server with EJB 1.1 bean managed persistence and J2SDK 1.3.1_08. On loading the entity bean the server makes one call to the ejbLoad method and a amazing 55 calls to the ejbStore method.
I understand the life-cycle of an entity bean and when the ejbStore method gets called by the container, but is it necessary to make so many consecutive calls?
Also how does this influence performance? Is this application server specific?
Kind Regards
Fred
Hi Andrew,
Thank you for your reply!
Regards
Fred
16 years ago
Hi Andrew,
Can you tell me when did you submit your assignment and do the follow up exam?
Kind Regards
Fred
16 years ago
Hi Guys,
On which page of the CertManager will my result be displayed? Is it Test History?

Kind Regards
Fred
Hi Eugene,
Thank you for your kind reply!
Regards
Fred
Hi Matt,
Thank you for your reply!
I was thinking if you include the needed stub class in you client.jar and there needs to be changes on the server side the client.jar need to be updated. However if the stub classes are downloaded this would be avoided.
What are you comments on this view...
Regards
Fred
Hi Guys,
Just a quick question. Is it fine to have the server.jar in the classpath of the client.jar or must the stub classes be download from the server?
Regards
Fred
Hi Guys,
Do I only javadoc public methods and fields?
Or do I javadoc all protected, private and default memebers? Is it nessesary to javadoc all variables, for e.g. JPanel in the GUI?
Regards
Fred
Hi Eugene,
Thank you kindly!
Fred
hi guys,
should you reformat the supplied code? e.g.. Remove unused import statements, remove all wildcard imports. Add javadoc comments to instance variables and correct missing javadoc elements like @return?
When should you use a wildcard import? e.g.. More that 3 classes from a specific package is used?
regards
fred
Hi Guys,
My RemoteData objects implement Unreferenced. When this object locks a record I assign the locked record number to a private instance variable called lockedRecord. If the client dies I have implemented the unreferenced method as follows :
public void unreferenced() {
if (this.lockedRecord != 0) {
lockManager.unlock(this, this.lockedRecord );
}
}
Is this correct?
I have tested it and it works. Is there a more elegant way of doing this?
Regards
Fred
MVC
Hi Mark,
Thank you for your reply!
Regards
Fred
Hi Eugene,
Cant the Controller who has a reference to the View and Model register the View as a observer to the Model?
Regards
Fred
Sorry I made a mistake! Here follws the source...
public class View extends JFrame implements Observer {
private JLabel label;
private JTextField field;
public View() {
label = new JLabel();
field = new JTextField(10);
JButton change = new JButton("Change!");
change.addActionListener(new Controller(this));
JPanel panel = new JPanel();
panel.add(label);
panel.add(field);
panel.add(change);
this.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent we) {
System.exit(0);
}
});
this.getContentPane().add(panel);
this.pack();
this.setVisible(true);
}
public static void main(String[] args) {
View v = new View();
}
public void update(Observable arg0, Object arg1) {
label.setText(((Model) arg0).getValue());
}
public String getValue() {
return field.getText();
}
}
public class Controller implements ActionListener {
private View view;
private Model model;
public Controller(View view) {
this.view = view;
model = new Model();
model.addObserver(view);
model.setValue("Fred");
}
public void actionPerformed(ActionEvent ae) {
model.setValue(view.getValue());
}
}
public class Model extends Observable {
private String value;

public Model() {
}
public Model(String value) {
this.value = value;
setChanged();
notifyObservers();
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
setChanged();
notifyObservers();
}
}
Regards
Fred