Results 1 to 3 of 3

Thread: Postprocessor are not launched the second time we start a bundle

  1. #1
    Join Date
    Apr 2009
    Location
    Switzerland
    Posts
    6

    Default Postprocessor are not launched the second time we start a bundle

    Hi,

    I currently have a weird problem in my OSGi/Spring Dm application.

    When i start for the first time a module, the application context is created and the bean post processor in the context works well. But if I stop the bundle and restart it the bean post processor is not applied...

    Here is my context :

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xmlns:osgi="http://www.springframework.org/schema/osgi"
           xmlns:context="http://www.springframework.org/schema/context"
           xsi:schemaLocation="
                http://www.springframework.org/schema/beans
                http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
                http://www.springframework.org/schema/osgi
                http://www.springframework.org/schema/osgi/spring-osgi.xsd
                http://www.springframework.org/schema/context
                http://www.springframework.org/schema/context/spring-context-3.0.xsd">
    
        <context:annotation-config/>
    
        <bean class="org.jtheque.views.utils.AutoRegistrationPostProcessor" lazy-init="false">
            <constructor-arg value="org.jtheque.memory" />
            <constructor-arg>
                <array>
                    <value>memoryPanel</value>
                </array>
            </constructor-arg>
            <property name="views" ref="views"/>
        </bean>
    
        <bean id="memoryModule" class="org.jtheque.memory.MemoryModule" lazy-init="false" />
    
        <bean id="memoryPanel" class="org.jtheque.memory.MemoryPanel" lazy-init="true">
            <constructor-arg><osgi:reference interface="org.jtheque.resources.able.IResourceService" /></constructor-arg>
            <constructor-arg ref="memoryModule" />
        </bean>
    
        <osgi:reference id="views" interface="org.jtheque.views.able.IViews" />
    </beans>
    And here is my manifest :

    Code:
    Manifest-Version: 1.0
    Module-UpdateUrl: http://jtheque.developpez.com/public/versions/Memory
     Module.versions
    Built-By: wichtounet
    Tool: Bnd-0.0.357
    Bundle-Name: org.jtheque.memory
    Created-By: Apache Maven Bundle Plugin
    Module-Config: org/jtheque/memory/module.xml
    Bundle-Vendor: Baptiste Wicht
    Build-Jdk: 1.6.0_18
    Bundle-Version: 1.4.2.SNAPSHOT
    Bnd-LastModified: 1275337865737
    Spring-Context: *;create-asynchronously:=false;publish-context:=false
    Bundle-ManifestVersion: 2
    Bundle-License: http://www.gnu.org/copyleft/gpl.html
    Bundle-Description: Module displaying the used memory by the applicati
     on
    Bundle-DocURL: http://jtheque.developpez.com
    Bundle-SymbolicName: org.jtheque.memory
    Import-Package: javax.annotation,javax.swing,javax.swing.border,org.jt
     heque.core.utils,org.jtheque.resources.able,org.jtheque.ui.utils.acti
     ons,org.jtheque.ui.utils.components,org.jtheque.utils.ui,org.jtheque.
     views.able,org.jtheque.views.able.components,org.jtheque.views.utils
    Module-Core: 2.1.0
    Does someone have an idea of what i'm doing wrong ?

    Thanks a lot

    Baptiste
    From Switzerland - Sorry for the faults

  2. #2
    Join Date
    Apr 2009
    Location
    Switzerland
    Posts
    6

    Default

    Nobody knows how to solve that ?
    From Switzerland - Sorry for the faults

  3. #3
    Join Date
    Apr 2009
    Location
    Switzerland
    Posts
    6

    Default

    That's OK, the design was not good at all and I created beans during postprocessing and that makes problems. I found a better way to achieve my goal.
    From Switzerland - Sorry for the faults

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •