Question: Has anyone had good experiences of talking direct to RPG programs running on a V5R4 iSeries machine from Java? If so, what are the recommendations of the community, and what pitfalls should I try to avoid?

From the various pieces of literature and spike solutions I have attempted it looks as though we can use ProgramCallBeans (either through PCML or xPCML), talking to the DataQueues (for asynchronous comms), or even JNI.

I'm looking for something that's robust, performant, quick to develop, easy to maintain, and easy to test (aren't we all!?!).

Answer: 
You should look at [JTOpen](http://jt400.sourceforge.net/). It is fairly easy to use that to do what you want to do. Here is an example someone has put together: [program call to as400 using jtopen](http://codenewbie.com/forum/java/1921-program-call-as400-using-jtopen.html)
We just use JDBC and stored procedures. The stored procedure calls the RPG instead of running SQL. I'm not an RPG programmer, but it seems like a very simple interface. DataQueues are OK, but they aren't as robust as something like JMS (no guaranteed delivery).