Skip to content

Commit

Permalink
Merge pull request #5516 from tkafalas/feature
Browse files Browse the repository at this point in the history
[BACKLOG-39719][BACKLOG-39705][SP-4826] Bug fixes and changes for Int…
  • Loading branch information
peterrinehart authored Feb 2, 2024
2 parents a92d75f + d6625ca commit b721203
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 8 deletions.
18 changes: 18 additions & 0 deletions extensions/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,24 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>c3p0</groupId>
<artifactId>c3p0</artifactId>
<version>0.9.1.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>javax.persistence-api</artifactId>
<version>${javax.persistence-api.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>jakarta.validation</groupId>
<artifactId>jakarta.validation-api</artifactId>
<version>2.0.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the GNU Lesser General Public License for more details.
*
*
* Copyright (c) 2002-2018 Hitachi Vantara. All rights reserved.
* Copyright (c) 2002-2024 Hitachi Vantara. All rights reserved.
*
*/

Expand Down Expand Up @@ -52,8 +52,6 @@ public String getSolutionPath() {
}
}

// private final StringBuffer longString = new StringBuffer();

public void testCache() {

// Make sure we have a cache first...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the GNU Lesser General Public License for more details.
*
*
* Copyright (c) 2002-2018 Hitachi Vantara. All rights reserved.
* Copyright (c) 2002-2024 Hitachi Vantara. All rights reserved.
*
*/

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,6 @@ public void clearRegionCache( String region ) {
try {
try ( SessionImpl session = (SessionImpl) cache.getSessionFactory().openSession() ) {
cache.getStorageAccess().clearCache( session );
cache.evictAll();
}
} catch ( CacheException e ) {
CacheManager.logger.error( Messages.getInstance().getString(
Expand Down Expand Up @@ -425,7 +424,7 @@ public void clearCache() {
String key = ( entry.getKey() != null ) ? entry.getKey().toString() : ""; //$NON-NLS-1$
if ( key != null ) {
Cache cache = regionCache.get( key );
cache.evictAll();
removeRegionCache( key );
}
}
}
Expand All @@ -450,7 +449,9 @@ public void killSessionCache( IPentahoSession session ) {
while ( it.hasNext() ) {
String key = (String) it.next();
if ( key.indexOf( session.getId() ) >= 0 ) {
hvcache.evictEntityData( key );
try ( SessionImpl hibSession = (SessionImpl) hvcache.getSessionFactory().openSession() ) {
hvcache.getStorageAccess().removeFromCache( key, hibSession );
}
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ protected void setLastModified() {
}

@Override public void evictEntityData() {
sessionFactory.getMetamodel().entityPersisters().values().forEach( this::evictEntityData );
throwNotImplemented();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version='1.0' encoding='utf-8'?>
<settings>
<!--
* This setting allows the deployment to specify where to find the
* database-specific hibernate configuration. The samples supplied
* include the following:
*
* system/hibernate/hsql.hibernate.cfg.xml
* system/hibernate/mysql5.hibernate.cfg.xml
* system/hibernate/postgresql.hibernate.cfg.xml
* system/hibernate/oracle10g.hibernate.cfg.xml
*
-->
<!-- DEV TESTING ONLY -->
<config-file>system/hibernate/postgresql.hibernate.cfg.xml</config-file>

<!--
*
* managed should be set to true if running the BI Platform
* in a managed environment (like JBoss, Orion, etc). In this configuration,
* you should specify another location for the hibernate.cfg.xml (see below)
* instead of simply using the default one provided. This setting essentially
* tells the HibernateUtil class to use JNDI to locate the factory class for
* getting sessions. This allows the platform to use Hibernate across boundaries
* in message beans (for example).
*
<managed>false</managed>
-->

<managed>false</managed>
</settings>

0 comments on commit b721203

Please sign in to comment.