I'm using Ubuntu 11.04. There is no notification generated when an audio jack is connected/disconnected.
Is there any method to get such a notification?
You may use Jack Sense if it has an interface you can poll but you soundcard driver must support it. Details are scarce on Jack Sense but you can find an interesting discussion about here: https://lists.ubuntu.com/archives/kernel-team/2011-November/017692.html
You may be interested about the list of drivers supporting Jack Sense: http://www.kernel.org/doc/Documentation/sound/alsa/HD-Audio-Models.txt