-
1. Re: how to initialize the size of EJB? Help!
jae77 Apr 1, 2004 7:53 PM (in response to jamy_blue)you need to add the following to the container configuration contained in standardjboss.xml or in the ejb's jboss.xml file.
-
2. Re: how to initialize the size of EJB? Help!
jae77 Apr 1, 2004 7:54 PM (in response to jamy_blue)"jae77" wrote:
you need to add the following to the container configuration contained in standardjboss.xml or in the ejb's jboss.xml file.
<container-pool-conf>
<MinimumSize></MinimumSize>
<MaximumSize></MaximumSize>
<strictMaximumSize></strictMaximumSize>
<strictTimeout></strictTimeout>
</container-pool-conf>
min/max size = min / max beans to create
enable strictMaximumSize = true to set hard limit of ejbs created, false means that maximum will be kept available, but more may be created if needed.
you can also use the dtds to get this information as well - check out the docs/dtd in your $JBOSS_HOME directory, the html-svg version rocks!
strictTimeout controls how long the client will wait if strictMaximumSize = true.
you can also
hrm - possible forums bug there -
3. Re: how to initialize the size of EJB? Help!
jae77 Apr 1, 2004 7:58 PM (in response to jamy_blue)<container-pool-conf> <MinimumSize></MinimumSize> <MaximumSize></MaximumSize> <strictMaximumSize></strictMaximumSize> <strictTimeout></strictTimeout> </container-pool-conf>
ok - sorry for all the spam this caused - not sure if there is a bug w/ the xml rendering or not.
---
the above xml needs to be added to either the standardjboss.xml file or the ejb's jboss.xml file.
you can also check out the dtds in your JBOSS_HOME directory - the svg versions rock! -
4. Re: how to initialize the size of EJB? Help!
jae77 Apr 1, 2004 8:00 PM (in response to jamy_blue)no forum bug :) the tag got messed up.
-
5. Re: how to initialize the size of EJB? Help!
jamy_blue Apr 1, 2004 8:34 PM (in response to jamy_blue)Hi jae77, thank you for your reply.
I try what you said. I add those into the ejb's jboss.xml and standardjboss.xml. But it seem dosen't work :(
<container-configurations>
<container-configuration>
<container-name>Standard Stateless SessionBean</container-name>
<container-pool-conf>
1
1
true
</container-pool-conf>
</container-configuration>
</container-configurations>
Can you help me?
Thanks again. -
6. Re: how to initialize the size of EJB? Help!
jamy_blue Apr 1, 2004 8:37 PM (in response to jamy_blue)<container-configurations> <container-configuration> <container-name>Standard Stateless SessionBean</container-name> <container-pool-conf> <MinimumSize>1</MinimumSize> <MaximumSize>1</MaximumSize> <strictMaximumSize>true</strictMaximumSize> </container-pool-conf> </container-configuration> </container-configurations>
-
7. Re: how to initialize the size of EJB? Help!
jae77 Apr 2, 2004 8:01 AM (in response to jamy_blue)you only really need to add the entry into one location, or the other. specifying it in the standardjboss.xml file means it's a global configuration.
specifying in the jboss.xml means it's specific to only that set of ejbs.
can you post the entire contents of your jboss.xml file? -
8. Re: how to initialize the size of EJB? Help!
jamy_blue Apr 4, 2004 8:17 PM (in response to jamy_blue)Here is the jboss.xml of the EJBs
<?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>StartupSession</ejb-name>
<local-jndi-name>StartupSessionLocal</local-jndi-name>
<ejb-local-ref>
<ejb-ref-name>ejb/RDISQLRuntimeManagerBean</ejb-ref-name>
<local-jndi-name>RDISQLRuntimeManagerBeanLocal</local-jndi-name>
</ejb-local-ref>
</session>
</enterprise-beans>
<container-configurations>
<container-configuration>
<container-name>Standard Stateless SessionBean</container-name>
<container-cache-conf>
<cache-policy>org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy</cache-policy>
<cache-policy-conf>
<max-cache-miss-period>1</max-cache-miss-period>
<min-cache-miss-period>1</min-cache-miss-period>
</cache-policy-conf>
</container-cache-conf>
<container-pool-conf>
<MinimumSize>1</MinimumSize>
<MaximumSize>1</MaximumSize>
<strictMaximumSize>true</strictMaximumSize>
</container-pool-conf>
</container-configuration>
</container-configurations>
</jboss>
Pls check the file, thank you very much! -
9. Re: how to initialize the size of EJB? Help!
jamy_blue Apr 4, 2004 8:28 PM (in response to jamy_blue)Sorry, wrong paste, here :
<jboss> <enterprise-beans> <session> <ejb-name>StartupSession</ejb-name> <local-jndi-name>StartupSessionLocal</local-jndi-name> <ejb-local-ref> <ejb-ref-name>ejb/RDISQLRuntimeManagerBean</ejb-ref-name> <local-jndi-name>RDISQLRuntimeManagerBeanLocal</local-jndi-name> </ejb-local-ref> </session> </enterprise-beans> <container-configurations> <container-configuration> <container-name>Standard Stateless SessionBean</container-name> <container-pool-conf> <MinimumSize>1</MinimumSize> <MaximumSize>1</MaximumSize> <strictMaximumSize>true</strictMaximumSize> </container-pool-conf> </container-configuration> </container-configurations> </jboss>
-
10. Re: how to initialize the size of EJB? Help!
squeak Apr 7, 2004 3:36 PM (in response to jamy_blue)Per page 270 of the Admin and Devel guide, JBoss AS does not pre-seed the pool to the minimum size at startu-up -- if that is what you are trying to accomplish.
The MinimumSize element gives the minimum number of instances to keep in the pool, although JBoss does not currently seed an InstancePool to the MinimumSize value.
-
11. Re: how to initialize the size of EJB? Help!
anodos Apr 8, 2004 11:30 AM (in response to jamy_blue)I'm in the same boat as the author of this thread. I know that the JBoss manual says JBoss does not preseed the pool... but maybe someone knows of a trick to get the desired effect? Maybe now is a good time to add the preseed ability to JBoss? :-)
-
12. Re: how to initialize the size of EJB? Help!
jae77 Apr 8, 2004 1:45 PM (in response to jamy_blue)you could create an mbean that loops over some create calls once the ejb is deployed (you'd have to make the mbean's deployment dependent upon the ejb deployment).
are there specific reasons you're looking to have instances created upfront instead of using lazy instanciation?