I created ManagedObjectNameProperty which every time overrides the managed object's name whenever a new value is set.
This hack eliminates the hack in ManagedConnectionFactoryParserDeployer. And would work for JMS destinations if there was a way for a client to know the full path of the JMS destination deployment they are creating. The problem is to get the deploy directory path. I tried
InitialContext ctx = getInitialContext();
| ProfileService ps = (ProfileService) ctx.lookup("ProfileService");
| return ps.getActiveProfile().getRootFile(ManagedDeployment.DeploymentPhase.APPLICATION).getPathName();
But this is on the client side and Profile is not serializable.
I am committing the changes.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4127415#4127415
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4127415
"genman" wrote : I figured out how to optimize it, though there are race conditions when sharing caches, but the whole thing is full of potential race conditions. :-)
|
You could mitigate some race conditions by using the StripedLock class in the cache loader, but this will only prevent races on the cache loader on a single instance. In a cluster, we'd need some sort of distributed locking to do this - either that, or for S3 to support transactions. :-)
"genman" wrote :
| By the way, to test the darn thing, you have to have an Amazon S3 account.
|
Hmm, a good reason then to have the tests disabled by default for automated test runs, etc.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4127389#4127389
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4127389
The regression is due to a bug fix in the annotation processing. It was not always checking the Advisor.metadata when checking annotations for methods, this has now been added, but slows it down.
The main underlying problem is that the pointcut matchers work on strings, but to check for the annotations in the metadata repository (org.jboss.metadata.spi.MetaData.isAnnotationPresent()) we need to convert the String into a Class, by attempting to load the class. All in all, that means a lot of attempts to load classes.
I don't see an easy fix for this
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4127387#4127387
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4127387