Skip to main content

Unable to bind Web service in EAR to specific virtual server

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
1 reply [Last post]
schmke
Offline
Joined: 2005-12-23

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.

Thanks!

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Kevin Schmidt

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 in the EAR 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.

Thanks!

NextGate
Kevin Schmidt ■ Director, Product Management & Marketing
p: +1-626-400-6008 ■ m: +1-425-390-4786 ■ nextgate.com
Registry solutions for efficient health information exchange

IMPORTANT WARNING: This email (and any attachments) is only intended for the use of the person or entity to which it is addressed, and may contain information that is privileged and confidential. You, the recipient, are obligated to maintain it in a safe, secure and confidential manner. Unauthorized re-disclosure or failure to maintain confidentiality may subject you to federal and state penalties. If you are not the intended recipient, please immediately notify us by return email, and delete this message from your computer.