Announcement Announcement Module
Collapse
No announcement yet.
@Configurable LTW and @Webservice Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • @Configurable LTW and @Webservice

    Hi,

    I'm trying to use @Configurable beans with Load time weaving on Weblogic 10.3.
    Everything works fine until I add a webservice in my application.

    As soon as I add a simple webservice like this:

    Code:
    @WebService(name = "SimplePortType", serviceName = "SimpleService")
    public class Simple extends SpringBeanAutowiringSupport {
    	// By default, all public methods are exposed as Web Services operation
    	public String say(String message) {
    		try {
    			System.out.println("say:" + message);
    		} catch (Exception ex) {
    			ex.printStackTrace();
    		}
    
    		return "Here is the message: '" + message + "'";
    	}
    }
    The autowiring of all my @Configurable classes stop working.

    Do you have an idea ?

    Thanks!

    Thomas

  • #2
    Just to add that it seems to be a ClassLoader issue.

    When my webservice is present the classloader that is passed to the current thread is not my webapp classloader but the generic weblogic classloader which does not load any class from my webapp (the classloader returned by the method Thread.currentThread().getContextClassLoader() is not correct)

    Is there a way to specify the classloader Spring should use ? Or is there a weblogic issue ?

    Thomas

    Comment


    • #3
      My guess is that Weblogic is instructed to use its own JAX-WS implementation which is loaded by the weblogic classloader. You can add the prefer-web-inf-classes tag in your weblogic.xml and add the JAX-WS api & implementation to the WEB-INF/lib folder of your webapp, that should do the trick.

      On a side note, if I were you I would prefer using Spring-WS instead of plain JAX-WS web services.

      Comment

      Working...
      X