I would recommend to use both server with AS5.1.
There are some difficulties with:
- Transactions, you cant have Tx span both server/application
- Security, works only if the applications are not JAAS secured (or you might handle the credentials in your application which is a mess)
- classloader, because of different client libraries that you have to use
So I give up to get this working because I can't get all things working