Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!

Manik Saha

Greenhorn
+ Follow
since May 17, 2004
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 Manik Saha

Directly going to the Oracle database would bypass the business logic, IMHO that is riskier than using a screen scraper, especially for the awards travel.
I am currently working on Pt 2.

After reading through all the threads and discussions, I have decided to use a more simplified version of the definitions:

1. 1 flight is one take off and landing
2. 1 segment is one flight. A segment is created for the purpose of creating an itinerary.
4. User can select a departure and destination city, the system will work out the flights required to get him there. This could include more than 1 flight. Each stopover is considered a layover.
5. Each itinerary consists of a number of segments. User can choose to delete any segment and choose a new route (number of segments) for that leg of travel.
6. Pricing is done by adding up the pricing for all the segments. Discounts etc may be done after analyzing the segments.

IMHO the main objective is to have an architecture that caters for the simplest business scenario, but can easily scale to meet additional requirements and complexities that may be added in the future.

Essentially, follow the KISS principle.
I think the use case mentions that the customer can choose awards travel. In this case the frequent flyer system needs to be updated, hence it may not be considered a read only system.
I found the test at Harish's web site much better and it has explanations to all the questions, which is a great help.

http://www.harishramchandani.com/

Although if you complete all the tests from Java queries (http://www.javaqueries.com/) you'll find most of the questions are repeated.

However the javaqueries has some incorrect answers that seem to have been rectified in Harish's test above.
You can take the exam in any country, as long as you have a valid voucher. I bought my vouchers in Singapore, and did the SCJD in the US (Boston).

Uploading is online so it doesn't matter where you do it from.
Even I choose B as the answer. After I went through the answers, the only 2 reasons I could think of are
- DAO's make more sense when used with BMP entity beans (hence the question would read more like which type of beans would you possibly use DAO with)
- Stateful session beans would possibly instantiate 1 instance per usage (unless using some singleton DAO, which has another set of problems such as concurrency issues etc).

Anyone has other comments ?

Originally posted by William Ni:

What I found interesting is that the database file name reflects the magical cookie value. For my URLyBird 1.2.3 assignment, the db file is "db-1x3.db" and the magical cookie value is "00 00 01 03"; while my friend is doing the Contractor assignment, her db file is "db-2x2.db" and the magical cookie value is "00 00 02 02". Of course, this is a bad choice as no official guarantee is provided.



This IS interesting.. it matches my file too.. db-1x2.db and the cookie is 01 02..
In practice i guess that we should clear the table and add the new rows.

However for the assignment, since it is a reasonably simple implementation, I have created and added a new table model. Will I be penalized for this.

Appreciate your comments.. thanks.
Why dont u use RandomAccessFile instead ? For the skipBytes part, you may want to save it the first time you parse the file and then subsequently use it to access the records.

recordposition = (recordNo*sizeOfARecord) + skipBytes;

assuming recordNo 0 is the first record..


My implemention at server side only one instance of data class,and all clients share same refrence of data object through RMI.Currently, i synchronize both lock and unlock method.
My confusion is:
If synchronize a method, that means only one thread can access it at a time.Suppose a thread enter the lock method and wait a former thread to unluck a record,meanwhile,no other threads could access lock method.But our purpuse is allow all threads enter lock method and wait(if need) rather than wait outside lock method.On the other hand, multi-thread access single method may arise issues.What i should do or any other better solution?

Any comment?



Even I am doing the SCJD, so here's my opinion.

This solution is inefficient since clients wanting locks on other records have to wait. Actually this could be as bad as having a synchronization where the record number does not matter. Eg. Thread 1 takes the lock on record 1, Thread 2 tries to acquire the lock on record 1 but goes to wait inside sync. All other threads are blocked outside the sync method irrespective of the record number.
Passed w/ 90% after using this forum and the KR book for 2 weeks...

Thanks all who helped.
14 years ago