I did it for my SF2CE and MAME cabinet with an IPAC2 and signal relays.
You have to use relay to switch from the IPAC and JAMMA for all your use buttons and controls.
When the PC/MAME is OFF the JAMMA is running when the PC/MAME is ON it switch to the IPAC2.
I also use signal relay for the video(RGBS) and audio with an external AMP to switch from MAME to JAMMA.
I cut the power of the JAMMA board with a relay when MAME is on.
It takes lot of wiring but it work very well. I tried to upload photos but it failed
I think you can plug your buttons in parallel (IPAC+JAMMA) if you don't cut the power of the JAMMA.
I didn't go with this option because I don't want my JAMMA to be running while MAME is on, I want to preserve the SFC2CE board.
Good luck with your project.