Olena Golub

Ranch Hand
+ Follow
since Jan 17, 2005
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 Olena Golub

WOW!!!
Hi Darya,
Heartly Congratulation !!!

Well Done!!! Keep it up!

Regards,
Olena.

p.s. It's a good motivation for me to upload my Project!
17 years ago
Hello Everyone,

In my design there is one DataShema class, that contains the information and the structure of the database file. I read the database schema, the name of every field in the database during the initialisation of the DataShema class. This class is the Singleton.
It contains one static method:


My interface that specified all methods that will be remotely called by the client contains one method, that returns an array of the name for every field:


All business logic is implemented in the DataAdaptor class. This class implements the getHeaderNames():


I didn�t throw any exceptions during the call of the getHeaderNames, any IOException, because the names will be read only ones during the Initialisation. How do you think is this a good design? Or should I read the fields� names every time when I call the DataShema.getFieldsName() method?
Thanks a lot for your comments and help!
Regards,
Olena.
Hallo Darya,


-doctitle title
Specifies the title to be placed near the top of the overview summary file. The title will be placed as a centered, level-one heading directly beneath the upper navigation bar. The title may contain html tags and white space, though if it does, it must be enclosed in quotes. Any internal quotation marks within title may have to be escaped.

C:> javadoc -doctitle "Java<sup><font size=\"-2\">TM</font></sup>" com.mypackage



You can find all javadoc option at
javadoc

Regards,
Olena
[ June 02, 2005: Message edited by: Olena Golub ]
Hello Everyone,

I have no any experience with the exception handling and I have some problems and questions about it. Could you help me?
How do you deal if the exception occurs during the find method?
In SUN�s Interface there are no exceptions defined in the find method. Do you throw the subclass of the RuntimeException or do you ignore it, if some exception occures in find() method?

For example, what do you do, if some IOException occures during the reading of all record for further checking of the record with criteria? Or after you read all records and no record was read from the database.
How do you handle it?

In Data I have two methods find(�) (original from SUN) and a private one getAllRecords(). In the find method I call getAllRecords() method, to receive all records from the database.



Thanks a lot for your help!
Regards,
Olena
[ May 31, 2005: Message edited by: Olena Golub ]
Hello,

I am a little bit confused about correct documenting of the exception with javadoc.
If I have one method that catches one exception and throws another one, what is correct way to document it with javadoc?


Is it correct to document with @throws only RecordNotFoundException :


Thanks a lot for your help!
Regards,
Olena.
Hello Matej,

Congratulations!! It's a very good score!!

What did you mean with


"overcomplicated" orphaned deadlock prevention.


? What was your strategy on deadlock prevention?
Thanks a lot for your answer!
Olena
17 years ago
Hello Matej,

Congratulations!! It's a very good score!!

What did you mean with


"overcomplicated" orphaned deadlock prevention.


? What was your strategy on deadlock prevention?
Thanks a lot for your answer!
Olena
Hello Everyone,


I read a lot of information that the Swing and AWT components should not be used together. I need to implement in my Java application that is based on SWING the possibility to draw graph and charts. I found that the Java 2D can be used for this. But it�s based on JDK 1.3 and based on the AWT components. And my application work with 1.4.
And my question is, are there are some Java libraries (from SUN), that I can use for drawing 2D graph and charts? Or can I use Java 2D with my Swing components together?

Thanks a lot for your help!
Regards,
Olena.
17 years ago
Hi,

try this:
http://java.sun.com/developer/techDocs/hi/repository/

there is also one free library of icons from eclipse, but I cannot find the link.

Regards,
Olena
Hello Everybody,

I am a little bit confused about exception handling. I have some question about it and I would very appreciate if you can help me!

1. If I have a method, that throws more than one exception. What is the right way to handle these exceptions? For example:
For Naming.lookup(�) there are three defined exception. What is the correct way to handle it? Catch every exception:


or catch only the main Exception:



2. Are there are some books, links with something like "best practice". Could you recommend me?

Thanks a lot for your help!!!

Regards,
Olena.
Hi Darya and Wei-ju,
Thanks a lot for your comments!


Darya,

Yep, I did not expect that I need more time. With full-time job it�s not so easy to make it faster
This preparation is endless
Hello All,

After reading some topics about this problem I decided to implement it in this way. But I am not sure if this is correct. Could you please say your opinion?

To make it more clearly I will divide my code in three parts:

1. The first part is Data access, represented by Data.
2. The second - the business tier, represented (e.g. for standalone) by DataAdaptor, that is the wrapper for Data.
3. Third is the GUI tier, represented by DataModel, that is a part of MVC.

The communication between this parts works in this direction:
{DataModel}.bookRecord(..) ---> { DataAdaptor }.book(..) --> {Data}.lock(..)

I defined two exceptions LockException and RecordNotBookableException that extend the RuntimeException.

In Data lock(..) I have following:



In DataAdaptor I reimplemented the book(..) method:



I don�t catch here the RecordNotFoundException and SecurityException exceptions that can occur also during the booking process. These exceptions I catch in Model.

And the in the Model I defined this code:

How do you think about this idea?

Thanks a lot for your comments!
With kind regards,
Olena
[ May 19, 2005: Message edited by: Olena Golub ]
Hello Everyone,

my locking method contains the following code:


What is the best way to handle this exception? 1. Throw the exception or 2. just write it to Logger?

My book method from the business layer looks like:


Could you help me?
Thanks a lot for your help!!!
Olena.
Hello everyone,

Do you implement the SecurityException by yourself or do you use SUN�s java.lang.SecurityException ?
Thanks a lot for your answers!
Regards,
Olena.
Hi Darya,

Do you use RMI or Sockets?

If you use RMI, you don�t need to give any IP Adresses, your need to use something in this way:


As you see, you need to give only the connection port.
As Frans said in another topic:

You do not need to specify the server address when you bind the object. It will be implicitly set.



After your have started this (server) on one computer, you can connect to this server from the same computer by entering only "localhost" and port, or connect from another computer, by entering the address or IP of the computer, where you have started your server and use the same port. You can connect to this server as to local server or as to remote server. It will be always the same code.

For standalone you don�t need to start server! (Folks, help me, if I am wrong).
Because the assignment says (You should have the same):


"� this mode must use the database and GUI from the networked form, but must not user the network server code at all �"



Regards,
Olena.
[ May 11, 2005: Message edited by: Olena Golub ]