Cong Yu

Greenhorn
+ Follow
since Feb 28, 2010
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 Cong Yu

the HelloUserClient is not a container managed component when you run it as a java application, so the @EJB annotation doesn't work here because DI is not enabled outside the container. Instead, you must use a JNDI lookup to retrieve the EJB.

here's the example code in the main method
I recieved the email this morning that I have passed the SCJD exam, I am very glad because before the preparation of this test I have rare experience in the real software development, but through the 2-monthes effort, I really learn lots of things those are very helpful to me in the future.

I want to thank this forum most, because every time I met some difficulties, always can I find many threads dicussion them, and the arguments are also very interesting, it makes me think deeper about each prolem.

This is my first post here, because as I said above, I can always find the answers quickly using the search engine so I didn't make any new threads. Now I have passed the exam, and I think I will still go back to this place sometimes, hope to give some useful advices to other people. Here's my main choices in the assignment:

database layer
-using data cache, loading all the records into a Map when the application starts
-defining the recNo according to the order of appearance of the record in the database file
-using String[] to represents each record, because this layer should have no knowledge of the business logic
-using the wait()/notifyAll approach to handle multiple requests
-applying singleton pattern and synchronization of methods to make the Data class thread safe
-creating a DatabaseAccessException to wrap all the exceptions in this layer

business layer
-choosing RMI
-implementing a thin client, puting the book and search method on the server side
-creating a Room object, and puting the coverting method(toStringArray(Room) and toRoom(String[])) inside this class

GUI layer
-using MVC pattern
-creating a room info dialog, when you click the book button, this dialog will be present to help you complete the info and finish the operation

Finally, thanks all you guys, thanks this forum!
9 years ago