Weblogic Workmanagers and JAX-WS webservices

2019-07-25 15:50发布

问题:

is it possible to manage Jax-WS annotated Webservices in Weblogic WorkManagers (at less WLS 10.3.4) as we can do for Servlets or EJBs ?

回答1:

Yes!

If you have a global Work Manager you can try that in your weblogic.xml:

<?xml version="1.0" encoding="UTF-8"?><wls:weblogic-web-app xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-web-app" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.3/weblogic-web-app.xsd">
    <wls:weblogic-version>10.3.6</wls:weblogic-version>
    <wls:context-root>StuckThreadWebProject</wls:context-root>
    <wls:wl-dispatch-policy>wm/NoStuckWorkManager</wls:wl-dispatch-policy>
</wls:weblogic-web-app>

Otherwise:

<?xml version="1.0" encoding="UTF-8"?><wls:weblogic-web-app xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-web-app" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.3/weblogic-web-app.xsd">
    <wls:weblogic-version>10.3.6</wls:weblogic-version>
    <wls:context-root>StuckThreadWebProject</wls:context-root>
    <wls:work-manager>
        <wls:name>wm/NoStuckWorkManager</wls:name>
        <wls:ignore-stuck-threads>true</wls:ignore-stuck-threads>
    </wls:work-manager>
    <wls:wl-dispatch-policy>wm/NoStuckWorkManager</wls:wl-dispatch-policy>
</wls:weblogic-web-app>

Replace <wls:work-manager> content as you wish.