KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > test > jmx > eardeployment > b > ejb > SessionBBean


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.b.ejb; // Generated package name
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.a.interfaces.SessionA;
32 import org.jboss.test.jmx.eardeployment.a.interfaces.SessionAHome;
33
34 /**
35  * SessionBBean.java
36  *
37  *
38  * Created: Thu Feb 21 14:50:22 2002
39  *
40  * @author <a HREF="mailto:d_jencks@users.sourceforge.net">David Jencks</a>
41  * @version
42  *
43  *
44  * @ejb:bean name="SessionB"
45  * jndi-name="eardeployment/SessionB"
46  * local-jndi-name="eardeployment/LocalSessionB"
47  * view-type="both"
48  * type="Stateless"
49  *
50  */

51
52 public class SessionBBean implements SessionBean JavaDoc {
53
54    /**
55     * Describe <code>callA</code> method here.
56     *
57     * @ejb:interface-method
58     */

59    public boolean callA()
60    {
61       try
62       {
63          SessionAHome ahome = (SessionAHome)new InitialContext JavaDoc().lookup("eardeployment/SessionA");
64          SessionA a = ahome.create();
65          a.doNothing();
66          return true;
67       }
68       catch (Exception JavaDoc e)
69       {
70          Logger.getLogger(getClass()).error("error in callA", e);
71          return false;
72       }
73    }
74
75    /**
76     * Describe <code>doNothing</code> method here.
77     *
78     * @ejb:interface-method
79     */

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

89    public void ejbCreate()
90    {
91    }
92
93
94    public void ejbActivate() throws RemoteException JavaDoc
95    {
96    }
97
98    public void ejbPassivate() throws RemoteException JavaDoc
99    {
100    }
101
102    public void ejbRemove() throws RemoteException JavaDoc
103    {
104    }
105
106    public void setSessionContext(SessionContext JavaDoc ctx) throws RemoteException JavaDoc
107    {
108    }
109
110    public void unsetSessionContext() throws RemoteException JavaDoc
111    {
112    }
113
114 }
115
116
Popular Tags