Zhou Can

Ranch Hand
+ Follow
since Sep 12, 2002
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Zhou Can

Dear Mark :
I think you have misapprehended my meaning . As you know Oracle Database , which have a svrmgrl . After using command "svrmgrl" , you get into the server manage console , and you can "startup" or "shutdown" it . In my design , "java -jar server.jar" is just like the command "svrmgrl" and lead you begin to manage the server . "start" or "shutdown" is just like the "startup" or "shutdown" command . These command is input in the server mange console and not like the bat files which used in OS .
[ March 30, 2003: Message edited by: Zhou Can ]
In my assignment , I design the server as a manage console using shell like many other server software (apache). In it , you can type "start" to start the server, "shutdown" to shutdown the server and so on . But after you run the command to running the server program , you will be noticed to start the server . If ignoring such starting action , the server won't answer the client's request . Does this design disobey the instruction ?
Q1 : Explain why your application will perform well?
THis question is too ... ; IMHO , i don't know how to answer it . What does the grader want to know ?
Q2 : Do you think your application is implement as per of MVC design pattern ?
What is the "as per of" means ?
In server side , we need a client ID to identify who lock a record . So , we must supply a way to produce the client ID . How about your ways ?
I use the client side machine name . Is it OK ?
Hello , everybody . I meet this problem when i test my assignment in Solaris platform :
1: the position is not set as what i want .
2: the components is black after some other program in front of it .
But , these problems have not appeared in Windows palteform . Could u tell me why . Thanks .
BTW , this is my codes to show the JDialog :
class MyDialog extends JDialog{
...
...
public void showDialog(){
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
Dimension frameSize = getSize();
if (frameSize.height > screenSize.height) {
frameSize.height = screenSize.height;
}
if (frameSize.width > screenSize.width) {
frameSize.width = screenSize.width;
}
setLocation((screenSize.width - frameSize.width)/2, (screenSize.height - frameSize.height)/2);

SwingUtilities.invokeLater(new Runnable(){
public void run(){
toFront();
}
});
pack();
repaint();
setVisible(true);
}
Thanks , Eric .
With ur help , I have solved that .
My online help is implements by using the JEditorPane which loads user manual text file .
In local database model , when i use online help , all is OK . But in remote database model , when i use online help , this error message appear:
Exception occurred during event dispatching:
java.security.AccessControlException: access denied (java.util.PropertyPermissio
n user.dir read)
at java.security.AccessControlContext.checkPermission(AccessControlConte
xt.java:272)
at java.security.AccessController.checkPermission(AccessController.java:
399)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:545)
at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:12
78)
at java.lang.System.getProperty(System.java:560)
at java.io.Win32FileSystem.getUserPath(Win32FileSystem.java:259)
at java.io.Win32FileSystem.resolve(Win32FileSystem.java:275)
at java.io.File.getAbsolutePath(File.java:392)
at suncertify.client.HelpContentsDialog.<init>(HelpContentsDialog.java:2
7)
at suncertify.client.ClientCTRL.showHelpContents(ClientCTRL.java:299)
at suncertify.client.ClientCTRL.actionPerformed(ClientCTRL.java:337)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:14
50)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Abstra
ctButton.java:1504)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
.java:378)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:250
)
at javax.swing.AbstractButton.doClick(AbstractButton.java:279)
at javax.swing.plaf.basic.BasicMenuItemUI$MouseInputHandler.mouseRelease
d(BasicMenuItemUI.java:886)
at java.awt.Component.processMouseEvent(Component.java:3715)
at java.awt.Component.processEvent(Component.java:3544)
at java.awt.Container.processEvent(Container.java:1164)
at java.awt.Component.dispatchEventImpl(Component.java:2593)
at java.awt.Container.dispatchEventImpl(Container.java:1213)
at java.awt.Component.dispatchEvent(Component.java:2497)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2451
)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2216)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2125)
at java.awt.Container.dispatchEventImpl(Container.java:1200)
at java.awt.Window.dispatchEventImpl(Window.java:926)
at java.awt.Component.dispatchEvent(Component.java:2497)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:339)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:131)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:98)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:85)
Could u tell me what happened ?
My assignment firstly show a JDialog to config the connection to local or remote database ( at this time , the main JFrame is not visible ). But if i click other program ( even DOS console ) before the JDialog appear , the JDialog will not be shown to user . I think there may be some things wrong with the setting of this JDialog's Z-order . please help me . BTW , i set the JDialog shown modally.
I have finished my assignment for near a month . Recentlly , I read many tips about MVC , but I have not considered it in my design . I hold all view , controller , model of client in one class . Now ,I found it a very big project to use the MVC design pattern to seperating the one client class . So , I want to know if it is OK to avoid the MVC in client class . Of course , this pattern is used in the JTable .
If we must use MVC , which way in the following is better ?
1: One Controller to control all view .
2: Each View with a controller .
I am from China . Connect with me .
I have finished my assigment for near a month and am checking it now.
I use these two command line to start the server :
java -Djava.rmi.hostname=localhost -Djava.security.policy=suncertify.policy server.jar
java -Djava.security.policy=suncertify.policy server.jar
Both results are correct . Which one should i take ?
In my design , after ur pressing "Search" and "Book" button , A new thread is created and begin to run , some action such as searching database and book flight is done in those threads . But i found that using no thread is a better way to take , and the corresponding cost is that you can't take the "cancel" action to the thread .
Which way is better ?
Thanx...
Need i code sth in the server to clear the bounded objects when some client crashed ?
How to cancel the action of booking by pressing the "Cancel" button ? Is only interrupting the booking thread enough?
It means that the left seats number is not right .