[Design the new POJO MicroContainer] - Re: MutableClassInfo?
by stale.pedersen@jboss.org
"alesj" wrote :
| What about extracting ExprEditor's api in some our interface
| and than having the only impl based on Javassist.
| (just thinking outloud)
|
| Or this doesn't make sense as you need too much Javassist specific
| things from this ExprEditor?
from what i can see this is very javassist specific and i cant see how it might fit in for a different bytecode library (mostly thinking of cglib (not that i know that much cglib :)).
another problem is that we cant make this as generic as we want since we're limited to make the implementation we have work directly with javassist (since the user of the spi will extend and create its own expreditor). our implementation must look something like:
public class BodyTranslatorImpl extends ExprEditor implements BodyTranslator { ... } where BodyTranslator have the same methods as ExprEditor and BodyTranslatorImpl is just an empty "delegator" that convert jboss-reflect object to javassist. not even sure this might work, but thats the only solution i can see now that will solve the problem.
any better ideas that might solve it are highly appreciated.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4214835#4214835
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4214835
17 years, 2 months
[Design of JBoss ESB] - Smooks & Groovy mask illegal attribute names
by ama1
Hi Forum,
I try to rename a xml-element with groovy and smooks:
| <g:groovy executeOnElement="csv-record">
| <g:script>
| <!--
| //Rename the target fragment element from "csv-record" to "address"...
| DomUtils.renameElement(element, "address", true, true);
| -->
| </g:script>
| </g:groovy>
|
Problem is that the generated groovy class uses the element-name 'csv-record' as part of an attribute name:
| public void visitAfter(Element element, ExecutionContext executionContext, Writer writer) {
| Element csv-record_Mangled = element;
| Document document = element.getOwnerDocument();
| Map nodeModels = DOMModel.getModel(executionContext).getModels();
|
| def writeFragment = { outNode ->
| if(outNode.getNodeType() == Node.ELEMENT_NODE) {
| Serializer.recursiveDOMWrite((Element) outNode, writer);
| } else if(outNode.getNodeType() == Node.DOCUMENT_NODE) {
| Serializer.recursiveDOMWrite(outNode.getDocumentElement(), writer);
| } else {
| throw new SmooksException("Call to 'writeFragment' with a non Document/Element Node. Node type: " + outNode.getClass().getName());
| }
| }
|
|
|
| //Rename the target fragment element from "csv-record" to "address"...
| DomUtils.renameElement(element, "address", true, true);
|
|
| }
|
Strange is that this attribute is never used. But anyway, is there a way to mask this name??
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4214831#4214831
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4214831
17 years, 2 months
[Design of OSGi Integration] - Re: JBOSGI-38 and bundle deployment order
by thomas.diesler@jboss.com
I can confirm that deployment of A fails when the PackageAdminDependencyItem is added.
| DEPLOYMENTS MISSING DEPENDENCIES:
| Deployment "vfszip:/.../jbosgi38-bundleA.jar/" is missing the following dependencies:
| Dependency "<UNKNOWN jbosgi38-bundleA>" (should be in state "ClassLoader", but is actually in state "** UNRESOLVED Bundle: jbosgi38-bundleA [5] **")
|
[09:17:02] Thomas Diesler: Let me summarise to verify that I understand this correctly ...
[09:18:06] ⦠The MainDeployer does not "give up" on the deployment. The deployment context is still there. If a subsequent deployment satisfies the DI the deployment will still succeed ....
[09:18:51] Ales Justin: sure
[09:19:00] Thomas Diesler: The MainDeployer reports incomplete deployments with the WARN and actually throws an exception for incomplete deployments.
Ales suggests
[09:15:13] Ales Justin:
[09:15:26] ⦠perhaps we can do a new feature
[09:15:36] ⦠ignored deployments
[09:16:04] ⦠which don't show on the IncompleteDE
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4214823#4214823
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4214823
17 years, 2 months
[Design the new POJO MicroContainer] - Re: MutableClassInfo?
by stale.pedersen@jboss.org
i checked all the mc modules and couldnt find any occurrences of ModifierInfo so it seems we're in the clear.
ive finished most of the implementation except the usage of ExprEditor. from what i can see now, this is the last thing aop uses that i havent implemented in reflect.
take a look at CtBehaviour.instrument(ExprEditor) and for a example of how aop uses it: org.jboss.aop.instrument.CallerTransformer$CallerExprEditor.
the only way i can see we support this is to add something similar to whats in javassist.expr.* to jboss-reflect spi. imo this is something very javassist specific and not something we really should have in the spi.
one solution could be that we add the interfaces to the javassist package (org.jboss.reflect.plugins.javassist) and just add the method to the Javassist* implementation classes.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4214813#4214813
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4214813
17 years, 2 months