Jane Wang

Greenhorn
+ Follow
since Mar 07, 2002
Merit badge: grant badges
For More
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 Jane Wang

Hi all,
Does anyone know that whether the latest weblogic support concurrent client access to one specific stateful session bean?
21 years ago
Thanks very much!
I try registry.rebind instead of Naming.rebind and it works.
Question is why?
Hi, my problem is that i cannot use any other port number besides 1099. If I use other port number, an exception will thrown to say:


Connection refused to host: 218.244.114.87; nested exception is:
java.net.ConnectException: Connection refused: connect


AND my code is
Dear all,
Recently I try to bind the RMI server with other port rather than 1099, but it fails with: Connection refused to host: 218.244.114.87; nested exception is:
java.net.ConnectException: Connection refused: connect
the code for starting server is like below
try {
java.rmi.registry.LocateRegistry.createRegistry(port);
} catch(RemoteException re) {
Util.log("Create Registry error.");
re.printStackTrace();
}
try {
FBNServer server = new FBNServer(db);
// Bind this object instance to the name "FBNServer"
Naming.rebind("FBNServer", server);
...} catch(IOException e){}
The exception thrown in the second try block.
Dear all,
For the deprecated method, the API suggested two ways to replace, one is using the system default encoding another is using a specific character-encoding name.
My question is which one to use is appropriated?
Thanks.
Now I use a version of java 1.3.1_03-b03, i don't know whether it is a beta version. What does the '-b03'mean?
Dear all,
I start my RMI server in dos with command line. Now i should down server just by CTRL+C, is it ok?
Thanks.
Thanks for the reference.


Nobody can tell whether you are using the Abstract Factory or Factory Method pattern unless you tell us how are you instantiating the DataAccess object


There is an attribute named db in LocalDataAccess and RemoteDataAccess. For LocalDataAccess, db connects to local data file while for RemoteDataAccess, db connects to remote data base. A class named Service has an attribute named db of DataAccess Interface,when user chooses the connection mode, a method in service will instance the specific child class.
[ September 11, 2002: Message edited by: Jane Wang ]
[ September 11, 2002: Message edited by: Jane Wang ]
I use the RMI to implement the remote connection. And I lock the db record in db level. I just use a Vector to record which record is been locked, if it is locked, then wait for the release.
I read some of the topics and find some people handle the client id when lock. For my understanding, the database should know which record is locked but do not care who locks it. Since all client follows lock->read->modify->unlock senario, no other client can do the job from read if it doesn't have the key.
In my design, I create a DataAccess Interface, two classes LocalDataAccess and RemoteDataAccess implement the interface. The LocalDataAccess passes on the calls to Data while the RemoteDataAccess passes on the calls to remote interface.
My first question is: I believe I use the Factory pattern but I am not sure it is Factory Method or Abstract Factory ? Because I have some confusion on them.
My second question is: is there any other design patten appear in my design?
If you have read the posts above, you will find DataAccess is really an interface.
And as I know, A class or interface can only extends one Class or Interface
Will it have an Error ?


public interface RemoteDataAccess extends Remote, DataAccess
{
// no method inside it
}


[ March 26, 2002: Message edited by: Jane Wang ]