Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
AS 4.2.2.GA
-
None
Description
EJB3 with @WebService and @Stateless only defined does not cause interceptors to be called. If you add @Remote, @Local, or @Service, everything works fine.
The example code below does NOT cause the interceptor to be called. If you add "@Remote(TestWSIF.class)" under @Stateless, the interceptor works as expected.
package org.example;
import javax.ejb.Remote;
import javax.ejb.Stateless;
import javax.interceptor.Interceptors;
import javax.jws.WebService;
@WebService(serviceName="TestWS", portName="TestWSPort", endpointInterface="org.example.TestWSIF")
@Stateless
public class TestWS implements TestWSIF {
@Interceptors(TestInterceptor.class)
public void sayHello(String name)
}
-------------------
package org.example;
import javax.jws.WebService;
@WebService
public interface TestWSIF {
public void sayHello(String name);
}
-------------------
package org.example;
import javax.interceptor.AroundInvoke;
import javax.interceptor.InvocationContext;
public class TestInterceptor {
@AroundInvoke
public Object doStuff(InvocationContext ctx) throws Exception
}