User: slaboure
Date: 01/12/31 07:16:50
Added: src/main/org/jboss/ha/httpsession/interfaces
ClusteredHTTPSession.java
ClusteredHTTPSessionBusiness.java
ClusteredHTTPSessionHome.java
Log:
Interfaces for the ClusteredHTTPSession EB
Revision Changes Path
1.1
jbossmx/src/main/org/jboss/ha/httpsession/interfaces/ClusteredHTTPSession.java
Index: ClusteredHTTPSession.java
===================================================================
/*
* JBoss, the OpenSource J2EE webOS
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package org.jboss.ha.httpsession.interfaces;
/**
* Remote interface for clustered HTTP sessions.
*
* @see org.jboss.ha.httpsession.interfaces.ClusteredHTTPSessionBusiness
*
* @author <a href="mailto:[EMAIL PROTECTED]">Sacha Labourey</a>.
* @version $Revision: 1.1 $
*
* <p><b>Revisions:</b>
*
* <p><b>31. d�cembre 2001 Sacha Labourey:</b>
* <ul>
* <li> First implementation </li>
* </ul>
*/
public interface ClusteredHTTPSession extends ClusteredHTTPSessionBusiness,
javax.ejb.EJBObject
{
}
1.1
jbossmx/src/main/org/jboss/ha/httpsession/interfaces/ClusteredHTTPSessionBusiness.java
Index: ClusteredHTTPSessionBusiness.java
===================================================================
/*
* JBoss, the OpenSource J2EE webOS
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package org.jboss.ha.httpsession.interfaces;
import java.rmi.RemoteException;
import java.io.Serializable;
/**
* Business methods for the entity bean that will store HTTPSession
* in a clustered environment.
*
* @see org.jboss.ha.httpsession.interfaces.ClusteredHTTPSession
*
* @author <a href="mailto:[EMAIL PROTECTED]">Sacha Labourey</a>.
* @version $Revision: 1.1 $
*
* <p><b>Revisions:</b>
*
* <p><b>31. d�cembre 2001 Sacha Labourey:</b>
* <ul>
* <li> First implementation </li>
* </ul>
*/
public interface ClusteredHTTPSessionBusiness
{
/**
* Get the session identifier associated to this HTTPSession.
* This is the primary key of the entity bean.
* @return The session id.
*/
public String getSessionId () throws RemoteException; // PK
/**
* Return the HttpSession object associated to its id. The main difference with
the
* standard class is that this one is Serializable.
*/
public SerializableHttpSession getSession () throws RemoteException;
/**
* Associate a new session (set of attributes, ...) to this id.
*/
public void setSession (SerializableHttpSession session) throws RemoteException;
// used to clean timeouted sessions without accessing the HttpSession object
//
/**
* Return the last time this session has been accessed in miliseconds since 1970.
* This method is a shortcut for getSession().getLastAccessedTime (). The reason
* is that the bean, when directly asked for the time, don't need to deserialize
* the session representation if not already done (lazy deserialization).
* If the only thing that changes in an HTTPSession it the last accessed time
(and no attributes),
* the session may not be replicated on other node (to reduce traffic).
Nevertheless,
* the new session is stored in the local bean. Consequently, if a load-balancer
* with sticky sessions is used, this is no problem (the local, updated, bean is
used.
*/
public long getLastAccessedTime() throws RemoteException;
/**
* Return the time when this session has been created in miliseconds since 1970.
* This method is a shortcut for getSession().getLastAccessedTime (). The reason
* is that the bean, when directly asked for the time, don't need to deserialize
* the session representation if not already done (lazy deserialization)
*/
public long getCreationTime() throws RemoteException;
}
1.1
jbossmx/src/main/org/jboss/ha/httpsession/interfaces/ClusteredHTTPSessionHome.java
Index: ClusteredHTTPSessionHome.java
===================================================================
/*
* JBoss, the OpenSource J2EE webOS
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package org.jboss.ha.httpsession.interfaces;
import java.rmi.RemoteException;
import javax.ejb.CreateException;
import javax.ejb.FinderException;
import java.util.Collection;
/**
* Home interface for clustered HTTP session.
*
* @see org.jboss.ha.httpsession.interfaces.ClusteredHTTPSession
*
* @author <a href="mailto:[EMAIL PROTECTED]">Sacha Labourey</a>.
* @version $Revision: 1.1 $
*
* <p><b>Revisions:</b>
*
* <p><b>31. d�cembre 2001 Sacha Labourey:</b>
* <ul>
* <li> First implementation </li>
* </ul>
*/
public interface ClusteredHTTPSessionHome extends javax.ejb.EJBHome
{
public static String JNDI_NAME = "clustering/HTTPSession";
// Constructors
//
public ClusteredHTTPSession create (String sessionId) throws RemoteException,
CreateException;
public ClusteredHTTPSession create (String sessionId, SerializableHttpSession
session) throws RemoteException, CreateException;
// Finders
//
public ClusteredHTTPSession findByPrimaryKey (String sessionId) throws
RemoteException, FinderException;
// Returns a collection of known HttpSession instances
//
public Collection findAll() throws RemoteException, FinderException;
}
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development