Oregon is a castle doctrine state, which means that a homeowner or property owner does not have the duty to retreat from protecting themselves, family or property if the premises is in their legal possession.
In general though, one should not think of castle doctrine as authorizing you to shoot a burglar or home invader, rather you should think of the law as authorizing a defense in court to such an action.
Ideally the armed and alert homeowner who catches an intruder would hold him or her at gunpoint until the police arrived. Of course, in reality, many such situations are far from ideal.
If you do shoot, and subsequently kill an intruder, you can expect a deadly serious investigation by the police and the district attorney into whether your claim of self-defense and castle doctrine is proper.
Moreover, remember that the DA can still try to put you on trial and force you to prove it yourself to a jury of your peers, causing months or even years of legal headaches, finances, and anxiety. If for example, you shot a burglar in the back, that could be evidence that you could not reasonably fear for your life at the time you fired.
The bottom line is that although castle doctrine says you do not have to retreat in your home before defending yourself or property with deadly force, you should still try to avoid shooting anyone, even an intruder, unless you are in imminent danger of death or serious harm.