Cool .. as soon as possible I'll give it a try :-) regards, Achim
2015-11-23 9:56 GMT+01:00 Guillaume Nodet <[email protected]>: > I've added a simple test case demonstrating the use of blueprint-spring: > > > http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-spring/src/test/resources/test1.xml?revision=1715737&view=markup > > Guillaume > > > 2015-11-20 17:56 GMT+01:00 Guillaume Nodet <[email protected]>: > > > I've just committed a new module (and the additional required changes and > > existing modules) to support Spring namespaces (default and custom) in > > blueprint. > > See the source code at > > > > > http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-spring/src/main/java/org/apache/aries/blueprint/spring/ > > > > It's limited and not much tested for now, but it can handle things like > > the following: > > > > <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0" > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > > xmlns:bp="http://www.osgi.org/xmlns/blueprint/v1.0.0" > > xmlns:bean="http://camel.apache.org/schema/blueprint" > > xmlns:util="http://www.springframework.org/schema/util" > > xsi:schemaLocation=" > > http://www.osgi.org/xmlns/blueprint/v1.0.0 > > http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd > > http://camel.apache.org/schema/blueprint > > http://camel.apache.org/schema/blueprint/camel-blueprint.xsd > > http://www.springframework.org/schema/tx > > http://www.springframework.org/schema/tx/spring-tx-4.2.xsd > > http://www.springframework.org/schema/util > > http://www.springframework.org/schema/util/spring-util-4.2.xsd > > http://www.springframework.org/schema/beans > > http://www.springframework.org/schema/beans/spring-beans-4.2.xsd"> > > > > <!-- plain blueprint bean referencing a spring bean --> > > <bean id="artemis" > class="org.apache.camel.component.jms.JmsComponent"> > > <property name="connectionFactory" ref="jmsConnectionFactory"/> > > </bean> > > > > <!-- spring bean --> > > <bean name="jmsConnectionFactory" > > class="org.apache.activemq.artemis.api.jms.ActiveMQJMSClient" > > factory-method="createConnectionFactory" xmlns=" > > http://www.springframework.org/schema/beans"> > > <constructor-arg value="tcp:// > 0.0.0.0:61616?user=karaf&password=karaf > > "/> > > <constructor-arg value="broker"/> > > </bean> > > > > <!-- spring bean using custom namespace, referencing spring and > > blueprint beans --> > > <util:list id="springList" xmlns=" > > http://www.springframework.org/schema/beans"> > > <value>foo</value> > > <ref bean="jmsConnectionFactory" /> > > <ref bean="artemis"/> > > </util:list> > > > > <!-- blueprint service referencing a spring bean --> > > <service ref="springList" auto-export="all-classes"/> > > > > </blueprint> > > > > > > So you can use the default spring namespace or custom spring namespaces > > and cross-reference beans between blueprint and spring. > > > > I haven't tried auto-wiring or any advanced usage such as AOP. > > > > I'll try to commit a few initial integration tests beginning of next > week. > > Please have a look and provide feedback and additional use cases (as > tests > > ?). > > > > Cheers, > > Guillaume Nodet > > > > > > > -- Apache Member Apache Karaf <http://karaf.apache.org/> Committer & PMC OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer & Project Lead blog <http://notizblog.nierbeck.de/> Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS> Software Architect / Project Manager / Scrum Master
