wood burning stoves 2.0*
The moose likes BEA/Weblogic and the fly likes setting pool size for ejb ??????????? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "setting pool size for ejb ???????????" Watch "setting pool size for ejb ???????????" New topic
Author

setting pool size for ejb ???????????

pan bishnoi
Greenhorn

Joined: Feb 01, 2004
Posts: 7
hi
i am developing a stateful session bean. i just want to ask how to limit bean pool size to 2 so that i can check been activation and passivation. i also want to know where is this bean pool size parameter.

pankaj bishnoi
Ashish Pagare
Ranch Hand

Joined: Oct 14, 2003
Posts: 101
The bean pool size setting goes in weblogic-ejb-jar.xml, which is weblogic specific deployment descriptor. A simple configuration looks something like this:

HTH.
pan bishnoi
Greenhorn

Joined: Feb 01, 2004
Posts: 7
hi Ashish
Thanks for replying. you have suggested bean pool size for stateless session. what we will do in case of statefulsession.

pankaj bishnoi
Ashish Pagare
Ranch Hand

Joined: Oct 14, 2003
Posts: 101
For stateful session bean you can specify the cache details in weblogic-ejb-jar.xml file:
<?xml version="1.0"?><!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB//EN'
'http://www.bea.com/servers/wls600/dtd/weblogic-ejb-jar.dtd'><weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>BEAN_NAME_AS_DEFINED_IN_EJB_JAR_D</ejb-name>
<stateful-session-descriptor>
<stateful-session-cache>
<max-beans-in-cache>2</max-beans-in-cache>
<idle-timeout-seconds>100</idle-timeout-seconds>
<cache-type>LRU</cache-type>
</stateful-session-cache>
</stateful-session-descriptor>
<jndi-name>MY_JNDI_NAME</jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
Since stateful session bean is created for every client there is no pooling associated with it instead welogic provides cache facility. Please refer to the stateful-session-descriptor documentation in weblogic ejb guide for more details.
Thanks.
pan bishnoi
Greenhorn

Joined: Feb 01, 2004
Posts: 7
Hi Ashish
Thanks for replying. The suggestion you had given has worked.I am able to check ejbActivate and ejbPassivate with stateful session beans.

Pankaj Bishnoi
 
GeeCON Prague 2014
 
subject: setting pool size for ejb ???????????