Noticed a few people have viewed this so here's what I did in the end.
1) Write the actual functionality in an EJB as part of the application using JPA or whatever else.
2) Declare the local interface for the EJB within the plug in
3) call the ejb from the plug in module, you'll probably need a couple of plug in properties to specify where to look up the EJB
4) add a dependency on the plug in module in to the application.
This way the plug in and the application both reference the same local interface but you don't need any dependency from the plug in to the application.