cancel
Showing results for 
Search instead for 
Did you mean: 

Webservice vs sessionContext

Former Member
0 Kudos

Dear all,

I have a stateful session bean and created a webservice for this bean.

Everything works fine, except that the bean instance is recreated when it's not called for 60 seconds... I have tried all kinds of timeout parameters on j2ee and server level, but they don't seem to have effect.

Does anyone have an idea how i can prevent that the bean is reinstantiated when it hasn't been called for 60 seconds via the webservice?

Kind regards,

J.

Accepted Solutions (0)

Answers (1)

Answers (1)

siarhei_pisarenka3
Active Contributor
0 Kudos

Hi J

"In the ejb-j2ee-engine.xml there is a specific session timeout property under the <bean-props> tag. You can use this property to set the time to destroy the instance of the bean."

<enterprise-bean>
   ...
   <bean-props>
      <property>
         <property-name>session-timeout</property-name>
         <property-value>86400</property-value>
      </property>
      ...
      <property>u2026</property>
   </bean-props>
</enterprise-bean>

[Setting a Session Timeout|http://help.sap.com/saphelp_nwce10/helpdata/en/46/51800abc865e3fe10000000a11466f/content.htm]

BR, Siarhei