This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

I can get this working if I specify the -javaagent flag, but that's something I do not want. The documentation says that for Weblogic 10 there is no need use that flag. However without the flag my properties are not injected...

Do I need to configure something special on the Spring side (documentation says no...)? Or on the Weblogic side?

Comment

Hmm specifying the loadtime weaver and the spring-configured should make it work. Have you tried placing the loadtime wever before the spring-configured...

Changing the order results in the same problem when omitting the javaagent tag...

I don't think that this makes a difference. Having only "load-time-weaver" enables the "spring-configured" by default according to the doc:

This also activates the current application context for applying dependency injection to non-managed classes that are instantiated outside of the Spring bean factory (typically classes annotated with the @Configurable annotation). This will only happen if the AnnotationBeanConfigurerAspect is on the classpath (i.e. spring-aspects.jar), effectively activating "spring-configured" by default.

Comment

Recently I faced with similar problem, with only differerence that there were ejb component instead (in your case) web service component.
Trying to specify LTW through -javaagentath/to/spring-agent.jar results in that all classes loaded by "class loader" will be instrumented with what spring-agent.jar has. Question remaining : by what "class loader"? Answer with that
when you start java {$args} {$another_args} -javaagentath/to/spring-agent.jar, here comes to play (in my case) "java.sun.misc...$AppLauncher" class loader. But component (in you case WS, in my case EJB) will have another
class loader, in case of weblogic - "weblogic.utils.classloaders.GenericClassLoade r". So, your component is "uninstrumented".
You need to load spring application ctx with all that magic strings when app. server class loader load components which you want instrument. And in this case, really, you don't need LTW through -javaagentath/to/spring-agent.jar
, because spring already contains "weaver-class="org.springframework.instrument.classloading .weblogic.WebLogicLoadTimeWeaver"

Comment

I managed to make @configurable work with tomcat on another application, with -javagent options
I am using the same configuration, so there is a problem somewhere ...

edit : my bad, it was wiring fine, but some method tried to acces the wired field was called in the constructor, but the wiring happens after constructor is called.
I moved the constructor code inside a method anotated @Postconstruct