|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.webbeans.web.failover.DefaultOwbFailOverService
public class DefaultOwbFailOverService
Default implementation of the FailOverService.
| Field Summary | |
|---|---|
static String |
ATTRIBUTE_CONVERSATION_CONTEXT_MAP
|
static String |
ATTRIBUTE_SESSION_CONTEXT
|
static String |
CONFIG_IS_SUPPORT_FAILOVER
|
static String |
CONFIG_IS_SUPPORT_PASSIVATE
|
static String |
CONFIG_RESOURCES_SERIALIZATION_HANDLER
|
| Fields inherited from interface org.apache.webbeans.spi.FailOverService |
|---|
NOT_HANDLED |
| Constructor Summary | |
|---|---|
DefaultOwbFailOverService()
|
|
| Method Summary | |
|---|---|
protected void |
addActivationListenerToSession(javax.servlet.http.HttpSession session)
Adds the FailOverSessionActivationListener to the current HttpSession. |
protected void |
addFailOverBagToSession(FailOverBag bag,
javax.servlet.http.HttpSession session)
Store the FailOverBag as attribute to the current HttpSession. |
void |
enableFailOverSupport(boolean supportFailOver)
|
void |
enablePassivationSupport(boolean supportPassivation)
|
String |
getJvmId()
|
ObjectInputStream |
getObjectInputStream(InputStream in)
Get object input stream. |
ObjectOutputStream |
getObjectOutputStream(OutputStream out)
Get object output stream. |
Object |
handleResource(javax.enterprise.inject.spi.Bean<?> bean,
Object resourceObject,
ObjectInput in,
ObjectOutput out)
Except the EJB remote stub, it is hard to handle other types of resources. |
boolean |
isPassivation()
|
boolean |
isSupportFailOver()
|
boolean |
isSupportPassivation()
|
protected void |
restoreBeansFromFailOverBag(FailOverBag bag,
javax.servlet.http.HttpSession session)
Restores the session and conversation contexts from the given FailOverBag. |
void |
sessionDidActivate(javax.servlet.http.HttpSession session)
|
void |
sessionIsIdle(javax.servlet.http.HttpSession session)
|
void |
sessionIsInUse(javax.servlet.http.HttpSession session)
|
void |
sessionWillPassivate(javax.servlet.http.HttpSession session)
|
protected void |
storeBeansInFailOverBag(FailOverBag bag,
javax.servlet.http.HttpSession session)
Stores the session and conversation contexts in the FailOverBag. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String CONFIG_IS_SUPPORT_FAILOVER
public static final String CONFIG_IS_SUPPORT_PASSIVATE
public static final String CONFIG_RESOURCES_SERIALIZATION_HANDLER
public static final String ATTRIBUTE_SESSION_CONTEXT
public static final String ATTRIBUTE_CONVERSATION_CONTEXT_MAP
| Constructor Detail |
|---|
public DefaultOwbFailOverService()
| Method Detail |
|---|
public void sessionIsIdle(javax.servlet.http.HttpSession session)
sessionIsIdle in interface FailOverServicepublic void sessionIsInUse(javax.servlet.http.HttpSession session)
sessionIsInUse in interface FailOverServicepublic void sessionDidActivate(javax.servlet.http.HttpSession session)
sessionDidActivate in interface FailOverServicepublic void sessionWillPassivate(javax.servlet.http.HttpSession session)
sessionWillPassivate in interface FailOverServiceprotected void addActivationListenerToSession(javax.servlet.http.HttpSession session)
FailOverSessionActivationListener to the current HttpSession.
It must not be manually registered when we store it as session attribute.
session - The current HttpSession.
protected void addFailOverBagToSession(FailOverBag bag,
javax.servlet.http.HttpSession session)
FailOverBag as attribute to the current HttpSession.
So when the session is fail over to other JVM or local disk, the
attribute could also be serialized.
bag - The FailOverBag.session - The current HttpSession.
protected void storeBeansInFailOverBag(FailOverBag bag,
javax.servlet.http.HttpSession session)
FailOverBag.
bag - The FailOverBag.session - The current HttpSession.
protected void restoreBeansFromFailOverBag(FailOverBag bag,
javax.servlet.http.HttpSession session)
FailOverBag.
bag - The FailOverBag.session - The current HttpSession.
public Object handleResource(javax.enterprise.inject.spi.Bean<?> bean,
Object resourceObject,
ObjectInput in,
ObjectOutput out)
handleResource in interface FailOverService
public ObjectInputStream getObjectInputStream(InputStream in)
throws IOException
getObjectInputStream in interface FailOverServiceIOException
public ObjectOutputStream getObjectOutputStream(OutputStream out)
throws IOException
getObjectOutputStream in interface FailOverServiceIOExceptionpublic String getJvmId()
getJvmId in interface FailOverServicepublic boolean isSupportFailOver()
isSupportFailOver in interface FailOverServicepublic void enableFailOverSupport(boolean supportFailOver)
enableFailOverSupport in interface FailOverServicepublic boolean isSupportPassivation()
isSupportPassivation in interface FailOverServicepublic void enablePassivationSupport(boolean supportPassivation)
enablePassivationSupport in interface FailOverServicepublic boolean isPassivation()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||