KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > ejb3 > callback > BeanCallback


1 /*
2  * JBoss, the OpenSource EJB server
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7 package org.jboss.ejb3.callback;
8
9 import org.jboss.aop.util.MethodHashing;
10
11 import java.lang.reflect.Method JavaDoc;
12
13 /**
14  * @author <a HREF="mailto:kabir.khan@jboss.org">Kabir Khan</a>
15  * @version $Revision: 1.1.6.1 $
16  */

17 public class BeanCallback extends Callback
18 {
19    public BeanCallback(Method JavaDoc callbackMethod)
20    {
21       super(callbackMethod);
22    }
23
24    public void invoke(Object JavaDoc bean)
25    {
26       try
27       {
28          callbackMethod.invoke(bean, new Object JavaDoc[0]);
29       }
30       catch(Exception JavaDoc e)
31       {
32          throw new RuntimeException JavaDoc(e);
33       }
34    }
35
36
37 }
38
Popular Tags