Win a copy of Java by Comparison (eBook) this week in the Java in General forum!

Margarita Babkova

Ranch Hand
+ Follow
since May 09, 2012
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 Margarita Babkova

To avoid subjectivity, I think they have a standard test plan with bunch of automated test cases, and check every Must requirement in the instruction doc against given submission. It is easy to test our code in multi threaded environment using IBM Rational performance tester, and they will know if dead lock occurred.
5 years ago

Roberto Perillo wrote:Congrats for the achievement, Margarita!

Margarita Babkova wrote:A lot of time was spent on going through the book, Albrto Perillo paper, and this site.

Who's this Albrto Perillo?

My sincere apologies to Mr. Roberto
Shame on me for making such a mistake, I think I memorized your paper word to word by now after reading it so many times!
5 years ago
Hi all,

I resubmitted assignment October 15(another $300 after Oracle failed me first time - I submitted class files instead of java files). On October 24 Pearson site shows PASSED! Score is average, and they did not show the details. But for the beginner it will do.

It took me 4.5 months to complete assignment, and keep checking and checking again and again (still made the huge mistake).
A lot of time was spent on going through the book, Albrto Perillo paper, and this site. The combining experience of all people who went through the same process is huge value for any one who considers this certification.

Taking the mandatory course is next. Not sure I can sell an idea of paying for it to my employer, but this is a different story.

Thank you all.
5 years ago
Hi Roel,

my thought process goes like these, and it is only a theory.

1. Open book chapter 6, find line : Rmic –v1.2 sampleproject. remote.DVDDatabaseImp
2. Modify name to suit own, run it –> will generate stub.class
3. Create new runme.jar – that will include this stub.class
4. Test it.
5. Create new submission jar that will include this new runme.jar
6. Run your test file again.

Thank you
I do not have access to the Ant, but I created new submission jar and ran Roel's against my unjarred the submission jar.
My assignment is UrlyBird 1.3.1 and my user guide is bunch of html files, so I did just very light modification to the test file.

I put Roel's file in a totally different java project, default package, and just provided path to above folder on my desktop. In order to access DBMain.class, RecordNotFoundException.class, and DuplicateKeyException.class
I had my actual Project on a build path.
and I had to add imports to the test file as well:

JUnit shows that it passed testRequiredDirectories, testRequiredFiles, testRequiredSources, testSourceRequirements (all four are green). So, in a sense my submission is ready to go.

Thank very much all.

But I still did not created stubs...-> and it means more updates, more testing, creation of another two jars. Not sure what to do, because right now my runme.jar work just fine, I tested it on three different computers (one server and two are network clients).

Frankly, I feel like taking stupid laptop to the nearest pond, drown it, and then cry.
But I might as well create new jar file, spend more money, and have couple beers to wash it down.

thank you all, i just hope people will learn from my mistake. I checked this jar 5 times and did not see anything wrong there...
Ok, I have to change title to the "Failed, know why and unbelievably stupid me..."

Per your two suggestions, opened my submission jar file, went to the Code folder, it had all my three packages, opened each package and to my horror each contains .class files and not .java files.
Good lord, it is very expensive error from my side.

Hi there,

after three weeks of waiting, i checked Pearson site and ... they failed me with only one sentence of explanation: Score: 0. "As part of mandatory requirement, the candidate is expected to submit all .java files for code evaluation. This is missing in this assignment."

Did I just spend$600 out of my pocket for this two lines evaluation?

The only thing that comes to my mind, is that I did not created stubs/skelletons for RMI. Common, it is java 6 for crying laud! I remember through many posts that it is not just me who decided to skip this rmic compiler.

I could not even think of anything else... did they even tried to run my executable jar? What if something much bigger?
Should I just pay more $$$ for resubmission, generate these stabs and do nothing else?

upset and furious,
I did the same, but was not really sure that it was most efficient solution...

I tired to make it work with tbl.fireTableDataChanged() inside Book methof of a Controller class - but it did not work.
For now i will leave it as it is (with the call to the search inside book method), because it does work.

thank you very much
I commented out this isCellEditable method from my model, and Added one JTextField next to the Book button and able to book room this way.
Outstanding: the Owner column does not show its new value untill I re-run Search.
But I will work on it.
Hi there,

I am working on user interface and I got a strange issue with the way my JTable works.

1. Let’s say I ran a normal search for all records and got expected results:
Palace Smallville 2 Y $150.00 2005/07/27
Castle Smallville 6 Y $220.00 2005/11/19 etc.

2. I select first row and type ownerId value 12345678 into column ownerID (isCellEditable=true for this row/column).
AND move focus from this cell, and put it back again on that cell.
3. Re-run the same search and somehow this owner id gets right into my hotel records, without using Book button or anything.
Palace Smallville 2 Y $150.00 2005/07/27 12345678
Castle Smallville 6 Y $220.00 2005/11/19

4.I could not even book the given room record, because it says that it is already booked – but I did nothing but typed ownerId.

I tried to discard changes with code lines below, but it did not help much.

if (table.getCellEditor() != null) {

What am I doing wrong?

Thank you
Thank you, Roel.

I read your suggestions and Roberto from the past about this setClientID business. As much as I like to go that road – I have to invest more time in to solving locking.
At my rate of progress, I better stick to initial locking design with references to the data instances. Get RMI use factory method to serve these instances and deal with thick client.
Greeting all,

I am lost and really need advice.
I finished work on my Data class with lock methods using reference this as to keep track of unique clients. I tested it with Roberto Perillo Test class (all worked like charm – Thank you very much, Roberto).
But the moment I start working on RMI – I decided that I do not really like fact that I will have to provide each client with own instance of data, and my client would be a ‘fat’ client. Yes, it took me awhile to finally understand what I was doing…

So, I decided to try different approach and keep individual client id in my LockManager class like

And then just have to call it from my Data class lock. So, my modified Data class got private field clientID and public setClientID method

But here is comes a trouble: I am not sure I am doing things right: when I ran the same Test class ( with sequence lock, update, unlock) - ALL WORKS FINE, but should I be using my setClientID method call in this Test class? Because if I do set it to the current thread id – I am getting dead lock...

I am planning to use setClientID method on a server side book method: book(){ setClientId, lock, update, unlock}, to make sure that my lock method gets unique clientID (long clientID=system.nanoTime().
I have to start working on RMI part, and settle on either locking approach.

thank you in advance,
ok i will try to implement db find method with all criterias and use AND instead of OR between elements.
Hi there,
I was working under find(Criteria[n]) method, and implemented couple scenarios, like:
1. if criteria has all null values – return all recNo from cache.
2. If criteria has only one real value and all rest are nulls -> return recNo matching single criteria.

But scenario when criteria has more than one not null value and potentially all values are not null puzzles me.
String[] criteria = {“Nice Place”, “My Town”, ” 2”, ”Y”, ”$200”, “2012/08/01”,null} ->

My interpretation of it is “select recNO from table where name=Nice Place AND city=My Town AND size = 2 AND price= 200 and etc.”
So, if database has hotel “Nice Place” in two locations: “My Town” and “Your Town”, only one record, can be returned, and only if , all rest criteria for size, price will match.

So, I have to create a count of internal matches between criteria and db record. So, if criteria has 5 values to search for – db record should have precisely 5 matching fields.

Is another interpretation like find any hotel with name =Nice Place OR location =My Town OR size= 2 OR price 200, etc will work?
Find in this case can return: x number of record Nice Place ( all different locations)
m number of record My Town ( all different hotels)
xx number of record size 2 ( all different hotels/ locations), etc
Any suggestion?

Thank you.