Revision: 15676
Author: emmartins
Date: Wed Dec 8 06:24:36 2010
Log: Fixes Issue 2197
http://code.google.com/p/mobicents/source/detail?r=15676
Modified:
/trunk/servers/jain-slee/core/profiles/src/main/java/org/mobicents/slee/container/deployment/profile/jpa/JPAProfileTableFramework.java
=======================================
---
/trunk/servers/jain-slee/core/profiles/src/main/java/org/mobicents/slee/container/deployment/profile/jpa/JPAProfileTableFramework.java
Mon May 10 08:09:11 2010
+++
/trunk/servers/jain-slee/core/profiles/src/main/java/org/mobicents/slee/container/deployment/profile/jpa/JPAProfileTableFramework.java
Wed Dec 8 06:24:36 2010
@@ -43,7 +43,6 @@
private final ProfileManagementImpl sptm;
private boolean isInitialized = false;
- private static Boolean isLoading = false;
private final SleeTransactionManager sleeTransactionManager;
@@ -55,7 +54,8 @@
this.configuration = configuration;
}
- private void createPersistenceUnit()
+ @SuppressWarnings({ "rawtypes", "unchecked" })
+private void createPersistenceUnit()
{
try {
HibernatePersistence hp = new HibernatePersistence();
@@ -127,9 +127,6 @@
}
public void storeProfileTable(ProfileTableImpl profileTable) {
- if(isLoading) {
- return;
- }
if(logger.isTraceEnabled()) {
logger.trace( "Storing into backend storage profile table " +
profileTable );
@@ -197,7 +194,8 @@
}
}
- public ProfileSpecificationID getProfileSpecificationID(String
profileTableName) {
+ @SuppressWarnings("unchecked")
+public ProfileSpecificationID getProfileSpecificationID(String
profileTableName) {
EntityManager em = null;
@@ -235,8 +233,7 @@
if(logger.isDebugEnabled()) {
logger.debug("Profile Table named " + profileTableName + " found in JPA
data source.");
}
- synchronized (isLoading) {
- isLoading = true;
+ synchronized (this) {
// ask for the profile table, the manager will build
the local object
try {
sptm.loadProfileTableLocally(profileTableName,
component);
@@ -246,7 +243,6 @@
logger.debug("Unable to load profile table
named "+profileTableName,e);
}
}
- isLoading = false;
}
}
}
@@ -270,7 +266,8 @@
/**
* @return
*/
- public Set<String> _getProfileTableNames(ProfileSpecificationID
profileSpecificationID) {
+ @SuppressWarnings("unchecked")
+public Set<String> _getProfileTableNames(ProfileSpecificationID
profileSpecificationID) {
Set<String> resultSet = null;