heh, the biggest advantage of @SpringBean is that it is done _before_ the
constructor. i use services in the constructor all the time. maybe you can
tweak the aspectj aspect to also do it before as well.

-igor


On 3/23/07, Carlos Pita <[EMAIL PROTECTED]> wrote:

Here is an example of using @Configurable to integrate spring with wicket
as some people has asked me for one. To launch it just:

1) set MAVEN_OPTS=-javaagent:<path-to-aspectwaver.jar>/aspectjweaver.jar
in the env.
2) run 'mvn jetty:run'

Notice that dependencies are injected *after* constructor execution, so
for this simple toy page that just get a text message from its only
dependency, it could seem a little contrived to setup a read only Model just
for feeding that message. More realistic scenarios generally will put a dao
behind a model so the dependency won't be directly needed at construction
time but instead when model callbacks are called.

I clearly see what you mean now. Maybe you can define another pointcut for
> > the ConfigurerAspect that is not annotation based so you can advice classes
> > which you are not able to modify. But anyway the simplicity that appealed me
> > at first about my suggestion was somewhat
> >
>
I've been done a little research and find out that the class
AbstractBeanConfigurerAspect is provided just for this need. See for example
http://forum.springframework.org/showthread.php?t=30993.

Cheers,
Carlos


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to