Mantis Bugtracker

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0002483 [Resin] minor always 03-03-08 09:22 03-03-08 14:03
Reporter ferg View Status public  
Assigned To ferg
Priority normal Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 3.1.6 Product Version 3.1.5
  Product Build
Summary 0002483: IoC/interceptor with exceptions
Description (rep by wesley)

  I've upgraded my 3.1..s080202 snapshot to release 3.1.5 today, and found
my intercepted components broken.
   After some examinations, I think the problem should be the runtime
weaver who was responsible to generate code for webbeans component annotated
to be intercepted.
   The attachment is an IntelliJ IDEA project which contains a trivial
servlet calling a injected service to output "hello" to html out. There're
four classes below:

================the binding type, no problem============
package com.mycompany.interceptors;

import javax.webbeans.InterceptorBindingType;
import java.lang.annotation.*;

@Target({ElementType.METHOD, ElementType.TYPE})
public @interface Cachable {

================the interceptor, no problem============
package com.mycompany.interceptors;

import javax.interceptor.AroundInvoke;
import javax.interceptor.InvocationContext;
import javax.webbeans.Interceptor;

public class CacheInterceptor {

public CacheInterceptor() {

public Object invoke(final InvocationContext invocation) throws Throwable {
 return invocation.proceed();


================the servlet, no problem================
package com.mycompany.servlet;


import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.ServletException;
import javax.webbeans.In;

public class MyServlet extends HttpServlet {
TestService service;
protected void doGet(HttpServletRequest request, HttpServletResponse
  throws ServletException, IOException {
 try {
 } catch (Exception e) {
  throw new ServletException(e);

================the service component, BUG!!!!!==========

import com.mycompany.interceptors.Cachable;

import javax.webbeans.Component;

public class TestService {
public TestService() {

public String service() throws Exception { // todo bug: if not throws
Exception, everything is ok
 return "hello";
Note the TODO in the service component code.

Steps To Reproduce
Additional Information
Attached Files

- Relationships

- Notes
03-03-08 14:03


Documentation is at [^]

- Issue History
Date Modified Username Field Change
03-03-08 09:22 ferg New Issue
03-03-08 14:03 ferg Note Added: 0002806
03-03-08 14:03 ferg Assigned To  => ferg
03-03-08 14:03 ferg Status new => closed
03-03-08 14:03 ferg Resolution open => fixed
03-03-08 14:03 ferg Fixed in Version  => 3.1.6

Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
28 total queries executed.
25 unique queries executed.
Powered by Mantis Bugtracker