Unable to bind Web service in EAR to specific virtual server
I have an application that is made up of several Java EE modules including one EAR and several WARs. I would like to make the Web applications in the WARs available via one virtual server on port X and the Web services available via another virtual server on port Y. The scenario is that the Web apps should be available outside the firewall while the Web services should not be. By having them on different ports, the firewall can be configured to accept and forward connections to just the port the Web apps are on.
I have configured my HTTP listeners and virtual servers, and can successfully deploy the WARs to use a specific virtual server (specify it on deployment or choose it in admin console or using asadmin), but I been unable to determine how to deploy the Web services in the EAR on just a specific virtual server/port. Neither specifying a virtual server on deployment nor specifying it in admin console seems to be honored, and instead the Web services are bound to and available on all virtual servers and ports.
So, is there a way to achieve what I want and have Web services in an EAR bound to just a specific virtual server or port?
I know one solution would be to refactor the Web services out of the EAR and put them in a WAR which I can then bind to a specific virtual server, but I'd like to avoid doing that if possible and it seems like there should be a way to do what I want.
Note that I am using GlassFIsh 2.1.1 and have not tried this with v3 and would prefer to get it working with 2.1, but if there is a solution using v3 I'd like to know too.