Forums de discussion
DB definitions in ROOT.xml and Portal-ext
G R Rajesh Babu, modifié il y a 9 années.
DB definitions in ROOT.xml and Portal-ext
Regular Member Publications: 161 Date d'inscription: 08/02/10 Publications récentes
Hello All,
I am able to see two different DB configurations, one is in ROOT.xml and other is in Portal-ext.properties as below and by this it is clear that DB declarations in portal-ext is for the Portal and ROOT is for tomcat.
1. Portal-ext.properties:
jdbc.default.driverClassName=oracle.jdbc.driver.OracleDriver
jdbc.default.url=jdbc:oracle:thin:@localhost:1521:xe
jdbc.default.username=Liferay_NEW
jdbc.default.password=Liferay_NEW
2.ROOT.xml:
<!-- Oracle -->
<Resource
name="jdbc/LiferayPool"
auth="Container"
type="javax.sql.DataSource"
driverClassName="oracle.jdbc.driver.OracleDriver"
url="jdbc:oracle:thin:@localhost:1521:XE"
username="Liferay_NEW"
password="Liferay_NEW"
maxActive="20"
/>
So, my query is what is the use of ROOT.xml definition and when this will be used and If I want to change the schema to a new schema for my portal, where and all I need to change the Schema definitions.
I am able to see two different DB configurations, one is in ROOT.xml and other is in Portal-ext.properties as below and by this it is clear that DB declarations in portal-ext is for the Portal and ROOT is for tomcat.
1. Portal-ext.properties:
jdbc.default.driverClassName=oracle.jdbc.driver.OracleDriver
jdbc.default.url=jdbc:oracle:thin:@localhost:1521:xe
jdbc.default.username=Liferay_NEW
jdbc.default.password=Liferay_NEW
2.ROOT.xml:
<!-- Oracle -->
<Resource
name="jdbc/LiferayPool"
auth="Container"
type="javax.sql.DataSource"
driverClassName="oracle.jdbc.driver.OracleDriver"
url="jdbc:oracle:thin:@localhost:1521:XE"
username="Liferay_NEW"
password="Liferay_NEW"
maxActive="20"
/>
So, my query is what is the use of ROOT.xml definition and when this will be used and If I want to change the schema to a new schema for my portal, where and all I need to change the Schema definitions.
M J, modifié il y a 9 années.
RE: DB definitions in ROOT.xml and Portal-ext
Regular Member Publications: 184 Date d'inscription: 01/03/13 Publications récentes
portal-ext.properties overrides everything else, so the answer is one in the portal-ext.properties file.
Olaf Kock, modifié il y a 9 années.
RE: DB definitions in ROOT.xml and Portal-ext
Liferay Legend Publications: 6403 Date d'inscription: 23/09/08 Publications récentes
If you use the portal-ext.properties that you list, that's the database connection that Liferay will use.
If your portal-ext.properties are like this:
If your portal-ext.properties are like this:
jdbc.default.jndi.name=jdbc/LiferayPool
Liferay will obtain the JNDI datasource from your application server. In tomcat's case that can be configured in ROOT.xml.
Aditya Bhardwaj, modifié il y a 9 années.
RE: DB definitions in ROOT.xml and Portal-ext
Junior Member Publications: 78 Date d'inscription: 08/01/15 Publications récentes
Hi
Liferay first read portal.properties then portal-ext.properties and finally portal-setup-wizard.properties. If there is no database related entries in portal-setup-wizard.properties then database entries mention portal-ext.properties entries is used.
Liferay first read portal.properties then portal-ext.properties and finally portal-setup-wizard.properties. If there is no database related entries in portal-setup-wizard.properties then database entries mention portal-ext.properties entries is used.
G R Rajesh Babu, modifié il y a 9 années.
RE: DB definitions in ROOT.xml and Portal-ext
Regular Member Publications: 161 Date d'inscription: 08/02/10 Publications récentes
Thanks Adhitya. But my question is what is the using of defining the DB details in ROOT.xml and when these values will be used.
Olaf Kock, modifié il y a 9 années.
RE: DB definitions in ROOT.xml and Portal-ext
Liferay Legend Publications: 6403 Date d'inscription: 23/09/08 Publications récentes
Is this question still open? Because I'd give the exact same answer as I gave above...
G R Rajesh Babu, modifié il y a 9 années.
RE: DB definitions in ROOT.xml and Portal-ext
Regular Member Publications: 161 Date d'inscription: 08/02/10 Publications récentes
Yes Olaf Kock it is closed now, Thanks for clarifying.