In fact, jboss could not solve your cross-domain requirement. Because the web-browser make the cross-domain problem.
When you first visit "exampledomain", the server will set a "proof(Jsession)" to you. Then when you visited "exampledomain" in second. The web browser will find the proof and send it to the same website.
However when you visit "someothername", your web browser do not think you visiting the same website. so it would not send that "proof" to server. Finally the server could not get the "proof" and get cross-domain data.
If you want solve this, you need to find some other method, like "jsonp". You can search it and find better answers.