KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > test > retry > bean > RetrySessionBean


1 //Title: jbg
2
//Version:
3
//Author: Bill Burke
4
//Company: JBG
5

6 /*
7   * JBoss, Home of Professional Open Source
8   * Copyright 2005, JBoss Inc., and individual contributors as indicated
9   * by the @authors tag. See the copyright.txt in the distribution for a
10   * full listing of individual contributors.
11   *
12   * This is free software; you can redistribute it and/or modify it
13   * under the terms of the GNU Lesser General Public License as
14   * published by the Free Software Foundation; either version 2.1 of
15   * the License, or (at your option) any later version.
16   *
17   * This software is distributed in the hope that it will be useful,
18   * but WITHOUT ANY WARRANTY; without even the implied warranty of
19   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20   * Lesser General Public License for more details.
21   *
22   * You should have received a copy of the GNU Lesser General Public
23   * License along with this software; if not, write to the Free
24   * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
25   * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
26   */

27 package org.jboss.test.retry.bean;
28
29 import java.rmi.*;
30 import javax.ejb.*;
31 import javax.naming.InitialContext JavaDoc;
32 import javax.naming.Context JavaDoc;
33 import org.jboss.test.retry.interfaces.RetryException;
34
35 public class RetrySessionBean implements SessionBean
36 {
37   private SessionContext sessionContext;
38
39   public void ejbCreate() throws RemoteException, CreateException {
40   }
41
42   public void ejbActivate() throws RemoteException {
43   }
44
45   public void ejbPassivate() throws RemoteException {
46   }
47
48   public void ejbRemove() throws RemoteException {
49   }
50
51   public void setSessionContext(SessionContext context) throws RemoteException {
52     sessionContext = context;
53   }
54
55    public void retry() throws RemoteException
56    {
57       System.out.println("**** in retry ****");
58       if (RetryException.wasRetried) return;
59       throw new RetryException();
60    }
61 }
62
Popular Tags