Is way used to mean the same thing in the next two sentences?

If I had my way.

A lonely way of life.
different meanings