KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > test > jmx > eardeployment > a > ejb > SessionABean


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

22 package org.jboss.test.jmx.eardeployment.a.ejb;
23
24
25
26 import java.rmi.RemoteException JavaDoc;
27 import javax.ejb.SessionBean JavaDoc;
28 import javax.ejb.SessionContext JavaDoc;
29 import javax.naming.InitialContext JavaDoc;
30 import org.jboss.logging.Logger;
31 import org.jboss.test.jmx.eardeployment.b.interfaces.SessionB;
32 import org.jboss.test.jmx.eardeployment.b.interfaces.SessionBHome;
33 import org.jboss.test.jmx.eardeployment.util.X;
34
35 /**
36  * SessionABean.java
37  *
38  *
39  * Created: Thu Feb 21 14:48:18 2002
40  *
41  * @ejb:bean name="SessionA"
42  * jndi-name="eardeployment/SessionA"
43  * local-jndi-name="eardeployment/LocalSessionA"
44  * view-type="both"
45  * type="Stateless"
46  *
47  * @author <a HREF="mailto:d_jencks@users.sourceforge.net">David Jencks</a>
48  * @author Scott.Stark@jboss.org
49  * @version $Revision: 41301 $
50  */

51 public class SessionABean implements SessionBean JavaDoc
52 {
53     private static String JavaDoc version = X.VERSION;
54    /**
55     * Describe <code>callB</code> method here.
56     *
57     * @exception RemoteException if an error occurs
58     * @ejb:interface-method
59     */

60    public boolean callB()
61    {
62       try
63       {
64          
65          SessionBHome bhome = (SessionBHome)new InitialContext JavaDoc().lookup("eardeployment/SessionB");
66          SessionB b = bhome.create();
67          b.doNothing();
68          return true;
69       }
70       catch (Exception JavaDoc e)
71       {
72          Logger.getLogger(getClass()).error("error in callB", e);
73          return false;
74       } // end of try-catch
75

76    }
77
78    /**
79     * Describe <code>doNothing</code> method here.
80     *
81     * @ejb:interface-method
82     */

83    public void doNothing()
84    {
85    }
86
87    /**
88     * Describe <code>ejbCreate</code> method here.
89     *
90     * @ejb:create-method
91     */

92    public void ejbCreate()
93    {
94    }
95
96    public void ejbActivate()
97    {
98    }
99
100    public void ejbPassivate()
101    {
102    }
103
104    public void ejbRemove()
105    {
106    }
107
108    public void setSessionContext(SessionContext JavaDoc ctx)
109    {
110    }
111 }
112
Popular Tags