In my application I am using Apache web server and J Boss application Server.I want to deployed the war files on web server while ear file containing all services in Application server .Now my doubt is that how this ear file that is on the Application server will communicate to the Web Server.
Yes... You will have to access the JNDI Service running in Application Server by using the remote hostname and the port in which JNDI Service listens..
After JNDI lookup, you will get EJBObject Stub to access the Bean component...
Make sure if JBOSS Application Server allows the remote calls. If not, you will have to change the Security Permissions to get access to it.