org.apache.openejb.test.stateful
Class BasicStatefulInterceptedBean

java.lang.Object
  extended by org.apache.openejb.test.SuperInterceptedBean
      extended by org.apache.openejb.test.stateful.BasicStatefulInterceptedBean
All Implemented Interfaces:
BasicStatefulInterceptedLocal, BasicStatefulInterceptedRemote

public class BasicStatefulInterceptedBean
extends SuperInterceptedBean
implements BasicStatefulInterceptedLocal, BasicStatefulInterceptedRemote

Version:
$Rev: 607077 $ $Date: 2007-12-27 15:55:23 +0100 (Do, 27. Dez 2007) $

Constructor Summary
BasicStatefulInterceptedBean()
           
 
Method Summary
 java.lang.String concat(java.lang.String str1, java.lang.String str2)
          A simple dummy business method to concat 2 strings
 java.util.Map<java.lang.String,java.lang.Object> getContextData()
          ClassInterceptor should not intercept this.
 java.lang.Object inBeanInterceptor(javax.interceptor.InvocationContext ctx)
          The interceptor method.
 void inBeanInterceptorPostActivate()
          The interceptor method.
 void inBeanInterceptorPostConstruct()
          The interceptor method.
 void inBeanInterceptorPreDestroy()
          The interceptor method.
 void inBeanInterceptorPrePassivate()
          The interceptor method.
 java.lang.String reverse(java.lang.String str)
          A simple dummy busines method to reverse a string
 
Methods inherited from class org.apache.openejb.test.SuperInterceptedBean
superBeanInterceptor, superBeanInterceptorPostConstruct, superBeanInterceptorPreDestroy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicStatefulInterceptedBean

public BasicStatefulInterceptedBean()
Method Detail

concat

public java.lang.String concat(java.lang.String str1,
                               java.lang.String str2)
A simple dummy business method to concat 2 strings

Specified by:
concat in interface BasicStatefulInterceptedLocal
Specified by:
concat in interface BasicStatefulInterceptedRemote
See Also:
BasicStatefulInterceptedLocal.concat(java.lang.String, java.lang.String)

reverse

public java.lang.String reverse(java.lang.String str)
A simple dummy busines method to reverse a string

Specified by:
reverse in interface BasicStatefulInterceptedLocal
Specified by:
reverse in interface BasicStatefulInterceptedRemote
See Also:
BasicStatefulInterceptedLocal.reverse(java.lang.String)

getContextData

public java.util.Map<java.lang.String,java.lang.Object> getContextData()
ClassInterceptor should not intercept this.

Specified by:
getContextData in interface BasicStatefulInterceptedLocal
Specified by:
getContextData in interface BasicStatefulInterceptedRemote
Returns:
the contextData

inBeanInterceptor

public java.lang.Object inBeanInterceptor(javax.interceptor.InvocationContext ctx)
                                   throws java.lang.Exception
The interceptor method. This should intercept all business methods in this bean class. It cannot exclude even those annotated with @ExcludeClassInterceptors

Parameters:
ctx - - InvocationContext
Returns:
- the result of the next method invoked. If a method returns void, proceed returns null. For lifecycle callback interceptor methods, if there is no callback method defined on the bean class, the invocation of proceed in the last interceptor method in the chain is a no-op, and null is returned. If there is more than one such interceptor method, the invocation of proceed causes the container to execute those methods in order.
Throws:
java.lang.Exception - runtime exceptions or application exceptions that are allowed in the throws clause of the business method.

inBeanInterceptorPostConstruct

@PostConstruct
public void inBeanInterceptorPostConstruct()
                                    throws java.lang.Exception
The interceptor method. This should intercept postConstruct of the bean

Throws:
java.lang.Exception - runtime exceptions.

inBeanInterceptorPostActivate

public void inBeanInterceptorPostActivate()
                                   throws java.lang.Exception
The interceptor method. This should intercept postActivate of the bean

Throws:
java.lang.Exception - runtime exceptions.

inBeanInterceptorPrePassivate

public void inBeanInterceptorPrePassivate()
                                   throws java.lang.Exception
The interceptor method. This should intercept prePassivate of the bean.

Throws:
java.lang.Exception - runtime exceptions.

inBeanInterceptorPreDestroy

@PreDestroy
public void inBeanInterceptorPreDestroy()
                                 throws java.lang.Exception
The interceptor method. This should intercept preDestroy of the bean.

Throws:
java.lang.Exception - runtime exceptions.


Copyright © 1999-2011 The Apache OpenEJB development community. All Rights Reserved.