Jane Weil

Greenhorn
+ Follow
since Mar 04, 2003
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 Weil

simpler is better. I believe you implementation is too much complexed.the judge doesn't like it.
Peter,
I actually get those fields from FieldInfo. I just gave the example in the post.
Thanks a lot for the kind remindering
Lev,
After I read the regex tutorial, i implemented the cretariaFind with regex, the regex i figured out as following:
</snip>
because the values are string,i used .* Is that right?
[ March 19, 2003: Message edited by: Max Habibi ]
FBNServer is responsible for two things:
1. create Data instance to opent the databse
<code>
db = new Data("./../classes/suncertify/db/db.db");
</code>
2. create LockManager
The two instances will be passed to factory implementaion, and in turn passed to RemoteData implementation.
When the server is terminated, i think the database will be automatically closed, because db instance is gone. If this is not right, please tell me where to close the database?
FBNServer is responsible for two things:
1. create Data instance to opent the databse

<code>
db = new Data("./../classes/suncertify/db/db.db");
</code>
2. create LockManager

The two instances will be passed to factory implementaion, and in turn passed to RemoteData implementation.
When the server is terminated, the database will be automatically closed, because db instance is gone. If this is not right, please tell me where to close the database?
Also, it says "the program must allow the user to specify the location of the database"
How come a client user to specify the location of backend database. Anyway, we just have one databse db.db, does the user has any choice?
Poorna,
Since local implementation is stand-alone, there is only one client, so we even don't need to make db static
Hi Mark,
According to your explanation to others, seems like my above solution is right? Is it? thanks.
-------------------------------
Also I am of the advocate that since local mode is stand-alone, there is absolutely no need for any locking since the records would be locked by the same client anyway. There is no contention or concurrency here for the records.
---Mark
--------------------------------
Hi buddy, my draft design is finished, I'm taking RMI to implmenet remote. I'm just using plain java class to implement local, if you guys think it's all right, I will continue using it, because I'm not sure if it is OK.
1. local design:
interface FlyByNightLocalBroker which is using same methods as Data
public class FlyByNightLocalBrokerBean implements FlyByNightLocalBroker
in its constructor, I use
<p>db = new Data("./../classes/suncertify/db/db.db");
to connect to database.
client side:
public class FlyByNightLocalClient
I simply use
<p>FlyByNightLocalBroker flyByNightLocalBroker = new FlyByNightLocalBrokerBean();
to get server side reference.
An outstanding issue is each client thread will create a database connection.
Is that OK?
thanks a lot.