This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Two systems on  one tomcat 6 server. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Two systems on  one tomcat 6 server." Watch "Two systems on  one tomcat 6 server." New topic

Two systems on one tomcat 6 server.

huu Daudi

Joined: Nov 09, 2011
Posts: 3
Hello all,
Good day.
I have the following scenario.
System 1:
Database: postgresql 8.4
application server: tomcat 6

System 2:
Database: Postgresql 8.4
Application Server: Tomcat 6:

These system to be able to exchange data.

Then I would like to install it to use one postgresql 8.4 and one tomcat 6.all these run on the same machine but different system.

Is it possible?
Please any help appreciated
Tim Moores

Joined: Sep 21, 2011
Posts: 2409
What do you mean by "system"? It's certainly possible to have two instances of Tomcat running on the same machine (or one Tomcat instance serving multiple web apps under multiple domains and/or URLs), all the while accessing multiple DBs running on the same DB server. Maybe you can provide some more detail about what you're trying to accomplish.
huu Daudi

Joined: Nov 09, 2011
Posts: 3
Hello Tim,
Thank you for your response.
By system I mean web based applications.Two web application system-one tomcat server and one db the issue here how to create the db1 for web app 1,db2 for web app2.
thank you

Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42956
What's the problem in having separate web apps use separate DBs? Creating the DBs?
huu Daudi

Joined: Nov 09, 2011
Posts: 3
The problem is I want to use one machine for both systems.So how to create postgresql db for each after creating two tomcat instances.
thank you in advance
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16901

You can put as many Tomcat instances on a physical or virtual machine as you have memory to cram them into, although once you have more Tomcats than CPU cores, they won't make optimum use of the hardware.

You can also put multiple postgresql instances on a physical machine, but that's pretty rare. It's far more common to have one instance and multiple databases or schemas within that instance. In fact, it's very common to have only one (or a few) postgresql servers for an entire shop and have all the apps use the central servers, regardless of what machine the application itself resides on.

Customer surveys are for companies who didn't pay proper attention to begin with.
I agree. Here's the link:
subject: Two systems on one tomcat 6 server.
It's not a secret anymore!