KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > hibernate > ejb > 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.hibernate.ejb.callback;
8
9 import java.lang.reflect.Method JavaDoc;
10
11 /**
12  * @author <a HREF="mailto:kabir.khan@jboss.org">Kabir Khan</a>
13  * @version $Revision: 1.3 $
14  */

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