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