Author: bdaw
Date: 2009-02-03 09:16:11 -0500 (Tue, 03 Feb 2009)
New Revision: 300
Added:
idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/cache/JBossCacheAttributeStoreWrapper.java
Modified:
idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/cache/IdentityStoreCacheSupport.java
idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/cache/JBossCacheIdentityStoreWrapper.java
idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/model/hibernate/HibernateIdentityObject.java
idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/model/ldap/LDAPIdentityObjectImpl.java
idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/repository/AbstractIdentityStoreRepository.java
idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/store/hibernate/HibernateIdentityStoreImpl.java
idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/types/SimpleIdentityObject.java
Log:
++ for caching
Modified:
idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/cache/IdentityStoreCacheSupport.java
===================================================================
---
idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/cache/IdentityStoreCacheSupport.java 2009-02-03
12:54:58 UTC (rev 299)
+++
idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/cache/IdentityStoreCacheSupport.java 2009-02-03
14:16:11 UTC (rev 300)
@@ -42,8 +42,10 @@
import java.util.HashSet;
/**
+ * Helper class providing caching support for IdentityStore. Stores search methods
results using hash from a set of used
+ * IdentityObjectSearchControl objects as a key. *
*
- * TODO: update the structure...
+ * TODO: update cache tree structure documentation to all used nodes/keys...
* Cache structure:
*
* CACHE_ROOT (real)
@@ -80,10 +82,7 @@
public abstract class IdentityStoreCacheSupport
{
- // TODO: more logging...
-
- // Node paths
-
+ //Structure
public static final String JBID_ROOT_NODE = "/jboss_id_idm";
public static final String OBJECT_TYPES_NODE = JBID_ROOT_NODE +
"/object_types";
@@ -561,6 +560,13 @@
node.put(NODE_SEARCH_RESULTS_KEY, results);
+ if (getLog().isLoggable(Level.FINER))
+ {
+ getLog().finer(this.toString() + "IdentityObjectRelationship search stored
in cache: fromIdentity" +
+ fromIdentity.toString() + "; toIdentity=" + toIdentity.toString() +
+ "; relationshipType=" + relationshipType.getName() ) ;
+ }
+
}
@@ -574,6 +580,13 @@
if (node != null)
{
+ if (node.getKeys().contains(NODE_SEARCH_RESULTS_KEY) &&
getLog().isLoggable(Level.FINER))
+ {
+ getLog().finer(this.toString() + "IdentityObjectRelationship search
found in cache: fromIdentity" +
+ fromIdentity.toString() + "; toIdentity=" +
toIdentity.toString() +
+ "; relationshipType=" + relationshipType.getName() ) ;
+ }
+
return
(Set<IdentityObjectRelationship>)node.get(NODE_SEARCH_RESULTS_KEY);
}
return null;
@@ -591,6 +604,16 @@
node.put(NODE_SEARCH_RESULTS_KEY, results);
+ if (getLog().isLoggable(Level.FINER))
+ {
+ getLog().finer(this.toString() + "IdentityObjectRelationship search stored
in cache: " +
+ "identity" + identity.toString() +
+ "; relationshipType=" + relationshipType.getName() +
+ "; parent=" + parent +
+ "; named=" + named +
+ "; name=" + name) ;
+ }
+
}
@@ -604,11 +627,23 @@
Fqn fqn = createRelationshipsComplexSearchFqn(identity, relationshipType, parent,
named, name);
Node node = getCache().getRoot().getChild(fqn);
+ Set<IdentityObjectRelationship> results = null;
+
if (node != null)
{
- return
(Set<IdentityObjectRelationship>)node.get(NODE_SEARCH_RESULTS_KEY);
+ results =
(Set<IdentityObjectRelationship>)node.get(NODE_SEARCH_RESULTS_KEY);
+
+ if (results != null && getLog().isLoggable(Level.FINER))
+ {
+ getLog().finer(this.toString() + "IdentityObjectRelationship search
found in cache: " +
+ "identity" + identity.toString() +
+ "; relationshipType=" + relationshipType.getName() +
+ "; parent=" + parent +
+ "; named=" + named +
+ "; name=" + name) ;
+ }
}
- return null;
+ return results;
}
@@ -620,6 +655,11 @@
// It can be in any result in the type searches
removeNodeChildren(OBJECT_TYPES_SEARCH_NODE);
+
+ if (getLog().isLoggable(Level.FINER))
+ {
+ getLog().finer(this.toString() + "IdentityObject searches invalidated in
cache: identityObject=" + io.toString());
+ }
}
protected void putIdentityObjectCountIntoCache(IdentityObjectType identityType, int
count)
@@ -629,6 +669,13 @@
node.put(NODE_OBJECT_KEY, count);
+ if (getLog().isLoggable(Level.FINER))
+ {
+ getLog().finer(this.toString() + "IdentityObjectType count search strored
in cache: " +
+ "identityObjectType=" + identityType.getName() +
+ "; count=" + count);
+ }
+
}
protected int getIdentityObjectCountFromCache(IdentityObjectType identityType)
@@ -639,7 +686,17 @@
if (node != null && node.getKeys().contains(NODE_OBJECT_KEY))
{
- return (Integer)(node.get(NODE_OBJECT_KEY));
+ int count = (Integer)(node.get(NODE_OBJECT_KEY));
+
+ if (getLog().isLoggable(Level.FINER))
+ {
+ getLog().finer(this.toString() + "IdentityObjectType count search result
found in cache: " +
+ "identityObjectType=" + identityType.getName() +
+ "; count=" + count);
+ }
+
+ return count;
+
}
// -1 means nothing in cache
return -1;
@@ -652,6 +709,12 @@
Node node = getCache().getRoot().addChild(fqn);
node.remove(NODE_OBJECT_KEY);
+
+ if (getLog().isLoggable(Level.FINER))
+ {
+ getLog().finer(this.toString() + "IdentityObjectType count search result
invalidated in cache: " +
+ "identityObjectType=" + identityType.getName());
+ }
}
protected void invalidateCachedRelationshipSearches(IdentityObject fromIdentity,
@@ -685,6 +748,13 @@
fqn = Fqn.fromElements(RELATIONSHIPS_SEARCH_COMPLEX_NODE, toName, false,
relationshipType.getName(), relNameElement);
getCache().getRoot().removeChild(fqn);
+ if (getLog().isLoggable(Level.FINER))
+ {
+ getLog().finer(this.toString() + "IdentityObjectRelationship search result
invalidated in cache: fromIdentity" +
+ fromIdentity.toString() + "; toIdentity=" + toIdentity.toString()
+
+ "; relationshipType=" + relationshipType.getName() ) ;
+ }
+
}
protected void invalidateCachedRelationshipSearches(IdentityObject identity1,
IdentityObject identity2, boolean named)
@@ -716,6 +786,13 @@
getCache().getRoot().removeChild(Fqn.fromElements(fqn, childName, name2));
}
+ if (getLog().isLoggable(Level.FINER))
+ {
+ getLog().finer(this.toString() + "IdentityObjectRelationship search result
invalidated in cache for: identity1" +
+ identity1.toString() + "; identity2=" + identity2.toString() +
+ "; named=" + named ) ;
+ }
+
}
protected void invalidateRelationshipNameSearches(String name)
@@ -724,6 +801,12 @@
removeNodeChildren(RELATIONSHIP_NAMES_SEARCH_ALL_NODE);
removeNodeChildren(RELATIONSHIP_NAMES_SEARCH_IO_NODE);
+
+ if (getLog().isLoggable(Level.FINER))
+ {
+ getLog().finer(this.toString() + "IdentityObjectRelationshipName search
results invalidated in cache: name" +
+ name ) ;
+ }
}
@@ -737,6 +820,12 @@
node.put(NODE_SEARCH_RESULTS_KEY, results);
+ if (getLog().isLoggable(Level.FINER))
+ {
+ getLog().finer(this.toString() + "IdentityObjectRelationshipName search
results invalidated in cache: controls hash=" +
+ getControlsHash(controls)) ;
+ }
+
}
protected Set<String>
getRelationshipNamesSearchFromCache(IdentityObjectSearchControl[] controls)
@@ -748,9 +837,18 @@
if (node != null)
{
- return (Set<String>)node.get(NODE_SEARCH_RESULTS_KEY);
+ Set<String> results =
(Set<String>)node.get(NODE_SEARCH_RESULTS_KEY);
+
+ if (results != null && getLog().isLoggable(Level.FINER))
+ {
+ getLog().finer(this.toString() + "IdentityObjectRelationshipName search
result found in cache: controls hash=" +
+ getControlsHash(controls)) ;
+ }
+
+ return results;
}
+
return null;
}
@@ -765,6 +863,13 @@
node.put(NODE_SEARCH_RESULTS_KEY, results);
+ if (results != null && getLog().isLoggable(Level.FINER))
+ {
+ getLog().finer(this.toString() + "IdentityObjectRelationshipName search
result stored in cache: " +
+ "controls hash=" + getControlsHash(controls) +
+ "identity=" + identity.toString()) ;
+ }
+
}
protected Set<String> getRelationshipNamesSearchFromCache(IdentityObject
identity, IdentityObjectSearchControl[] controls)
@@ -777,7 +882,16 @@
if (node != null)
{
- return (Set<String>)node.get(NODE_SEARCH_RESULTS_KEY);
+ Set<String> results =
(Set<String>)node.get(NODE_SEARCH_RESULTS_KEY);
+
+ if (results != null && getLog().isLoggable(Level.FINER))
+ {
+ getLog().finer(this.toString() + "IdentityObjectRelationshipName search
result found in cache: " +
+ "controls hash=" + getControlsHash(controls) +
+ "identity=" + identity.toString()) ;
+ }
+
+ return results;
}
return null;
}
Added:
idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/cache/JBossCacheAttributeStoreWrapper.java
===================================================================
---
idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/cache/JBossCacheAttributeStoreWrapper.java
(rev 0)
+++
idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/cache/JBossCacheAttributeStoreWrapper.java 2009-02-03
14:16:11 UTC (rev 300)
@@ -0,0 +1,218 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2006, Red Hat Middleware, LLC, and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+
+package org.jboss.identity.idm.impl.cache;
+
+import org.jboss.identity.idm.spi.store.AttributeStore;
+import org.jboss.identity.idm.spi.store.IdentityStoreInvocationContext;
+import org.jboss.identity.idm.spi.store.IdentityStoreSession;
+import org.jboss.identity.idm.spi.model.IdentityObjectType;
+import org.jboss.identity.idm.spi.model.IdentityObjectAttribute;
+import org.jboss.identity.idm.spi.model.IdentityObject;
+import
org.jboss.identity.idm.spi.configuration.metadata.IdentityObjectAttributeMetaData;
+import org.jboss.identity.idm.exception.IdentityException;
+import org.jboss.cache.Cache;
+import org.jboss.cache.CacheFactory;
+import org.jboss.cache.DefaultCacheFactory;
+
+import java.util.logging.Logger;
+import java.util.Set;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw
Dawidowicz</a>
+ * @version : 0.1 $
+ */
+public class JBossCacheAttributeStoreWrapper extends IdentityStoreCacheSupport implements
AttributeStore
+{
+
+ private static Logger log =
Logger.getLogger(JBossCacheAttributeStoreWrapper.class.getName());
+
+ private final AttributeStore attributeStore;
+
+ protected final Cache cache;
+
+ // if update/add/remove operation on attributes should result in getAttributes() query
to store new set in cache
+ // with many updates it can add additional cost
+ private boolean reloadAttributesToCacheOnUpdate = true;
+
+
+ public JBossCacheAttributeStoreWrapper(AttributeStore attributeStore, String
cacheConfigurationFile)
+ {
+ this.attributeStore = attributeStore;
+
+ CacheFactory factory = new DefaultCacheFactory();
+
+ this.cache = factory.createCache(cacheConfigurationFile);
+
+ this.cache.start();
+
+ }
+
+ public String getId()
+ {
+ return attributeStore.getId();
+ }
+
+ public IdentityStoreSession createIdentityStoreSession() throws IdentityException
+ {
+ return attributeStore.createIdentityStoreSession();
+ }
+
+ public Set<String> getSupportedAttributeNames(IdentityStoreInvocationContext
invocationContext,
+ IdentityObjectType identityType) throws
IdentityException
+ {
+ // Doesn't need to be cached
+ return attributeStore.getSupportedAttributeNames(invocationContext, identityType);
+ }
+
+ public Map<String, IdentityObjectAttributeMetaData>
getAttributesMetaData(IdentityStoreInvocationContext invocationContext,
+
IdentityObjectType identityType)
+ {
+ // Doesn't need to be cached
+ return attributeStore.getAttributesMetaData(invocationContext, identityType);
+ }
+
+ public Map<String, IdentityObjectAttribute>
getAttributes(IdentityStoreInvocationContext invocationContext,
+ IdentityObject identity)
throws IdentityException
+ {
+ Map<String, IdentityObjectAttribute> results =
getAttributesFromCache(identity.getName(), identity.getIdentityType());
+
+ if (results == null)
+ {
+ results = attributeStore.getAttributes(invocationContext, identity);
+
+ if (results != null && results.size() > 0)
+ {
+ putIntoCache(identity, results);
+ }
+ }
+
+ return results;
+ }
+
+ public IdentityObjectAttribute getAttribute(IdentityStoreInvocationContext
invocationContext,
+ IdentityObject identity,
+ String name) throws IdentityException
+ {
+ Map<String, IdentityObjectAttribute> results =
getAttributesFromCache(identity.getName(), identity.getIdentityType());
+
+ if (results != null && results.containsKey(name))
+ {
+ return results.get(name);
+ }
+ else
+ {
+ return attributeStore.getAttribute(invocationContext, identity, name);
+
+ //TODO: add this attribute to the node map
+ }
+
+ }
+
+ public void updateAttributes(IdentityStoreInvocationContext invocationCtx,
+ IdentityObject identity,
+ IdentityObjectAttribute[] attributes) throws
IdentityException
+ {
+ attributeStore.updateAttributes(invocationCtx, identity, attributes);
+
+ removeAttributesFromCache(identity);
+
+ if (reloadAttributesToCacheOnUpdate)
+ {
+ Map<String, IdentityObjectAttribute> results =
attributeStore.getAttributes(invocationCtx, identity);
+
+ if (results != null && results.size() > 0)
+ {
+ putIntoCache(identity, results);
+ }
+ }
+ else
+ {
+ // update attributes in node map directly
+ }
+
+ }
+
+ public void addAttributes(IdentityStoreInvocationContext invocationCtx,
+ IdentityObject identity,
+ IdentityObjectAttribute[] attributes) throws
IdentityException
+ {
+ attributeStore.addAttributes(invocationCtx, identity, attributes);
+
+ removeAttributesFromCache(identity);
+
+ if (reloadAttributesToCacheOnUpdate)
+ {
+ Map<String, IdentityObjectAttribute> results =
attributeStore.getAttributes(invocationCtx, identity);
+
+ if (results != null && results.size() > 0)
+ {
+ putIntoCache(identity, results);
+ }
+ }
+ else
+ {
+ // add attributes in node map directly
+ }
+ }
+
+ public void removeAttributes(IdentityStoreInvocationContext invocationCtx,
+ IdentityObject identity,
+ String[] attributeNames) throws IdentityException
+ {
+ attributeStore.removeAttributes(invocationCtx, identity, attributeNames);
+
+ removeAttributesFromCache(identity);
+
+ if (reloadAttributesToCacheOnUpdate)
+ {
+ Map<String, IdentityObjectAttribute> results =
attributeStore.getAttributes(invocationCtx, identity);
+
+ if (results != null && results.size() > 0)
+ {
+ putIntoCache(identity, results);
+ }
+ }
+ else
+ {
+ // remove attributes in node map directly
+ }
+ }
+
+ protected Logger getLog()
+ {
+ return log;
+ }
+
+ protected Cache getCache()
+ {
+ return cache;
+ }
+
+ @Override
+ public String toString()
+ {
+ return "JBossCacheAttributeStoreWrapper (AttributeStore=" +
attributeStore.getId() + ")";
+ }
+
+}
Modified:
idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/cache/JBossCacheIdentityStoreWrapper.java
===================================================================
---
idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/cache/JBossCacheIdentityStoreWrapper.java 2009-02-03
12:54:58 UTC (rev 299)
+++
idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/cache/JBossCacheIdentityStoreWrapper.java 2009-02-03
14:16:11 UTC (rev 300)
@@ -56,7 +56,7 @@
* @author <a href="mailto:boleslaw.dawidowicz at redhat.com">Boleslaw
Dawidowicz</a>
* @version : 0.1 $
*/
-public class JBossCacheIdentityStoreWrapper extends IdentityStoreCacheSupport implements
IdentityStore
+public class JBossCacheIdentityStoreWrapper extends JBossCacheAttributeStoreWrapper
implements IdentityStore
{
private static Logger log =
Logger.getLogger(JBossCacheIdentityStoreWrapper.class.getName());
@@ -66,25 +66,14 @@
private final IdentityStore identityStore;
- private final Cache cache;
-
- // if update/add/remove operation on attributes should result in getAttributes() query
to store new set in cache
- // with many updates it can add additional cost
- private boolean reloadAttributesToCacheOnUpdate = true;
-
public JBossCacheIdentityStoreWrapper(IdentityStore identityStore, String
cacheConfigurationFile) throws IdentityException
{
+ super(identityStore, cacheConfigurationFile);
this.identityStore = identityStore;
- Configuration config = new Configuration();
- CacheFactory factory = new DefaultCacheFactory();
- this.cache = factory.createCache(cacheConfigurationFile);
-
- this.cache.start();
-
initResidentNodes(identityStore.getSupportedFeatures().getSupportedIdentityObjectTypes(),
identityStore.getSupportedFeatures().getSupportedRelationshipTypes());
@@ -100,16 +89,8 @@
identityStore.bootstrap(configurationMD);
}
- public String getId()
- {
- return identityStore.getId();
- }
+
- public IdentityStoreSession createIdentityStoreSession() throws IdentityException
- {
- return identityStore.createIdentityStoreSession();
- }
-
public FeaturesMetaData getSupportedFeatures()
{
return identityStore.getSupportedFeatures();
@@ -418,137 +399,8 @@
identityStore.updateCredential(ctx, identityObject, credential);
}
- public Set<String> getSupportedAttributeNames(IdentityStoreInvocationContext
invocationContext,
- IdentityObjectType identityType) throws
IdentityException
- {
- // Doesn't need to be cached
- return identityStore.getSupportedAttributeNames(invocationContext, identityType);
- }
- public Map<String, IdentityObjectAttributeMetaData>
getAttributesMetaData(IdentityStoreInvocationContext invocationContext,
-
IdentityObjectType identityType)
- {
- // Doesn't need to be cached
- return identityStore.getAttributesMetaData(invocationContext, identityType);
- }
- public Map<String, IdentityObjectAttribute>
getAttributes(IdentityStoreInvocationContext invocationContext,
- IdentityObject identity)
throws IdentityException
- {
- Map<String, IdentityObjectAttribute> results =
getAttributesFromCache(identity.getName(), identity.getIdentityType());
-
- if (results == null)
- {
- results = identityStore.getAttributes(invocationContext, identity);
-
- if (results != null && results.size() > 0)
- {
- putIntoCache(identity, results);
- }
- }
-
- return results;
- }
-
- public IdentityObjectAttribute getAttribute(IdentityStoreInvocationContext
invocationContext,
- IdentityObject identity,
- String name) throws IdentityException
- {
- Map<String, IdentityObjectAttribute> results =
getAttributesFromCache(identity.getName(), identity.getIdentityType());
-
- if (results != null && results.containsKey(name))
- {
- return results.get(name);
- }
- else
- {
- return identityStore.getAttribute(invocationContext, identity, name);
-
- //TODO: add this attribute to the node map
- }
-
- }
-
- public void updateAttributes(IdentityStoreInvocationContext invocationCtx,
- IdentityObject identity,
- IdentityObjectAttribute[] attributes) throws
IdentityException
- {
- identityStore.updateAttributes(invocationCtx, identity, attributes);
-
- removeAttributesFromCache(identity);
-
- if (reloadAttributesToCacheOnUpdate)
- {
- Map<String, IdentityObjectAttribute> results =
identityStore.getAttributes(invocationCtx, identity);
-
- if (results != null && results.size() > 0)
- {
- putIntoCache(identity, results);
- }
- }
- else
- {
- // update attributes in node map directly
- }
-
- }
-
- public void addAttributes(IdentityStoreInvocationContext invocationCtx,
- IdentityObject identity,
- IdentityObjectAttribute[] attributes) throws
IdentityException
- {
- identityStore.addAttributes(invocationCtx, identity, attributes);
-
- removeAttributesFromCache(identity);
-
- if (reloadAttributesToCacheOnUpdate)
- {
- Map<String, IdentityObjectAttribute> results =
identityStore.getAttributes(invocationCtx, identity);
-
- if (results != null && results.size() > 0)
- {
- putIntoCache(identity, results);
- }
- }
- else
- {
- // add attributes in node map directly
- }
- }
-
- public void removeAttributes(IdentityStoreInvocationContext invocationCtx,
- IdentityObject identity,
- String[] attributeNames) throws IdentityException
- {
- identityStore.removeAttributes(invocationCtx, identity, attributeNames);
-
- removeAttributesFromCache(identity);
-
- if (reloadAttributesToCacheOnUpdate)
- {
- Map<String, IdentityObjectAttribute> results =
identityStore.getAttributes(invocationCtx, identity);
-
- if (results != null && results.size() > 0)
- {
- putIntoCache(identity, results);
- }
- }
- else
- {
- // remove attributes in node map directly
- }
- }
-
- protected Logger getLog()
- {
- return log;
- }
-
- protected Cache getCache()
- {
- return cache;
- }
-
@Override
public String toString()
{
Modified:
idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/model/hibernate/HibernateIdentityObject.java
===================================================================
---
idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/model/hibernate/HibernateIdentityObject.java 2009-02-03
12:54:58 UTC (rev 299)
+++
idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/model/hibernate/HibernateIdentityObject.java 2009-02-03
14:16:11 UTC (rev 300)
@@ -320,4 +320,10 @@
{
}
+
+ @Override
+ public String toString()
+ {
+ return "IdentityObject[id=" + getId() + "; name=" + getName()
+ "; type=" + getIdentityType().getName() + "]";
+ }
}
Modified:
idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/model/ldap/LDAPIdentityObjectImpl.java
===================================================================
---
idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/model/ldap/LDAPIdentityObjectImpl.java 2009-02-03
12:54:58 UTC (rev 299)
+++
idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/model/ldap/LDAPIdentityObjectImpl.java 2009-02-03
14:16:11 UTC (rev 300)
@@ -78,4 +78,10 @@
{
}
+
+ @Override
+ public String toString()
+ {
+ return "IdentityObject[id=" + getId() + "; name=" + getName()
+ "; type=" + getIdentityType().getName() + "]";
+ }
}
Modified:
idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/repository/AbstractIdentityStoreRepository.java
===================================================================
---
idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/repository/AbstractIdentityStoreRepository.java 2009-02-03
12:54:58 UTC (rev 299)
+++
idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/repository/AbstractIdentityStoreRepository.java 2009-02-03
14:16:11 UTC (rev 300)
@@ -71,6 +71,8 @@
if (asId != null && bootstrappedAttributeStores.keySet().contains(asId))
{
defaultAttributeStore = bootstrappedAttributeStores.get(asId);
+
+ //TODO: cache wrap support
}
if (isId != null && bootstrappedIdentityStores.keySet().contains(isId))
Modified:
idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/store/hibernate/HibernateIdentityStoreImpl.java
===================================================================
---
idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/store/hibernate/HibernateIdentityStoreImpl.java 2009-02-03
12:54:58 UTC (rev 299)
+++
idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/store/hibernate/HibernateIdentityStoreImpl.java 2009-02-03
14:16:11 UTC (rev 300)
@@ -39,7 +39,6 @@
import org.hibernate.Query;
import org.hibernate.SessionFactory;
import org.hibernate.criterion.Restrictions;
-import org.hibernate.ejb.HibernateEntityManager;
import org.hibernate.ejb.HibernateEntityManagerFactory;
import org.jboss.identity.idm.exception.IdentityException;
import org.jboss.identity.idm.impl.api.AttributeFilterSearchControl;
Modified:
idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/types/SimpleIdentityObject.java
===================================================================
---
idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/types/SimpleIdentityObject.java 2009-02-03
12:54:58 UTC (rev 299)
+++
idm/trunk/idm/src/main/java/org/jboss/identity/idm/impl/types/SimpleIdentityObject.java 2009-02-03
14:16:11 UTC (rev 300)
@@ -83,4 +83,10 @@
{
}
+
+ @Override
+ public String toString()
+ {
+ return "IdentityObject[id=" + getId() + "; name=" + getName()
+ "; type=" + getIdentityType().getName() + "]";
+ }
}
\ No newline at end of file