    All Examples  All Cluster Examples  This Example  This Package

# Interface examples.cluster.ejb.account.AccountHome

public interface AccountHome
extends EJBHome

This interface is the home interface for the EJBean AccountBean, which in WebLogic is implemented by the code-generated container class AccountBeanC. A home interface may support one or more create methods, which must correspond to methods named "ejbCreate" in the EJBean.

Author:
  Copyright (c) 1999-2000 by BEA Systems, Inc. All Rights Reserved.

##

create(String, double)
  This method corresponds to the ejbCreate method in the bean "AccountBean.java".
findByPrimaryKey(AccountPK)
  Given a Primary Key, refreshes the EJBean from the persistent storage.

##

create

     public abstract Account create(String accountId,
                                    double initialBalance) throws CreateException, RemoteException

  This method corresponds to the ejbCreate method in the bean "AccountBean.java". The parameter sets of the two methods are identical. When the client calls `AccountHome.create()`, the container (which in WebLogic EJB is also the factory) allocates an instance of the bean and calls `AccountBean.ejbCreate()` For container-managed persistence, `ejbCreate()` returns a void, unlike the case of bean-managed persistence, where it returns a primary key.

  Parameters:
    accountId - String Account ID
    initialBalance - double Initial balance
  Returns:
    Account
  Throws: CreateException
    if there is an error creating the bean
  Throws: RemoteException
    if there is a communications or systems failure
  See Also:
    AccountBean

findByPrimaryKey

     public abstract Account findByPrimaryKey(AccountPK primaryKey) throws FinderException, RemoteException

  Given a Primary Key, refreshes the EJBean from the persistent storage.

  Parameters:
    primaryKey - AccountPK Primary Key
  Returns:
    Account
  Throws: FinderException
    if there is an error finding the bean
  Throws: RemoteException
    if there is a communications or systems failure
  See Also:
    AccountBean

    All Examples  All Cluster Examples  This Example  This Package