christian combarel

Ranch Hand
+ Follow
since Aug 04, 2007
Merit badge: grant badges
Biography
SCJP 5.0
For More
France
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by christian combarel

Hi all,

I have some troubles using the Logger class to display different kind of messages ...

In a first test I tried this snippet :


I obtained (only) the following result :

Jan 7, 2009 11:07:55 PM api.DataTest testLogger1
INFO: Info message
Jan 7, 2009 11:07:55 PM api.DataTest testLogger1
SEVERE: null



Then, I searched through olds topics and found a post from A. Monkhouse Changing log level
From this example, I wrote the second snippet :


This time, I got this :

Jan 7, 2009 11:09:10 PM DataTest testLogger
FINER: ENTRY 10
Jan 7, 2009 11:09:10 PM api.DataTest testLogger2
INFO: Info message
Jan 7, 2009 11:09:10 PM api.DataTest testLogger2
INFO: Info message
Jan 7, 2009 11:09:10 PM api.DataTest testLogger2
SEVERE: null
Jan 7, 2009 11:09:10 PM api.DataTest testLogger2
SEVERE: null
Jan 7, 2009 11:09:10 PM api.DataTest testLogger2
FINE: This is a fine message
Jan 7, 2009 11:09:10 PM DataTest testLogger
FINER: RETURN 20



So this time, there are the expected messages + the messages I got with the first snippet

Does anybody could tell me how to correctly use that class without redundant or missing messages ?
Hi,

1) Select a database in the same machine and bypass the networking
2) Set an IP Address and a port to be used for networking (Not selecting where the database is in the server side).



You're right !

... it must also accept an indication that a local database is to be used


Just indicate in your connection GUI that the database is a local one (in my opinion)
Hello,

my understanding was to let all Threads reading operations at every time every moment and just to lock when writing over the file (create, update, delete) and for update and delete operations to also lock the record getting changed.



Well, this is exactly what is required from Sun, in the DBMain interface for the lock method.
Hi !
It's not a stupid question !
Programs that access the database are the client threads. Each thread processes a client request (a search or a booking operation).
With URLyBird (as with most of the client-server systems), the end-client is the GUI.
Of course you can have many clients (many GUI) that want to access the database in local or networked-mode.
So you have to make sure that a write operation for a given record at a given time is allowed to one and just one thread.
Hello, Jerry
In the RMI solution, each client receive a different instance of the DVDDatabase class.
This is a mean to identify the client on the server side for reserve/release operations, as a thread is not linked to a client.
In the "ReservationsManager" class, a Map maps UPCs with DvdDatabase instances.
Jerry,
Wouldn't it solve your problem if you write something like this :


In the controller, you get a DBClient no matter it is a "remote" or a "local" one. Am I mistaken ?
Hi,
Why don't you use a "java.util.Properties" object ? You could use friendly methods such as "load", "store", "getProperty", "setProperty".
Hi,
I'm not really sure to understand your problem : you say that DBClient and remoteDB are not compatible but remoteDB "IS A" DBR wich "IS A" DBClient ?
Why do you have two interfaces : DBR and remoteDB, a unique interface like "remoteDB extends DBClient, Remote" shouldn't be sufficient ?
Hello,
I haven't started the GUI yet, but here is I consider to to :

All parameters like database location, server's address/port are read from the suncertify.properties file. Default values are provided but the user can overwrite them via the connection GUIs.
For the properties file, plain text format should be the best option, given the simple information to store.

Chris
Sorry for my previous post, I've just seen it's about B&S and not URLyBird !
Hello all,
Are you sure that 1 is the right value for a deleted record ?
In the spec we can read :

0xFF implies deleted record

, yet 0xFF = -1 ...
(I'm currently working on UB-1.3.3)

Chris
Hi,
The "-C classes ." tells the jar command to go in the "classes" directory and include to the archive all the files and directories that are present.

Chris
Hello,
I just parse once the file header. I do that when constructing the database management system. At this moment, I also check that the cookie value is matching the one I have hard-coded.
Hi Payal,
Don't worry about reusing a deleted record. It's not a requirement, just a hint.
For the delete method, it is just said that the record is now available and not it must be used for a new record. It's my interpretation ...
However, implementing that functionality could improve your score (may be !).
Anyway, explain your choice in your choices.txt
Hi,
If you instanciate Test20 using the Test20(int i){} constructor, the A3() will be called. As A3() declare an Exception, it must be declared too with Test20(int i){}.