BEA Systems, Inc.

theory.smart.ebusiness.session
Interface EBusinessSessionManager


public interface EBusinessSessionManager
extends Session

The EBusinessSessionManager (Manager) is a repository for EBusinessSessions (Session). It manages the complete life cycle of its Sessions. Each Session is assigned a unique identifier by the Manager. The identifiers are generated by an AlphaNumericSequencer. The programmer can either accept a default sequence generator shared by all session managers, create a new one by passing in a name in the constructor, or create their own and pass the name into the constructor.

See Also:
                  allowMultipleSessionsPerCustomer
 [EBusinessSessionManager] <*>------> [{@link boolean boolean}] 

 
                  sessionIdGenerator
 [EBusinessSessionManager] <>------> [{@link theory.smart.axiom.util.AlphaNumericSequencer theory.smart.axiom.util.AlphaNumericSequencer}] 

 
, EBusinessSessionManagerHome, EBusinessSessionManagerImpl

Method Summary
 EBusinessSession createGuestSession()
          This method allocates a new session Id and then uses the EBusinessSession home interface to create a new session associated with that Id.
 EBusinessSession createRegisteredSession(java.lang.String customerKey)
          This method will create a EBusinessSession that is associated with the specified customer.
 void deleteSession(EBusinessSession session)
          Removes the EBusinessSession.
 boolean getAllowMultipleSessionsPerCustomer()
          Get the value of allowMultipleSessionsPerCustomer
 java.util.Vector getEBusinessSessionByCustomer(java.lang.String customerKey)
          Finds all sessions associated with a particular Customer.
 EBusinessSession getEBusinessSessionBySession(java.lang.String sessionKey)
          Finds an EBusinessSession based on the session's key.
 AlphaNumericSequencer getSessionIdGenerator()
          Get the remote object reference of sessionIdGenerator
 void setAllowMultipleSessionsPerCustomer(boolean allowMultipleSessionsPerCustomer)
          Set the value of allowMultipleSessionsPerCustomer
 void setSessionIdGenerator(AlphaNumericSequencer sessionIdGenerator)
          Set the remote object reference of sessionIdGenerator
 void setSessionIdGenerator(java.lang.String sequencerKey)
          This method can be used to control the sessionIdGeneration .
 
Methods inherited from interface javax.ejb.EJBObject
getEJBHome, getHandle, getPrimaryKey, isIdentical, remove
 

Method Detail

getAllowMultipleSessionsPerCustomer

public boolean getAllowMultipleSessionsPerCustomer()
                                            throws java.rmi.RemoteException
Get the value of allowMultipleSessionsPerCustomer
Returns:
allowMultipleSessionsPerCustomer.

setAllowMultipleSessionsPerCustomer

public void setAllowMultipleSessionsPerCustomer(boolean allowMultipleSessionsPerCustomer)
                                         throws java.rmi.RemoteException
Set the value of allowMultipleSessionsPerCustomer
Parameters:
allowMultipleSessionsPerCustomers - allowMultipleSessionsPerCustomer to be added

getSessionIdGenerator

public AlphaNumericSequencer getSessionIdGenerator()
                                            throws java.rmi.RemoteException
Get the remote object reference of sessionIdGenerator
Returns:
sessionIdGenerator.

setSessionIdGenerator

public void setSessionIdGenerator(AlphaNumericSequencer sessionIdGenerator)
                           throws java.rmi.RemoteException
Set the remote object reference of sessionIdGenerator
Parameters:
sessionIdGenerators - sessionIdGenerator to be added

getEBusinessSessionBySession

public EBusinessSession getEBusinessSessionBySession(java.lang.String sessionKey)
                                              throws java.rmi.RemoteException,
                                                     javax.ejb.FinderException
Finds an EBusinessSession based on the session's key. This method is used by client applications that maintain a session key on the client and wish to re-establish context when a new "page" is activated.

getEBusinessSessionByCustomer

public java.util.Vector getEBusinessSessionByCustomer(java.lang.String customerKey)
                                               throws java.rmi.RemoteException,
                                                      javax.ejb.FinderException
Finds all sessions associated with a particular Customer. The SessionManager can be configured to allow multiple sessions for a given customer. The client application is responsible for deciding which of the sessions returned that it will use. Returns a Vector of EBusinessSessions

setSessionIdGenerator

public void setSessionIdGenerator(java.lang.String sequencerKey)
                           throws java.rmi.RemoteException,
                                  javax.ejb.CreateException
This method can be used to control the sessionIdGeneration . It accepts a sequencer id. If that sequencer does not exist it will create one. If the sequencer id is null it will default it to "EBusinessSessionManager".

createGuestSession

public EBusinessSession createGuestSession()
                                    throws java.rmi.RemoteException,
                                           javax.ejb.CreateException
This method allocates a new session Id and then uses the EBusinessSession home interface to create a new session associated with that Id. The new session will have a NULL customer reference and will be be placed in the Guest state by applying the "createGuestSession" event to the newly create state machine .

createRegisteredSession

public EBusinessSession createRegisteredSession(java.lang.String customerKey)
                                         throws java.rmi.RemoteException,
                                                javax.ejb.FinderException
This method will create a EBusinessSession that is associated with the specified customer. If the customer does not exist a guest session is created. It is the responsibility of the client to detect that the session is not associated with a customer and delete the resulting sessio if it is not to be used.

deleteSession

public void deleteSession(EBusinessSession session)
                   throws java.rmi.RemoteException,
                          javax.ejb.RemoveException
Removes the EBusinessSession.

BEA Systems, Inc.

Copyright © 2000 BEA Systems, Inc. All Rights Reserved