ambrositti li

Greenhorn
+ Follow
since Apr 12, 2004
Merit badge: grant badges
For More
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 ambrositti li

Hi folks, just picked up the reference doc. from hibernate's homepage. Having gone through few pages and I have two questions wish someone out there could clarify for me.

1. Below are code segment from a utility class for opening and closing session.



My question is why bother with the 'ThreadLocal' technic. I cant see the intention of why coding it in this way. Is there anything wrong with using and straightway?

2. The doc. mentioned that there are tools provided to automate the OR mapping process. I wonder do those tools can actually handle every case perfectly? As a beginner, I know it's good to go through everything by hand. But I wonder how other people really do with it in the commercial development environment. Any inputs are deeply appreciated.
Hi, folks. Here is the partial spec of my first networking programming assignment.
GET: This message is sent from the client to the server, and contains the ASCII string GET followed by the newline character \n. On sending the GET message, the client waits for a return message from the server via the socket that connects them.
eg.
Client: GET
Server: GET: OK
A dog says woof
however, what i've got from the command line is like this:
Server: GET: OK
you see, the rest of the message(after the newline character) is missing. Could someone plz point me out what i did wrong. Thanx in advance.
below is the complete four classes i've come up so far and the text file(animalSoundData.txt) the server reads. it's all complied. please copy it to your own HDD and run it so you would know exactly what the problem is. thanx again!
P.S. i am sorry about the long post. please bear with me as i am desperately looking for the solution.
the server class

the client class

the protocol class

the helper class

the content of text(animalSoundData.txt)file:
dog:woof
cat:miao
cow:moo
snake:hiss
bird:chirp
[ April 12, 2004: Message edited by: ambrositti li ]