... I specified a contract in the Javadoc that calls for any potential users of the locking API to invoke lock/process/unlock as a sequence within the context of a single method call which guarantees it will happen within a single thread of execution.
... RemoteServicesImpl extends UnicastRemoteObject and implements RemoteServices. It has 2 parts, the implementation of RemoteServices (i.e. the 2 Services methods) and static getServices methods that allow the clients to get a Services instance that is either an RMI server for the Network Server application functionality or its stub for the Network Client application functionality.
...Since all of the locking occurs in a single method call in the Network Server's JVM, there is no need to worry about the RMI connection dieing in the middle of a locking operation.
did you have cookies in your lock()/unlock()/... methods provided by Sun?
Is Contractor class neccessary? Is It means good OO design? What is the benifit to use this class? How about just use a string array String record to represent the record data and trasmit it through networking? Because string array is serializable, and it is faster and easier to implement. To use Contractor class, you have to convert it to a string array or convert string array to Contractor back and forth sometimes.
I used a Contractor class to put an O-O framework around the String arrays that represent the record data.
Is Contractor class neccessary?
Is It means good OO design?
What is the benifit to use this class?
How about just use a string array String record to represent the record data and trasmit it through networking?
Because string array is serializable, and it is faster and easier to implement. To use Contractor class, you have to convert it to a string array or convert string array to Contractor back and forth sometimes.
also use a string array as the return type. The data can be transmitted directly from db to table model without converting. I don't know why many peple use a class Record. Anyone has a good explanation?
public String readRecord(long recNo)
Originally posted by Louis Tong:
Using Swing/AWT is a must? can I use SWT instead of Swing?
Originally posted by John Stone:
My Contractor service in B&S is also singleton. The reason is, that it has no instance attributes, so there is no need to have mutltiple instances, because they would be the same.
Originally posted by John Stone:
Yes, it would harm in my case.
In my implementation each contractor service creates Data class (as its data source), and my Data class states, that there should be only one instance of Data class per one db file. As the solution I made service singleton.
From singleton def. on wiki:
and I can interpret that coordination as access to one instance of Data class.
Originally posted by rinke hoekstra:
hmm interesting sollution. So your Data is not singleton, in the sense that it does not enforce only one instance, but because your service is singleton, and because it is the only one having an instance of Data, there will be automatically always one instance of Data.
However, here you make the assumption that it is more likely that the IT Manager would want to extend the Data classes, rather than the Service functionality.
originally posted 11/12/2003
Grary Stimon wrote:Hi Ken,
I've found your various writings/references on RMI and B&S very helpful...
Did you return a TableModel or some other type useful to a GUI implementation from your book or search methods?