View Javadoc

1   package net.sourceforge.sannotations.example3;
2   
3   import net.sourceforge.sannotations.annotation.Bean;
4   import net.sourceforge.sannotations.annotation.ManagedBean;
5   import net.sourceforge.sannotations.annotation.Scope;
6   
7   /***
8    * User: Urubatan Date: 24/10/2006 Time: 09:17:27
9    */
10  @Bean(name = "other", scopeName = "request")
11  @ManagedBean
12  public class OtherManaged {
13  	private final String	message	= "This is the other MBean and the page rendered is the /other/page.jsp";
14  	public OtherManaged(){
15  		System.out.println("----------------------------------------------------------------------------------------------------");
16  		System.out.println("----------------------------------------------------------------------------------------------------");
17  		System.out.println("----------------------------------------------------------------------------------------------------");
18  		System.out.println("Other created " + this);
19  		StackTraceElement[] stack = Thread.currentThread().getStackTrace();
20  		for(StackTraceElement e : stack){
21  			System.out.println(e.getClassName() + ":" + e.getMethodName() + ":" + e.getLineNumber());
22  		}
23  	}
24  	public String getMessage() {
25  		return this.message;
26  	}
27  }