001: /*
002: * JBoss, Home of Professional Open Source.
003: * Copyright 2006, Red Hat Middleware LLC, and individual contributors
004: * as indicated by the @author tags. See the copyright.txt file in the
005: * distribution for a full listing of individual contributors.
006: *
007: * This is free software; you can redistribute it and/or modify it
008: * under the terms of the GNU Lesser General Public License as
009: * published by the Free Software Foundation; either version 2.1 of
010: * the License, or (at your option) any later version.
011: *
012: * This software is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * Lesser General Public License for more details.
016: *
017: * You should have received a copy of the GNU Lesser General Public
018: * License along with this software; if not, write to the Free
019: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
020: * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
021: */
022: package org.jboss.test.jmx.eardeployment.b.ejb; // Generated package name
023:
024: import java.rmi.RemoteException;
025: import javax.ejb.SessionBean;
026: import javax.ejb.SessionContext;
027: import javax.naming.InitialContext;
028: import org.jboss.logging.Logger;
029: import org.jboss.test.jmx.eardeployment.a.interfaces.SessionA;
030: import org.jboss.test.jmx.eardeployment.a.interfaces.SessionAHome;
031:
032: /**
033: * SessionBBean.java
034: *
035: *
036: * Created: Thu Feb 21 14:50:22 2002
037: *
038: * @author <a href="mailto:d_jencks@users.sourceforge.net">David Jencks</a>
039: * @version
040: *
041: *
042: * @ejb:bean name="SessionB"
043: * jndi-name="eardeployment/SessionB"
044: * local-jndi-name="eardeployment/LocalSessionB"
045: * view-type="both"
046: * type="Stateless"
047: *
048: */
049:
050: public class SessionBBean implements SessionBean {
051:
052: /**
053: * Describe <code>callA</code> method here.
054: *
055: * @ejb:interface-method
056: */
057: public boolean callA() {
058: try {
059: SessionAHome ahome = (SessionAHome) new InitialContext()
060: .lookup("eardeployment/SessionA");
061: SessionA a = ahome.create();
062: a.doNothing();
063: return true;
064: } catch (Exception e) {
065: Logger.getLogger(getClass()).error("error in callA", e);
066: return false;
067: }
068: }
069:
070: /**
071: * Describe <code>doNothing</code> method here.
072: *
073: * @ejb:interface-method
074: */
075: public void doNothing() {
076: }
077:
078: /**
079: * Describe <code>ejbCreate</code> method here.
080: *
081: * @ejb:create-method
082: */
083: public void ejbCreate() {
084: }
085:
086: public void ejbActivate() throws RemoteException {
087: }
088:
089: public void ejbPassivate() throws RemoteException {
090: }
091:
092: public void ejbRemove() throws RemoteException {
093: }
094:
095: public void setSessionContext(SessionContext ctx)
096: throws RemoteException {
097: }
098:
099: public void unsetSessionContext() throws RemoteException {
100: }
101:
102: }
|