Thanks Kevan this works great, do you know if this has to be set for the
whole of openejb or can it be set on  a ejb by ejb basis?

Kevan Miller wrote:
> 
> 
> On Jul 9, 2008, at 9:46 PM, fmchale wrote:
> 
>>
>> Hello,
>>
>> After much research I have become completely stumped and confused on  
>> this
>> issue (pardon me as well if its something simple, I am learning JEE
>> development).  I currently have a Stateful Session bean that is  
>> accessed by
>> web clients.  After approximately 20 minutes I get a  
>> NoSuchObjectException -
>> Stateful Session Bean has timed out.  Is there anyway I can set the  
>> timeout
>> to be longer then 20 minutes. Im assuming that after 20 minutes the  
>> timeout
>> occurs and instead of passivating the bean is completely destroyed.   
>> Here is
>> a snippet of important bean parts.
>>
>> public @Stateful class InternTempBean implements InternTemp{
>>
>>      @PersistenceContext(unitName="MatchMakerModel",
>> type=PersistenceContextType.EXTENDED)
>>      EntityManager emMatchMaker;
>>      
>>      public InternTempBean(){
>>      }
>>
>>        .. some more bean methods
>>
>>      @Remove
>>      public void mergeIntern(Intern_Temp intern){
>>              emMatchMaker.merge(intern);
>>      }
>>
>> I was thinking maybe there was some setting I could tell openejb to  
>> not
>> timeout after 20 minutes.
>> Can anyone guide me in the right direction here.
> 
> As you've figured out, the default timeout is 20 minutes.
> 
> To alter this default:
> 
> 1. stop your server
> 2. edit var/config/config.xml
> 3. locate the openejb module element and make it looks something like:
> 
>      <module name="org.apache.geronimo.configs/openejb/2.1.2-SNAPSHOT/ 
> car">
>          <gbean name="EJBNetworkService">
>              <attribute name="port">${OpenEJBPort + PortOffset}</ 
> attribute>
>              <attribute name="host">${ServerHostname}</attribute>
>          </gbean>
>          <gbean name="DefaultStatefulContainer">
>              <attribute name="properties">PoolSize=1000
>                TimeOut=30</attribute>
>          </gbean>
>      </module>
> 
> For an infinite TimeOut, set the value to 0.
> 
> --kevan
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Stateful-Session-Bean-NoSuchObjectException-tp18374356s134p18375532.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.

Reply via email to