Announcement Announcement Module
Collapse
No announcement yet.
<context:load-time-weaver> supporting OSGi service via AOSGI Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • <context:load-time-weaver> supporting OSGi service via AOSGI

    Hi,

    I'm attempting to use Equinox Aspects ( http://www.eclipse.org/equinox/incub...ects/index.php ) as weaver in a Spring-DM app.
    In this case the weaver is available as a service via the Interface org.eclipse.equinox.service.weaving.IWeavingServic e.

    I've looked at the <context:load-time-weaver> element which is used to specify the load time weaver class, but there isn't any support for injecting the weaver in any other form ( except a concrete class ) unlike it can be done with other elements in Spring configs.

    E.g DataSource and Entity Managers (which are service references ) can be injected using a syntax like:
    Code:
     <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"
                    p:dataSource-ref="dataSource">
              <property name="jpaVendorAdapter" ref="jpaVendorAdapter"/>
        </bean>
    Note the 'ref' values point to OSGi services that have been brought in via Spring-DM.
    In this case, the load time weaver is also available as an OSGi service, however I haven't been available to inject this reference into the <context:load-time-weaver> element.

    Anyone else had any experience using Equinox Aspects ?
    And/or using this service reference via <context:load-time-weaver> ?

    Thanks for any tips or guidance on the issue

  • #2
    Hi Drubio,

    I am currently trying to use Equinox Aspects and facing the problem which you mentioned below. Before using equinox aspects I was using a plugin developed by Martin Lippert
    http://www.tikalk.com/node/3253

    I used
    Code:
    <context:load-time-weaver weaver-class="org.eclipse.equinox.weaving.springweaver.EquinoxAspectsLoadTimeWeaver"/>
    to weave the JPA entities I have in my application.

    However now I have a need to weave aspectj aspects from a bundle into another bundle. I find that since I am using the loadtimeweaver for weaving JPA entities the equinox's LTW is not getting referenced to weave the entities.

    Could you please share with me if you found the solution for your problem?

    Regards,
    Shashi

    Comment

    Working...
    X