Ireland or at least Dublin Airport is unique in that it has 'US Preclearance' so when you land you simply pick up your bags at the carousel and leave the airport as you've passed US immigration based in Dublin Airport.
This means if you're going to be denied entry it will probably be in Dublin which will make it a preferred airport of origin within the EU -- this is massively more convenient than getting stuck in JFK.
What jurisdiction extends where depends entirely on the agreements some diplomats must have worked out. When I travel between France and England for example the paper checks are at the point of departure and there are no more checks on arrival.
This means if you're going to be denied entry it will probably be in Dublin which will make it a preferred airport of origin within the EU -- this is massively more convenient than getting stuck in JFK.