[Design of JBossCache] - Re: PojoCache implementation class AOP instrumentation depen
by ben.wang@jboss.com
"kabir.khan(a)jboss.com" wrote :
| Hence the "install" script I mentioned. I think jboss messaging does this as well.
I have checked with Ovidiu but he doesn't seem to be aware of it though? I assume the install script will be during the build time to run "aopc" before copying the pojo-cache.jar over to build directory. Is this what you are thinking of as well?
"ben.wang(a)jboss.com" wrote :
| Now that this has become a requirement, we will attempt to do this. I have always seen the woven code as an internal implementation detail, and so have not really thought about this part before. Now that we have run into a real need for this we will attempt to keep this in sync between minor versions. However, before we go final with 2.0.0.GA we *might* still need to make adjustments to what is being woven in.
OK. As long as we have gurantee for minor releases, I am ok with it. Otherwise, it'd be nightmare to maintain it for all the relases. Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3987787#3987787
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3987787
19 years, 4 months
[Design of JBossCache] - Re: JBCACHE-871 Discussion Thread
by bstansberry@jboss.com
I've been playing with a solution for this on Branch_1_4_0, at least with pessimistic locking. Basics are:
1) TreeCache._remove should not be calling node.releaseAll -- releasing locks should be the task of the interceptors, not the cache.
With that in place the IdentityLock held by the removed node can still function as a guard for that Fqn. Problem now is how to force threads to acquire that lock after the node itself is no longer in the tree.
2) PessimisticLockInterceptor maintains a Map<Fqn, DataNode> removedNodes. PLI.invoke() checks if its a remove call; if it is, the lock() method is instructed to put the Fqn and DataNode in the map. (Done in lock() because it's the method that finds the DataNode in the tree).
3) If a tx is in effect, besides storing the node in the removedNodes map, it's Fqn is also stored in a list in the TransactionEntry. This list is used at tx commit/rollback to remove the entries from the removedNodes map. If a tx is not in effect, the entry is removed from the removedNodes map when the invocation returns. [1]
4) Other methods, when they are in lock(), if they can't find a node in the cache to lock, before creating a new one they first do a lookup in the removedNodes map. If they find a node there, they try to acquire the lock on it. Only when that lock is acquired do they continue on to the regular code that find/creates/locks the node in the cache. Thus they block until the tx that removed the node commits.
4) If a lock is obtained on a node from the removedNodes map, the lock is stored in the LockTable or TransactionEntry, the same as any other lock. Thus is gets released the same as any other lock.
With this, the unit tests I added for JBCACHE-871 pass. I haven't checked if all sorts of other tests break. I also haven't given any thought to optimistic locking.
One note -- let's say there is a tree /a/b/c, and a tx removes /a/b (and thus c as well). An entry for /a/b is put in the map, but not for /a/b/c. This is because any other thread wanting to touch /a/b/c will have to traverse /a/b, so the locking there is sufficient, as long as READ_COMMITTED or stronger is in effect. Weaker than that and this isn't an issue anyway.
[1] This bit of removing the entry from the map on the invocation return in the non-tx case is a bit ugly. Really it should be done in UnlockInterceptor, but then the map would have to be a shared object stored in TreeCache. Bleah :(
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3987782#3987782
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3987782
19 years, 4 months
[Design of JBoss Portal] - Re: UserProfileModule LDAP implementation
by bvogt
"bdaw" wrote :
| If you have experience with it
|
with respect to my responsibility I should have that experience - at least for what we needed.
The resources are not "easy" to read, because you don't get the whole picture at once.
Therefore I would try to summarize that picture:
1) Intentity Management is configured in one xml file, which defines the "datasources" where
the "identity objects" are read from (and optionally written to). It merges the identity objects
retrieved from all defined datasources.
2) A datasource may be defined "homeFor", "responsibleFor" "identity objects"
3) Identity objects may be: User, Group, Role
4) A datasource may point to a database or an LDAP tree. An LDAP tree can be defined to be read-only,
which in turn means, that all data read from it cannot be changed in the portal.
5) A datasource defines the attribute mapping: logical user attribute <-> ldap attribute
for existing/common attributes
6) The existing user attributes can be extended outside of the xml file by a comma separated list of
their names. Values are of type String.
If users are configured to be read from a read-only LDAP tree, these attributes are written in
the database, which is always needed.
The ability of defining custom user attributes for a portal is quite necessary, think of a b2b portal
which requires each user to accept the "terms of use" or other legal aspects.
Links @SAP:
Indentiy Management: http://help.sap.com/saphelp_nw2004s/helpdata/en/64/3843ed5a85d84ab4e4bd12...
Adding Custom Attributes to the User Profile: http://help.sap.com/saphelp_nw2004s/helpdata/en/44/0316d50bbe025ce1000000...
Structure of a Data Source Configuration File: http://help.sap.com/saphelp_nw2004s/helpdata/en/bd/e8fc3f8fc2c542e1000000...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3987758#3987758
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3987758
19 years, 4 months