You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xbean-dev@geronimo.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2012/10/01 15:03:08 UTC
[jira] [Created] (XBEAN-227) Add support for Spring 3.1 bean
profiles
Claus Ibsen created XBEAN-227:
---------------------------------
Summary: Add support for Spring 3.1 bean profiles
Key: XBEAN-227
URL: https://issues.apache.org/jira/browse/XBEAN-227
Project: XBean
Issue Type: Improvement
Reporter: Claus Ibsen
Priority: Critical
When using the new feature of Spring 3.1 which is profiles, then the XBeanNamespaceHandler does not support parsing namespaces nested in <beans> which has a profile associated.
See AMQ-3723.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (XBEAN-227) Add support for Spring 3.1 bean
profiles
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/XBEAN-227?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen updated XBEAN-227:
------------------------------
Attachment: XBEAN-227.patch
Patch with a fix for this.
I have tested that it now works with ActiveMQ and spring 3.1 bean profiles.
> Add support for Spring 3.1 bean profiles
> ----------------------------------------
>
> Key: XBEAN-227
> URL: https://issues.apache.org/jira/browse/XBEAN-227
> Project: XBean
> Issue Type: Improvement
> Reporter: Claus Ibsen
> Priority: Critical
> Attachments: XBEAN-227.patch
>
>
> When using the new feature of Spring 3.1 which is profiles, then the XBeanNamespaceHandler does not support parsing namespaces nested in <beans> which has a profile associated.
> See AMQ-3723.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (XBEAN-227) Add support for Spring 3.1 bean
profiles
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/XBEAN-227?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13466777#comment-13466777 ]
Claus Ibsen commented on XBEAN-227:
-----------------------------------
In the above, we have a nested <beans> with a profile. And due that restriction above in the parse method, the parsing is skipped.
> Add support for Spring 3.1 bean profiles
> ----------------------------------------
>
> Key: XBEAN-227
> URL: https://issues.apache.org/jira/browse/XBEAN-227
> Project: XBean
> Issue Type: Improvement
> Reporter: Claus Ibsen
> Priority: Critical
>
> When using the new feature of Spring 3.1 which is profiles, then the XBeanNamespaceHandler does not support parsing namespaces nested in <beans> which has a profile associated.
> See AMQ-3723.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (XBEAN-227) Add support for Spring 3.1 bean
profiles
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/XBEAN-227?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13466774#comment-13466774 ]
Claus Ibsen commented on XBEAN-227:
-----------------------------------
See the parse method
{code}
public BeanDefinition parse(Element element, ParserContext parserContext) {
this.parserContext = parserContext;
this.qnameHelper = new XBeanQNameHelper(parserContext.getReaderContext());
BeanDefinitionHolder holder = parseBeanFromExtensionElement(element);
// Only register components: i.e. first level beans (or root element if no <beans> element
if (element.getParentNode() == element.getOwnerDocument() ||
element.getParentNode().getParentNode() == element.getOwnerDocument()) {
BeanDefinitionReaderUtils.registerBeanDefinition(holder, parserContext.getRegistry());
BeanComponentDefinition componentDefinition = new BeanComponentDefinition(holder);
parserContext.getReaderContext().fireComponentRegistered(componentDefinition);
}
return holder.getBeanDefinition();
}
{code}
In this code it only parses the 1st level beans. And since <beans> with profiles is often nested, then it no longer works.
> Add support for Spring 3.1 bean profiles
> ----------------------------------------
>
> Key: XBEAN-227
> URL: https://issues.apache.org/jira/browse/XBEAN-227
> Project: XBean
> Issue Type: Improvement
> Reporter: Claus Ibsen
> Priority: Critical
>
> When using the new feature of Spring 3.1 which is profiles, then the XBeanNamespaceHandler does not support parsing namespaces nested in <beans> which has a profile associated.
> See AMQ-3723.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (XBEAN-227) Add support for Spring 3.1 bean
profiles
Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/XBEAN-227?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Guillaume Nodet reassigned XBEAN-227:
-------------------------------------
Assignee: Guillaume Nodet
> Add support for Spring 3.1 bean profiles
> ----------------------------------------
>
> Key: XBEAN-227
> URL: https://issues.apache.org/jira/browse/XBEAN-227
> Project: XBean
> Issue Type: Improvement
> Components: spring
> Affects Versions: 3.11
> Reporter: Claus Ibsen
> Assignee: Guillaume Nodet
> Priority: Critical
> Attachments: XBEAN-227.patch
>
>
> When using the new feature of Spring 3.1 which is profiles, then the XBeanNamespaceHandler does not support parsing namespaces nested in <beans> which has a profile associated.
> See AMQ-3723.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (XBEAN-227) Add support for Spring 3.1 bean
profiles
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/XBEAN-227?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen updated XBEAN-227:
------------------------------
Component/s: spring
Affects Version/s: 3.11
> Add support for Spring 3.1 bean profiles
> ----------------------------------------
>
> Key: XBEAN-227
> URL: https://issues.apache.org/jira/browse/XBEAN-227
> Project: XBean
> Issue Type: Improvement
> Components: spring
> Affects Versions: 3.11
> Reporter: Claus Ibsen
> Priority: Critical
> Attachments: XBEAN-227.patch
>
>
> When using the new feature of Spring 3.1 which is profiles, then the XBeanNamespaceHandler does not support parsing namespaces nested in <beans> which has a profile associated.
> See AMQ-3723.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Closed] (XBEAN-227) Add support for Spring 3.1 bean
profiles
Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/XBEAN-227?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Guillaume Nodet closed XBEAN-227.
---------------------------------
Resolution: Fixed
Fix Version/s: 3.12
Sending xbean-spring/src/main/java/org/apache/xbean/spring/context/v2c/XBeanNamespaceHandler.java
Transmitting file data .
Committed revision 1393007.
> Add support for Spring 3.1 bean profiles
> ----------------------------------------
>
> Key: XBEAN-227
> URL: https://issues.apache.org/jira/browse/XBEAN-227
> Project: XBean
> Issue Type: Improvement
> Components: spring
> Affects Versions: 3.11
> Reporter: Claus Ibsen
> Assignee: Guillaume Nodet
> Priority: Critical
> Fix For: 3.12
>
> Attachments: XBEAN-227.patch
>
>
> When using the new feature of Spring 3.1 which is profiles, then the XBeanNamespaceHandler does not support parsing namespaces nested in <beans> which has a profile associated.
> See AMQ-3723.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (XBEAN-227) Add support for Spring 3.1 bean
profiles
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/XBEAN-227?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13466776#comment-13466776 ]
Claus Ibsen commented on XBEAN-227:
-----------------------------------
A very simple example with a beans profile could be to embed an AMQ broker in a profile called "cool". as shown below
{code:xml}
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:amq="http://activemq.apache.org/schema/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">
<beans profile="cool">
<broker id="myBroker" useJmx="false" brokerName="myBroker" persistent="false" xmlns="http://activemq.apache.org/schema/core">
<transportConnectors>
<transportConnector uri="vm://myBroker" />
</transportConnectors>
</broker>
</beans>
</beans>
{code}
> Add support for Spring 3.1 bean profiles
> ----------------------------------------
>
> Key: XBEAN-227
> URL: https://issues.apache.org/jira/browse/XBEAN-227
> Project: XBean
> Issue Type: Improvement
> Reporter: Claus Ibsen
> Priority: Critical
>
> When using the new feature of Spring 3.1 which is profiles, then the XBeanNamespaceHandler does not support parsing namespaces nested in <beans> which has a profile associated.
> See AMQ-3723.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira