Hey,

You are probably more likely to get a good answer from stackoverflow where
a bunch of the Spring Team are now hanging out.

>From an AspectJ point of view, I would be using an additional
pointcut/advice pair (possibly in a separate aspect) to make the aspectOf()
call and bind it into the target component.

aspect Configurer {
  before(SomeClass obj): execution(MyComponent.new(..)) && this(obj) {
     obj.businessRuleManager = BusinessRuleAspect.aspectOf();
  }
}

effectively this aspect is doing what spring would be doing. But I can't
say for certain that it would work.

cheers,
Andy


On 6 May 2014 05:53, erik <[email protected]> wrote:

> We have an aspect, named BusinessRuleAspect, in our code base that is used
> on
> the client side and on the server side of the project. On the server side
> we
> have spring, and the component is injected from the application context:
>
>         <bean id="businessRuleAspect"
> class="com.fugro.gwf.domain.rules.aspects.BusinessRuleAspect"
>                 factory-method="aspectOf">
>                 <property name="businessRuleManager"
> ref="businessRuleManager" />
>         </bean>
>
> The question: on the client side we don't have spring, what is the best way
> of injecting the businessRuleManager component in the aspect in such a
> case?
>
>
>
> --
> View this message in context:
> http://aspectj.2085585.n4.nabble.com/Injecting-a-component-in-a-non-spring-environment-tp4651384.html
> Sent from the AspectJ - users mailing list archive at Nabble.com.
> _______________________________________________
> aspectj-users mailing list
> [email protected]
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
_______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Reply via email to