[Design of JBoss jBPM] - doModelUpdate, doModelRemove in ControllerDomAdapter
by spidek
Hello, I'm extending gpd, and I can't find a way to synchronizing xml with model when somebody is removing tags from xml source that are nested in controller.
I have custom TaskControllerHandlers and in gpd i differentiate tasknodes with them by controller's classname. I also have many custom XXXDomAdapters that extend TaskNodeAdapter, custom XXXPropertySections and custom models.
My problem is - I can't react in my custom DomAdapters to user removing whole tags nested in controller tag in tasknodes, becouse nor doModelUpdate neither doModelRemove of my DomAdapter are called. So xml and model are not synchronized anymore.
It would be very useful for me, if instead of being empty method doModelRemove of ControllerDomAdapter would have something like that:
| protected void doModelRemove(XmlAdapter child) {
| String type = child.getElementType();
| Controller controller = (Controller) getSemanticElement();
| if ("genericElement".equals(type)) {
| controller.removeGenericElement((GenericElement) child
| .getSemanticElement());
| }
| }
|
I didn't know if this is bug, so I send it here, not at JIRA.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4163265#4163265
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4163265
17 years, 9 months
[Design of POJO Server] - Re: Scoping of war/jar file embedded in sar service archives
by adinn
Hi Scott,
Thanks for looking at this. The problem was explained rather clumsily in the original post. Here is a picture of the setup which might make things clearer:
| example.sar
| war1.war
| WEB-INFO/web.xml
| ...
| <listener>com.arjuna.Listener1</listener>
| ...
| war2.war
| WEB-INFO/web.xml
| ...
| <listener>com.arjuna.Listener2</listener>
| ...
| jar1.jar
| com/arjuna/Listener1.class
| com/arjuna/Sequencer.class
| ...
| jar2.jar
| com/arjuna/Listener2.class
| ...
|
Listener1 and Listener2 both refer to static array in class Sequencer. However, they appear to see two different versions of this array. Listener1 is supposed to see changes made by Listener2 and vice versa but this does not happen. I assume this is because they are each referring to different versions of the class and that this is something to do with the way the war classloader interacts with the sar/jar loaders. If I unjar the classes and place them in the sar at top level then the listeners all see the same version of Sequencer i.e. this works ok:
| example.sar
| war1.war
| WEB-INFO/web.xml
| ...
| <listener>com.arjuna.Listener1</listener>
| ...
| war2.war
| WEB-INFO/web.xml
| ...
| <listener>com.arjuna.Listener2</listener>
| ...
| com/arjuna/Listener1.class
| com/arjuna/Sequencer.class
| com/arjuna/Listener2.class
| ...
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4163225#4163225
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4163225
17 years, 9 months
[Design the new POJO MicroContainer] - Re: JBMDR-1; LRU cache impl
by alesj
"adrian(a)jboss.org" wrote :
| Why? There's little point caching the Memory or the AnnotatedElement loaders
| which is all we use currently. It'd just be wasted cpu and memory. :-)
Marko did some investigation, due to the latest AS5 performance complaints on the jboss-dev ml.
Due to his results - AbstractMetaDataContext::getComponentMetaDataRetrieval is the biggest hotspot -, I've decided to add caching impls that are part of MDR already, and will work in bootstrap as well.
Marko's results on artificial app (100 EJBs, 100 @Local, 100 jsp):
| 21%
| org.jboss.metadata.plugins.context.AbstractMetaDataContext.getComponentMetaDataRetrieval(Signature) (The method calls itself recursively)
| org.jboss.metadata.spi.retrieval.MetaDataRetrievalToMetaDataBridge.getComponentMetaData(Signature)
| org.jboss.aop.Advisor.hasJoinPointAnnotation(Class, Signature, String)
| org.jboss.aop.Advisor.hasAnnotation(long, Method, String, Class)
| org.jboss.aop.Advisor.hasAnnotation(Method, String)
| org.jboss.aop.pointcut.MethodMatcher.classMatchesAll(ClassExpression)
|
| org.jboss.aop.pointcut.MethodMatcher.matchesIdentifier(ASTMethod)
| org.jboss.aop.pointcut.MethodMatcher.matches(ASTMethod)
|
| 16%
| java.lang.reflect.Method.toString()
| org.jboss.aop.metadata.MethodMetaData.getMethodMetaData(Method)
| org.jboss.aop.metadata.MethodMetaData.hasTag(Method, String)
| org.jboss.aop.pointcut.MethodMatcher.classMatchesAll(ClassExpression)
| org.jboss.aop.pointcut.MethodMatcher.visit(ASTAll, Object)
| org.jboss.aop.pointcut.ast.ASTAll.jjtAccept(PointcutExpressionParserVisitor, Object)
| org.jboss.aop.pointcut.MethodMatcher.matchesIdentifier(ASTMethod)
| org.jboss.aop.pointcut.MethodMatcher.matches(ASTMethod)
| org.jboss.aop.pointcut.MethodMatcher.visit(ASTMethod, Object)
|
| 10%
| java.util.regex.Pattern$CharProperty.match(Matcher, int, CharSequence)
| java.util.regex.Pattern$Curly.match0(Matcher, int, int, CharSequence)
| java.util.regex.Pattern$Curly.match(Matcher, int, CharSequence)
| java.util.regex.Matcher.match(int, int)
| java.util.regex.Matcher.matches()
| org.jboss.aop.pointcut.ast.ClassExpression.matches(String)
| org.jboss.aop.pointcut.Util.matchesClassExpr(ClassExpression, Class, Advisor)
| org.jboss.aop.pointcut.MethodMatcher.matchesClass(ASTMethod)
| org.jboss.aop.pointcut.FieldMatcher.visit(ASTField, Object)
|
| 9%
| java.lang.Class.getMethod0(String, Class[])
| java.lang.Class.getMethod(String, Class[])
| org.jboss.metadata.plugins.loader.reflection.AnnotatedElementMetaDataLoader.getComponentMetaDataRetrieval(Signature)
| org.jboss.metadata.plugins.context.AbstractMetaDataContext.getComponentMetaDataRetrieval(Signature)
| org.jboss.metadata.spi.retrieval.MetaDataRetrievalToMetaDataBridge.getComponentMetaData(Signature)
| org.jboss.aop.Advisor.hasJoinPointAnnotation(Class, Signature, String)
| org.jboss.aop.Advisor.hasAnnotation(long, Method, String, Class)
| org.jboss.aop.Advisor.hasAnnotation(Method, String)
| org.jboss.aop.pointcut.MethodMatcher.classMatchesAll(ClassExpression)
| org.jboss.aop.pointcut.MethodMatcher.matchesIdentifier(ASTMethod)
|
| 8%
| org.jboss.aop.pointcut.MatcherStrategy.subtypeOf(Class, ClassExpression, Advisor) (The method calls itself recursively)
| org.jboss.aop.pointcut.Util.subtypeOf(Class, ClassExpression, Advisor)
| org.jboss.aop.pointcut.Util.matchesClassExpr(ClassExpression, Class, Advisor)
| org.jboss.aop.pointcut.MethodMatcher.matchesClass(ASTMethod)
| org.jboss.aop.pointcut.MethodMatcher.matches(ASTMethod)
| org.jboss.aop.pointcut.MethodMatcher.visit(ASTMethod, Object)
| org.jboss.aop.pointcut.ast.ASTMethod.jjtAccept(PointcutExpressionParserVisitor, Object)
| org.jboss.aop.pointcut.ExecutionMethodMatcher.visit(ASTExecution, Object)
| org.jboss.aop.pointcut.ast.ASTExecution.jjtAccept(PointcutExpressionParserVisitor, Object)
| org.jboss.aop.pointcut.MatcherHelper.visit(ASTStart, Object)
| org.jboss.aop.pointcut.MatcherHelper.matches()
| org.jboss.aop.pointcut.PointcutExpression.matchesExecution(Advisor, Method)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4163212#4163212
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4163212
17 years, 9 months