Announcement Announcement Module
Collapse

Spring Dynamic Modules forum decommissioned in favor of Eclipse Gemini Blueprint

With the official first release of Eclipse Gemini Blueprint shipped, the migration of the Spring Dynamic Modules code base to the Eclipse Foundation, as part of the Gemini project, has been completed.

As such, this forum has been decommissioned in favour of the Eclipse Gemini forums.
See more
See less
Enabling annotation injection globally Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Enabling annotation injection globally

    Hi all,

    I'm trying to enable annotation-based injection globally, and not succeeding much. Here's what I am trying:

    1) set the framework property org.springframework.osgi.extender.annotation.auto. processing to "true", which results in this log output from the ContextLoaderListener:

    Code:
    Disabled automatic Spring-DM annotation processing; [ org.springframework.osgi.extender.annotation.auto.processing=true]
    This doesn't quite make sense to me, since the Spring code looks like it would enable processing in this condition.

    2) attach a fragment to the extender bundle. In the fragment manifest is:

    Code:
    Fragment-Host: org.springframework.bundle.osgi.extender
    Bundle-ManifestVersion: 2
    Bundle-SymbolicName: spring-configuration
    And in the /META-INF/spring/extender directory of the fragment jar is "extender-configuration.xml" containing:

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http.../beans"
    	xmlns:xsi="http...XMLSchema-instance"
    	xsi:schemaLocation="http...beans http...spring-beans.xsd">
    
    	<bean id="taskExecutor"
    		class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor">
    		<property name="threadNamePrefix" value="AssemblyThread" />
    	</bean>
    	
    	<bean id="extenderProperties" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
    		<property name="properties">
    			<props>
    				<prop key="process.annotations">true</prop>
    			</props>
    		</property>
    	</bean>
    
    </beans>
    This is the best I can understand from the docs, though I can think of at least a dozen other configurations that would be correct according to the documentation.

    Does anyone know what is wrong with either of these attempts? Thanks in advance...


    Byron

  • #2
    What version of Spring-DM are you using? I believe there was regarding the system property in 1.0.1 but this should be fixed in 1.1.0. If you're still on 1.0.x I would recommend 1.0.3.

    Cheers,

    Comment

    Working...
    X