fmgasparino / google-gin

Automatically exported from code.google.com/p/google-gin
Apache License 2.0
0 stars 0 forks source link

Using with gwt-ent AOP proxy #100

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. use google-gin with gwt-ent
2. try do advice an object managed and created by gin
3.

What is the expected output? What do you see instead?

I would expect all of injected objects to be created using GWT.create(), so 
gwt-ent's AOP can kick in 
during deferred binding.

Is it possible?

Original issue reported on code.google.com by dusan.ma...@gmail.com on 27 Apr 2010 at 2:55

GoogleCodeExporter commented 9 years ago
No, GWT.create can only be called on objects with no-args constructors. We are
working on AOP native to Gin though (see #38) that will be able to wrap any
Gin-created object.

Original comment by aragos on 27 Apr 2010 at 3:24

GoogleCodeExporter commented 9 years ago
Thanks, but that issue (#38) doesn't explain much. There's no roadmap, and no 
promise that it will ever be 
implemented, while gwt-ent has working solution with AspectJ annotations. About 
the no-args constructor, 
couldn't that be solved by creating that no-args constructor at compile time?

I really love to use Gin, but without AOP I have to clutter my code with 
crosscutting concerns (logging, permission 
checks, etc.), which is not really a pleasant thing to do.

Original comment by dusan.ma...@gmail.com on 28 Apr 2010 at 10:35

GoogleCodeExporter commented 9 years ago
Well, everyone working on this project is doing it in their spare time, so even 
if we
created a road map it might not be reliable. Everyone is welcome to submit a 
proposal
for a fix though and implement it.

As for creating a no-args constructor, that won't work - then we can't inject 
the
normal constructor any more.

Original comment by aragos on 28 Apr 2010 at 4:48