You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by "gioacchinomauri@libero.it" <gi...@libero.it> on 2008/04/03 23:58:43 UTC
wicket, spring and aop
Hi there,
I'm just trying to integrate wicket 1.3.2, spring 2.0 and aspect oriented programming (spring-aop). I've an aspect for instrumenting a dao provider that is defined as follow:
@Aspect()
public class DaoProviderInstrumentation {
@Around("execution(* *(..)) && target(org.mypackage.dao.DaoProvider)")
public Object executeFinder(ProceedingJoinPoint pjp) throws Throwable {
// stuff not important for now
}
A dao provider is intended to be an interface similar to the following:
public interface Daos extends DaoProvider{
public AnimalDAO getAnimalDao();
}
where AnimalDAO is another interface with methods to retrieve animals. The instrumentation should get executed when i'm trying to access to the getAnimalDao() and it should create a proxy of animalDAO that exposes "finder" methods to retrieve animals using some conventions defined by name of the methods.
The instrumentation isn't executed. I know wicket is not managed but i like the wicket framework and it would be great to use integrate it but i don't know if it is possible and what is the correct way of doing it.
I've tried to use the SpringWebApplication in the wicket-spring package but i don't know how to use it to integrate the instrumentation.
I don't need to inject components using the @SpringBean annotation.
Thanks for your time,
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: wicket, spring and aop
Posted by Korbinian Bachl - privat <ko...@whiskyworld.de>.
Hello,
im quite new to spring, but afaik you cant have spring manipulating
wicket itself; however you could create a spring based proxy-class for
those purposes and have it used by @SpringBean(name="name") where you
put the logic in it;
maybe its possible to have a wicket-PageClass be also a managed by
spring but im not sure if this works...
Is spring spewing out its lines at your current app startup? (if not:
http://cwiki.apache.org/WICKET/spring.html helds details for this)
Best,
Korbinian
gioacchinomauri@libero.it schrieb:
> Hi there,
>
> I'm just trying to integrate wicket 1.3.2, spring 2.0 and aspect oriented programming (spring-aop). I've an aspect for instrumenting a dao provider that is defined as follow:
>
> @Aspect()
> public class DaoProviderInstrumentation {
>
> @Around("execution(* *(..)) && target(org.mypackage.dao.DaoProvider)")
> public Object executeFinder(ProceedingJoinPoint pjp) throws Throwable {
> // stuff not important for now
> }
>
> A dao provider is intended to be an interface similar to the following:
>
> public interface Daos extends DaoProvider{
>
> public AnimalDAO getAnimalDao();
> }
>
> where AnimalDAO is another interface with methods to retrieve animals. The instrumentation should get executed when i'm trying to access to the getAnimalDao() and it should create a proxy of animalDAO that exposes "finder" methods to retrieve animals using some conventions defined by name of the methods.
>
> The instrumentation isn't executed. I know wicket is not managed but i like the wicket framework and it would be great to use integrate it but i don't know if it is possible and what is the correct way of doing it.
> I've tried to use the SpringWebApplication in the wicket-spring package but i don't know how to use it to integrate the instrumentation.
>
> I don't need to inject components using the @SpringBean annotation.
>
> Thanks for your time,
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org