Author: nfilotto
Date: 2011-10-26 15:35:53 -0400 (Wed, 26 Oct 2011)
New Revision: 5105
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/CQJDBCWorkspaceDataContainer.java
Log:
EXOJCR-1608: Unable to start portal on Postgresql database with local-tx-datasource
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/CQJDBCWorkspaceDataContainer.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/CQJDBCWorkspaceDataContainer.java 2011-10-26
14:06:02 UTC (rev 5104)
+++
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/optimisation/CQJDBCWorkspaceDataContainer.java 2011-10-26
19:35:53 UTC (rev 5105)
@@ -47,9 +47,7 @@
import java.io.IOException;
import javax.jcr.RepositoryException;
-import javax.naming.InitialContext;
import javax.naming.NamingException;
-import javax.sql.DataSource;
/**
* Created by The eXo Platform SAS.
@@ -136,17 +134,11 @@
}
else if (dbDialect == DBConstants.DB_DIALECT_PGSQL)
{
- this.connFactory = defaultConnectionFactory();
-
if (dbSourceName != null)
{
- DataSource ds = (DataSource)new InitialContext().lookup(dbSourceName);
- if (ds != null)
- this.connFactory =
- new PostgreConnectionFactory(ds, containerName, multiDb,
valueStorageProvider, maxBufferSize,
- swapDirectory, swapCleaner);
- else
- throw new RepositoryException("Datasource '" + dbSourceName
+ "' is not bound in this context.");
+ this.connFactory =
+ new PostgreConnectionFactory(getDataSource(), containerName, multiDb,
valueStorageProvider,
+ maxBufferSize, swapDirectory, swapCleaner);
}
else
this.connFactory =
Show replies by date