• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Different applications in the same context-root name

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.e:

http://localhost:8080/web-application
http://localhost:8082/web-application

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.

Can I do this with JBoss AS?

Thanks In Advance!
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Perhaps a virtual host will help you do what you want.
 
Author
Posts: 198
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.

What exactly are you trying to accomplish?
 
Francisco Sariego
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Javid Jamae wrote:What exactly are you trying to accomplish?



Thank you so much. I'll try to explain.

Actual situation
------------------

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:

http://server-name.domain.suffix:8080/ (HTTP for application-1)
http://server-name.domain.suffix:8009/ (AJP for application-1)
http://server-name.domain.suffix:8081/ (HTTP for application-2)
http://server-name.domain.suffix:8010/ (AJP for application-2)

In the physical web server (with Apache) we (and everyone in the Internet) can access to:

http://application-1.domain.suffix/ (port 80, HTTP)
http://application-2.domain.suffix/ (port 80, HTTP)


Future ideal situation
------------------------

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.

Thank you so much.
 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Has anyone found a solution to this problem?

I'm trying to achieve pretty much the same thing, without using virtuat hosts.
 
This. Exactly this. This is what my therapist has been talking about. And now with a tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic