Suppose I invented some clever way to manufacture transistors and don't disclose it (keep it a trade secret). I start a company and start producing and selling transistors without telling the public how exactly I manufacture them. Every employee and contractor signs an NDA and never discloses my invention to third parties.
Then someone else independently discovers the same way to produce transistors and patents it.
Now what? Am I now in violation of their patent? How are such cases typically handled?