These are different applications but are web modules inside the same EAR.
Now, I'm using two separated Tomcat instances running in different HTTP ports and AJP connectors, but I want to move to EJB and share application logic through web applications. Also I want to use Local interfaces only.
Francisco Sariego wrote:I need to know if is possible to deploy an EAR with two (or more) web modules in the same context-root name but in different ports.
I'm not sure if you can set up two connectors with different ports. You should try that. I don't think you can use virtual hosts to set up different ports, just domain names. If you can, I would just use virtual hosts and set up different subdomains: a1.myhost.com, a2.myhost.com.
Javid Jamae wrote:What exactly are you trying to accomplish?
Thank you so much. I'll try to explain.
We have 2 different applications running in one physical server. Each application is running in a different Tomcat. Both applications are deployed to the ROOT context (/) and use the HTTP and AJP connectors. We use one Apache with mod_jk acting as a proxy for the two applications. We use Apache Virtual Host and Workers are configured for each application depending on the port.
To sum up,
In the physical application server (with the 2 Tomcat) we can access to:
We move to a Java EE Application Server. We use EJB and probably Seam (and JPA, Hibernate Search... we are training on this). The "old web applications" are refactored and share application logic through an one or more EJB modules. All are packaged in one EAR and use only Local interfaces.
All the "old URLs" should work. We also want to use Apache server (static files, logs, load balancing) in the other machine.