> * you have to keep your variables transient - very easy mistake to make, > otherwise big boo boo might happen if the dependency is serializable and > you > wont know until much later Why would you want your services serializable?
because some services you are not in control of, they come from other libraries, and they might implement Serializable. so if you inject this and forget to mark the var as transient you are heading for a world of pain. > * you have to inject everything - ie i cant take an instance of injected > service and pass it to some other component to use Do you really need to pass the service if you could just inject it also into target? yes. i might want to perform some service resolution somewhere else, and then give the component the one it needs to use - think plugins. declarative injection works great, but by far not for all usecases. > * i dont like @Configure on the entire object, i like per-field > annotations > on the fields that is probably the matter of taste. @Configurable gives you 2 work modes: - the ability to autowire all setters by type or name: @Configurable(autowire=Autowire.BY_NAME) - injection configuration from a "prototype" @Configurable public class MyModel { private FooService fooService; //setter here } and in applicationContext : <bean class="com.mycompany.MyModel" scope="prototype"> <!-- do any injection types you like --> </bean> yeah, the second one: injection by prototype is horrid. can you imagine configuring tiny components in application context - thats a lot of xml. the reason i like fields is because i can mix in match. i have a lot of situations where some components are injected and some are not, so for me injecting the entire class wont work. > * you have to have access to the java runtime args to install the weaver not really. You can weave your classes 3 different ways: - LTW - Load-Time Weaving, the classes are weaved as they are loaded at runtime. This is the only one that requires java agent configuration on command line - aspectj compiler - compile your classes with special compiler. As the compiler extends standard JDT compiler you can use it on any classes (not only those to be weaved). For those using maven there is a special plugin utilising aspectj compiler. im not a big fan of postcompilation steps even if they are transparent in the ide. but at the end this might be the nicest way to go. with a maven plugin it shouldnt be too bad i suppose. - aspectj weaver - even if you have no access to java source you can weave .class files or whole jars that you compiled with standard compiler. this wont work, the aspectj class loader has to be above the webapplication's classloader otherwise all hell will break lose once you try to store one of these objects in session. > what is needed to fix this > * a different aspect that wraps the bean in the wicket-proxy just like we > do > now - that should give you the ultimate freedom, agreed, I will investigate the problem further -Igor -- View this message in context: http://www.nabble.com/-tutorial--Wicket-%2B-Spring-integration---revisited-tf2375652.html#a6663433 Sent from the Wicket - User mailing list archive at Nabble.com. ------------------------------------------------------------------------- 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 Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user