Eduardo Rocha wrote:

Yes, there is a post compilation step called weaving, if you use
AspectJ compiler (ajc). Actually ajc behaves like an ordinary
compiler, you don't need to setup a post compilation step, ajc does
everything, it compiles and weaves your code.

There is another kind of class instrumenting called Load Time Weaving
(LTW), which modifies the classes when they are loaded by the VM, and
you can use normal compilation.
Yup, to be more clear, with LTW you *do not* need the extra ajc compilation step as the weaving takes place at system startup, to be more exact, I suppose that is done when the class is loaded by the class loader.

2005/12/14, Igor Vaynberg <[EMAIL PROTECTED]>:
what do you mean its done at compile time? there is a post compilation step?

-Igor



On 12/13/05, Eduardo Rocha < [EMAIL PROTECTED]> wrote:
The binding is done at compile time, so those fields which are not
annotated behaves exactly the same way.

I had written before an aspect that injected at construction and at
deserialization, actually I don't remember why I switched to this
style, maybe because is much simpler.

2005/12/13, Igor Vaynberg <[EMAIL PROTECTED]>:
but even with @Before("get(@SpringBean * *)") you are still intercepting
every field access, and using reflection to check if the SpringBean
annotation is present. i am no aop expert, but that seems like overkill
to
me. i guess the proxy solution is really a cache to something like this.
you
do the lookup once, when you create the object, and then trade a small
hit
on your session size for cpu speed.

-Igor



On 12/13/05, Eduardo Rocha <[EMAIL PROTECTED]> wrote:
Yes, intercepting every field access could hit performance, but I
don't think can be a very serious issue:

@Before("get(@SpringBean * *)")
public void matchAnnotatedFields(JoinPoint thisJoinPoint) {

Concerning transient fields, there is a declare error on annotated
fields which are not transient:


@DeclareError("get(@wicket.contrib.spring.aspectj.SpringBean
!transient * *)")
public static final String MUST_BE_TRANSIENT = "SpringBean annotated "
                       + "field must be transient.";

2005/12/13, Igor Vaynberg < [EMAIL PROTECTED]>:
that should work if you declare your fields transient. but what is
the
performance hit? youd have to intercept every field access no?

-Igor



On 12/13/05, Eduardo Rocha <[EMAIL PROTECTED] > wrote:
The semantic is "any time an annotated field is read, it is
checked to
see if it is null, and if it is, instantiate it". I think this is
OK
with this code, what do you think?

2005/12/13, Igor Vaynberg < [EMAIL PROTECTED]>:
hmm
what about stuff like this:

UserDetachableModel { long userid; private UserService svc;
transient
User
user; void attach() { user= svc.load(userid); }

new DetachableModel(10, userService); where userService is a
proxy
to
the
user service bean.

having these proxies means i can pass them into any object i
want
such
as a
detachable model or a data provider, and when those things are
serealized/deserialized there is no problem.

-Igor



On 12/13/05, Eduardo Rocha < [EMAIL PROTECTED]> wrote:
Igor,

As I said in another post, proxies are not needed with
AspectJ.
2005/12/13, Igor Vaynberg < [EMAIL PROTECTED]>:
have a look here


http://www.wicket-wiki.org.uk/wiki/index.php/Spring
this explains both integration strategies and why the
proxies
are
needed.
-Igor


On 12/13/05, Eduardo Rocha < [EMAIL PROTECTED]>
wrote:
You are right. I will look at the current implementation
to
see if
it
works like it is working for me.

2005/12/13, Igor Vaynberg < [EMAIL PROTECTED]>:
automatic injection is not the problem. the problem is
that
injected
dependencies cannot be serialized, thus the whole proxy
approach.
-Igor



On 12/13/05, Eduardo Rocha < [EMAIL PROTECTED] >
wrote:
Spring 2.0 will bring support to objects which are not
instantiated by
the container:


http://www.theserverside.com/news/thread.tss?thread_id=38047
Actually it is very similar with what I was doing,
except
that
the
article uses a prototype (template) object in
configuration,
while
I
am annotating each field, like wicket-contrib-spring
does.

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you
grep
through
log
files
for problems?  Stop!  Download the new AJAX search
engine
that
makes
searching your log files as easy as surfing the  web.
DOWNLOAD
SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&opclick
_______________________________________________
Wicket-user mailing list
[email protected]

https://lists.sourceforge.net/lists/listinfo/wicket-user

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep
through
log
files
for problems?  Stop!  Download the new AJAX search engine
that
makes
searching your log files as easy as surfing the  web.
DOWNLOAD
SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&opclick
_______________________________________________
Wicket-user mailing list
[email protected]

https://lists.sourceforge.net/lists/listinfo/wicket-user

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep
through
log
files
for problems?  Stop!  Download the new AJAX search engine that
makes
searching your log files as easy as surfing the  web.
DOWNLOAD
SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&opclick
_______________________________________________
Wicket-user mailing list
[email protected]

https://lists.sourceforge.net/lists/listinfo/wicket-user

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through
log
files
for problems?  Stop!  Download the new AJAX search engine that
makes
searching your log files as easy as surfing the  web.  DOWNLOAD
SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&opclick
_______________________________________________
Wicket-user mailing list
[email protected]

https://lists.sourceforge.net/lists/listinfo/wicket-user

-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log
files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD
SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&opclick
_______________________________________________
Wicket-user mailing list
[email protected]

https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log
files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&opclick
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to