We have created two EJB application’s and one web application in the following manner.
EAR contains two EJB’s
And Architecture is as following:
This Architecture is used in following two ways:
1. Web-App1 is calling EJB2 and EJB2 is calling third party web-app. This calling is working fine.
2. Web-App1 is calling EJB1 and EJB1 is calling EJB2 and EJB2 is having same call as defined in Case1 with third party web-app. In this EJB2 is able to connect to third party Web-App. Also third party Web-App is performing the task and sending the response back, but the EJB2 application is somehow unable to read the response and throwing “socket read time out exception”
Earlier we are using commons-http client with Multithreaded model, but also tried with Simple HTTPURL connection but in the both the ways it got failed.