1. /*
  2. * Copyright 2002 Sun Microsystems, Inc. All rights reserved.
  3. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  4. */
  5. package javax.ejb;
  6. import java.rmi.*;
  7. /**
  8. * The EJBHome interface must be extended by all enterprise
  9. * Beans' remote home interfaces. An enterprise Bean's remote home interface
  10. * defines the
  11. * methods that allow a remote client to create, find, and remove EJB objects,
  12. * as well as home business methods that
  13. * are not specific to a bean instance (Session Beans do not have
  14. * finders and home methods).
  15. * <p> The remote home interface is defined by the enterprise Bean provider and
  16. * implemented by the enterprise Bean container.
  17. */
  18. public interface EJBHome extends Remote {
  19. /**
  20. * Remove an EJB object identified by its handle.
  21. *
  22. * @exception RemoveException Thrown if the enterprise Bean or
  23. * the container does not allow the client to remove the object.
  24. *
  25. * @exception RemoteException Thrown when the method failed due to a
  26. * system-level failure.
  27. */
  28. void remove(Handle handle) throws RemoteException, RemoveException;
  29. /**
  30. * Remove an EJB object identified by its primary key.
  31. *
  32. * <p>This method can be used only for an entity bean. An attempt
  33. * to call this method on a session bean will result in a RemoteException.
  34. *
  35. * @exception RemoveException Thrown if the enterprise Bean or
  36. * the container does not allow the client to remove the object.
  37. *
  38. * @exception RemoteException Thrown when the method failed due to a
  39. * system-level failure.
  40. */
  41. void remove(Object primaryKey) throws RemoteException, RemoveException;
  42. /**
  43. * Obtain the EJBMetaData interface for the enterprise Bean. The
  44. * EJBMetaData interface allows the client to obtain information about
  45. * the enterprise Bean.
  46. *
  47. * <p> The information obtainable via the EJBMetaData interface is
  48. * intended to be used by tools.
  49. *
  50. * @return The enterprise Bean's EJBMetaData interface.
  51. *
  52. * @exception RemoteException Thrown when the method failed due to a
  53. * system-level failure.
  54. */
  55. EJBMetaData getEJBMetaData() throws RemoteException;
  56. /**
  57. * Obtain a handle for the remote home object. The handle can be used at
  58. * later time to re-obtain a reference to the remote home object, possibly
  59. * in a different Java Virtual Machine.
  60. *
  61. * @return A handle for the remote home object.
  62. *
  63. * @exception RemoteException Thrown when the method failed due to a
  64. * system-level failure.
  65. */
  66. HomeHandle getHomeHandle() throws RemoteException;
  67. }