Scott M Stark wrote:
You can't define such a minimal container configuration without extending an
existing one. Use:
<jboss>
<container-configurations>
<container-configuration extends="Standard Stateful SessionBean">
<container-name>Stateful Session Bean MasteringEJB</container-name>
Great, my JAR deployed successfully when I copied it into $JBOSS_HOME/server/default/deploy.
I was then able to run a simple client application which uses 3 separate EJB objects (each of which is a simple stateful session bean) and does a simple task. However, what I was trying to do is limit the pool of available stateful session beans to 2, so that the ejbPassivate() and ejbActivate() methods would be called.
I also adjusted my jboss.xml to include an <enterprise-beans> element with a <session> element whose <ejb-name> is the same as the <ejb-name> I have in my ejb-jar.xml, and whose <configuration-name> is the same as the <container-name> element in my <container-configuration>. I have appended the updated contents of the jboss.xml file to the end of this email in case it is of any use.
I am guessing that this is what Brian Wallis was referring to when he said that setting a <container-pool-conf> MaximumSize is not a "hard limit". Does anyone know of another way to constrain the number of session beans? I don't have to do this, but I wanted to see this in action (self-education). Thanks again Brian and Scott for pointing me in the right direction on this.
Erik
(my jboss.xml:)
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 3.0//EN" "http://www.jboss.org/j2ee/dtd/jboss_3_0.dtd"> <jboss> <enterprise-beans> <session> <ejb-name>Count</ejb-name> <configuration-name> Stateful Session Bean MasteringEJB </configuration-name> </session> </enterprise-beans>
<container-configurations> <container-configuration extends="Standard Stateful SessionBean">
<container-name> Stateful Session Bean MasteringEJB </container-name> <container-pool-conf> <MaximumSize>2</MaximumSize> <feeder-policy> org.jboss.ejb.plugins.TimedInstancePoolFeeder </feeder-policy> <feeder-policy-conf> <increment>0</increment> <period>0</period> </feeder-policy-conf> </container-pool-conf> </container-configuration> </container-configurations> </jboss>
------------------------------------------------------- This SF.Net email sponsored by: Parasoft Error proof Web apps, automate testing & more. Download & eval WebKing and get a free book. www.parasoft.com/bulletproofapps _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user