1   /*
2    * $Id: DummyEjbBean.java 7976 2007-08-21 14:26:13Z dirk.olmes $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.com
5    *
6    * The software in this package is published under the terms of the CPAL v1.0
7    * license, a copy of which has been included with this distribution in the
8    * LICENSE.txt file.
9    */
10  
11  package org.mule.impl.container;
12  
13  import org.mule.util.StringUtils;
14  
15  import java.rmi.RemoteException;
16  
17  import javax.ejb.EJBException;
18  import javax.ejb.EJBHome;
19  import javax.ejb.EJBObject;
20  import javax.ejb.Handle;
21  import javax.ejb.RemoveException;
22  import javax.ejb.SessionBean;
23  import javax.ejb.SessionContext;
24  
25  /**
26   * A fake (and invalid) EJB used for testing MUle ejb lookup
27   */
28  public class DummyEjbBean implements SessionBean, DummyEjb
29  {
30      /**
31       * Serial version
32       */
33      private static final long serialVersionUID = -1521532107372250896L;
34  
35      public void ejbActivate() throws EJBException
36      {
37          // nothing to do
38      }
39  
40      public void ejbPassivate() throws EJBException
41      {
42          // nothing to do
43      }
44  
45      public void ejbRemove() throws EJBException
46      {
47          // nothing to do
48      }
49  
50      public void ejbCreate() throws EJBException
51      {
52          // nothing to do
53      }
54  
55      public void setSessionContext(SessionContext sessionContext) throws EJBException
56      {
57          // nothing to do
58      }
59  
60      public void dummy()
61      {
62          // nothing to do
63      }
64  
65      public String reverseString(String string)
66      {
67          return StringUtils.reverse(string);
68      }
69  
70      public String upperCaseString(String string)
71      {
72          return string.toUpperCase();
73      }
74  
75      public EJBHome getEJBHome() throws RemoteException
76      {
77          return null;
78      }
79  
80      public Handle getHandle() throws RemoteException
81      {
82          return null;
83      }
84  
85      public Object getPrimaryKey() throws RemoteException
86      {
87          return null;
88      }
89  
90      public boolean isIdentical(EJBObject ejbObject) throws RemoteException
91      {
92          return false;
93      }
94  
95      public void remove() throws RemoteException, RemoveException
96      {
97          // nothing to do
98      }
99  
100 }