The names of those involved had not been released but police said all four were Vietnamese, The (San Jose) Mercury News reported. The two wounded men were reported in stable condition, the newspaper said.
Police spokesman Sgt. Mike Sullivan said one housemate phoned police about 5 a.m., saying he had been shot by a roommate. A second phone call came from a second wounded housemate who made it a convenience store.
The first victim was found outside the front door by responding police officers, who then heard three or four shots coming from inside the house, Sullivan told the Mercury News.
Before police entered the house, they set up a barricade and evacuated neighbors. Before long, they heard from the fourth housemate, who called from his hiding place in a closet.
He stayed in touch for the next three to four hours until his phone went dead. Officers eventually entered the house and found the shooter dead.
"It couldn't have ended any better for us," Sullivan said.