Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!

Jar Jaquiso

+ Follow
since Apr 20, 2006
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Jar Jaquiso

Hello Vaishali,

You may need to call repaint() on your JTable.

Hello Musab,

I think there is no need to try to hide the lock/unlock methods on the database layer, after all they are part of the public DB interface.

It's the business's Adapter class who will be hiding this methods to the GUI.

About the sequence of doing things (lock-update-unlock) I didn't mention it in my DB interface Javadoc comments but I did force this use in my DB interface implementation class by validating in the update and the delete methods that the record to modify is effectively locked. If it isn't locked I throw an exception:

My DBException is wrapped in a DBRuntimeException as the DB interface does not provide a nice exception treatment. My business adapter can then recreate the original DBException from the enclosing DBRuntimeException.

[ August 30, 2007: Message edited by: Jar Jaquiso ]
Hello Musab,

The Adapter an the Proxy patterns differ in that the proxy has the same interface as the proxied class whilst the adapter has a different interface.

A Protection Proxy is used to manage access to the proxied class's methods, by user for example. I don't think you'll need a protection proxy for this assignment as every user can access all the application's functionality.

Hello John,

I think you're being to strict on the requirements. Remember that the specifications also state that This document deliberately leaves some issues unspecified. So it's up to you to provide a good solution when in doubt.

I know that many ranchers specified extra requirement, that record which is uptated/deleted should be locked first and are probably avoiding problem I described

Others have done this 'cause this is the obvious solution to the problem.

Best regards,

Hello Musab,

I don't think it would affect performance but personally I prefer having a static getInstance() method.

If you have all your methods static you lose the possibility to subclass thus resulting in a not-so-flexible application.

Anyway I suppose it's a matter of taste. I personally think that it's nice to keep the possibility to subclass just in case.

Hello Musab,

The same problem was discussed at this post, give it a look.

To resume, the idea is to re-validate each record when you retrieve it after the find() method.

Hello Musab,

In my design the DBMain implementor has default access as you said. In the suncertify.db package I also created a DBMainFactory class which is a singleton that has a public method that returns a DBMain object based on a parameter that is provided by it's clients.

My business interface is in the package and retrieves the DBMain object via the DBMainFactory class.

Hello Ameen,

I've been programming since year 2000.

13 years ago
Hello uzma,

I've answered your question at Version control with CVS, as it seems more appropriate.

13 years ago

This post is in response to uzma ali's question at Passed (399/400). The post has been transferred to Sun Certification Results and it doesn't seem correct to answer there.

So lets get onto the subject. In my project I set up version control with CVSDude (

CVS is more like a team tool but it's also handy for lone developers. And it's a good tool to know about when working in a real life project. It allows developers to keep track on changes done to source code.

When working with CVS you have a client and a server. Eclipse ( comes with a built in client so if you stick with Eclipse you only need a CVS server. A very easy way to get a CVS server is CVSDude. They offer a free account with some restrictions but it's good enough for the SCJD project. You may find information as how to connect to the CVS server from Eclipse at

Other IDE's may also have a CVS client built in, have a look at your preferred IDE.

CVS is a worldwide used tool for version control so I do advise you to give it a look if you want to be proficient in real life projects.

Hello rinke,

About my network design the first thing to say is that I didn't expose the database interface.
I created a business interface and I exposed that interface's methods. This means that I didn't expose the lock/unlock methods of the database interface.

The client GUI operates via the business interface but is unaware about in which mode it is running (network or non-network). When the GUI is initialized I inject the correct business class, that is a business implementation when working in non-network mode or a business delegate when working in network mode.

I hope this helps you, it's difficult to explain without getting into too much detail.

13 years ago
Hello Srinivasan,

About your questions:

Did you realize are you going to get 399, before exam?

I was quite confident about getting a good score, I even thought I'd maybe make the magic score (400/400).

What targets you set and how you worked to achieve that.

My main target was to develop an application that I would be proud of.
This meant good planing and a very well documented application.
I used Eclipse ( as my IDE, built the deliverable file with Ant ( and I set up version control with CVSDude (
I also worked a lot with paper and pencil to clear ideas in my mind, I find quite useful thinking without a screen in front of me.

Oh, I nearly forgot. I didn't ask much at Javaranch but I did read from other people questions and this helped me a lot.

[ August 20, 2007: Message edited by: Jar Jaquiso ]
13 years ago
Well, as a matter of fact it has been quite a time ago that I passed but I think my conclusions can be of help to others.

Score: 399

General Considerations (maximum = 100): 99
Documentation (maximum = 70): 71
O-O Design (maximum = 30): 30
GUI (maximum = 40): 39
Locking (maximum = 80): 80
Data store (maximum = 40): 40
Network server (maximum = 40): 40

I didn't follow Sun's coding conventions so maybe I lost 1 point in General Considerations for that.

I didn't create a status bar for my GUI. Could that have made me lose 1 point in GUI? Maybe.

Documentation was a surprise, though I must say I did a darn good job there.

I had the B&S assignment.

This is an excerpt from my choices.txt file:

I've decided to design the application as modular as posible so that each layer of the application is aware only about the next layer of the application.

The database layer components are kept in the 'suncertify.db' package. This package is only accessed by the business layer.
The business layer components are kept in the '' package.
The user's interface components are kept in the 'suncertify.ui' package. These components provide their functionality via the business layer.
The network components are used only in a client-server enviroment. These components are kept in the '' package.

The data layer load's the data in memory and work's directly with this data so that read operations are very quick. Write operations have to update both the data in memory and the data file. The data layer is isolated enough as to change this behaviour in future if the application requires so.

And that's about all there is to it.

Best regards,

[ August 16, 2007: Message edited by: Jar Jaquiso ]
13 years ago
Hello James,

You can test the client/server functionality by just launching the server and the client on the same machine, and connecting the client to the localhost (IP

You can also install a virtual machine. Have a look at The idea about virtual machines is to install an operating system over another operating system, obtaining a virtual machine. VirtualBox is very easy to install and configure.

If you have connectivity problems with your virtual machine you can use a VPN (Virtual Private Network). An easy one to use is Hamachi. Have a look at

I hope this helps,

You can find your score detailed in the assignment upload/download web at
[ February 07, 2007: Message edited by: Jar Jaquiso ]