org.ow2.easybeans.api.bean
Interface EasyBeansSFSB

All Superinterfaces:
EasyBeansBean, EasyBeansInjection, EasyBeansLifeCycle, EasyBeansSB<EasyBeansSFSB>, EasyBeansSBLifeCycle, EasyBeansSFSBLifeCycle, EasyBeansTimedObject

public interface EasyBeansSFSB
extends EasyBeansSB<EasyBeansSFSB>, EasyBeansSFSBLifeCycle

Defines the interface of a stateful session bean.

Author:
Florent Benoit

Method Summary
 Long getEasyBeansStatefulID()
          Gets the stateful ID of the current bean.
 Boolean getInTransaction()
          Boolean indicating if the Bean is currently under a running transaction.
 Long getStatefulTimeout()
          The next timeout deadline
 void setEasyBeansStatefulID(Long easyBeansStatefulID)
          Sets the ID for this stateful bean.
 void setInTransaction(Boolean inTransaction)
          Sets the boolean indicating if the Bean is currently under a running transaction
 void setStatefulTimeout(Long statefulTimeout)
          Sets the next timeout deadline
 
Methods inherited from interface org.ow2.easybeans.api.bean.EasyBeansSB
getEasyBeansRemoved, setEasyBeansRemoved
 
Methods inherited from interface org.ow2.easybeans.api.bean.EasyBeansBean
easyBeansCleanup, getEasyBeansContext, getEasyBeansFactory, setEasyBeansContext, setEasyBeansFactory, setEasyBeansInvocationContextFactory
 
Methods inherited from interface org.ow2.easybeans.api.injection.EasyBeansInjection
injectedByEasyBeans
 
Methods inherited from interface org.ow2.easybeans.api.bean.timer.EasyBeansTimedObject
timeoutCallByEasyBeans
 
Methods inherited from interface org.ow2.easybeans.api.bean.lifecycle.EasyBeansSFSBLifeCycle
postActivateEasyBeansLifeCycle, prePassivateEasyBeansLifeCycle
 
Methods inherited from interface org.ow2.easybeans.api.bean.lifecycle.EasyBeansLifeCycle
postConstructEasyBeansLifeCycle, preDestroyEasyBeansLifeCycle
 

Method Detail

getEasyBeansStatefulID

Long getEasyBeansStatefulID()
Gets the stateful ID of the current bean.

Returns:
the id of this bean.

setEasyBeansStatefulID

void setEasyBeansStatefulID(Long easyBeansStatefulID)
Sets the ID for this stateful bean.

Parameters:
easyBeansStatefulID - the id to set.

getInTransaction

Boolean getInTransaction()

Boolean indicating if the Bean is currently under a running transaction.

If true it prevent the been from being collected due to an StatefulTimeout.

If the bean metadata doesn't define a Stateful Timeout then it should return null

Returns:
Boolean indicating if the Bean is currently under a running transaction

setInTransaction

void setInTransaction(Boolean inTransaction)
Sets the boolean indicating if the Bean is currently under a running transaction

Parameters:
inTransaction - true if the bean is under a running transaction

getStatefulTimeout

Long getStatefulTimeout()

The next timeout deadline

If the bean metadata doesn't define a Stateful Timeout then it should return null

Returns:
The next timeout deadline to be compared with System.nanoTime()

setStatefulTimeout

void setStatefulTimeout(Long statefulTimeout)
Sets the next timeout deadline

Parameters:
statefulTimeout - The next timeout deadline to be compared with System.nanoTime()


Copyright © 2006-2012 OW2 Consortium. All Rights Reserved.