-
1. Re: Restrict number of bean instances
petertje Jan 31, 2003 7:11 AM (in response to lumin)> purpose i'd like to restrict the number of bean
> instances, for a individual jar-application (not for
> the whole container). By editing jboss.xml entries
> container configuartion, instance-pool and
> instance-case, i'm not able to achive this task. Any
> suggestions? Thanks, in advance, lumin
You can specify alternative configurations in the jboss.xml deployment descriptor (either in the standaardjboss.xml or in the one in your ejb jar) and you can specify with each EJB which configuration to use. -
2. Re: Restrict number of bean instances
lumin Feb 4, 2003 4:50 AM (in response to lumin)I already checked this out ba editing the web apps jboss. xml. Refering to jboss docu the element container-pool-conf (Maximum size)allows to achieve this. I tested this on JBoss 3.0.5. where this is a hard limit. Unfortunately this didn't work. Any suggestions why?
regards -
3. Re: Restrict number of bean instances
lumin Feb 4, 2003 4:55 AM (in response to lumin)I already checked this out ba editing the web apps jboss. xml. Refering to jboss docu the element container-pool-conf (Maximum size)allows to achieve this. I tested this on JBoss 3.0.5. where this is a hard limit. Unfortunately this didn't work. Any suggestions why?
regards lumin -
4. Re: Restrict number of bean instances
lumin Feb 4, 2003 4:56 AM (in response to lumin)I already checked this out ba editing the web apps jboss. xml. Refering to jboss docu the element container-pool-conf (Maximum size)allows to achieve this. I tested this on JBoss 3.0.5. where this is a hard limit. Unfortunately this didn't work. Any suggestions why?
-
5. Re: Restrict number of bean instances
mgrove Mar 14, 2003 6:26 PM (in response to lumin)dunno if you fixed your problem - if so, please post the solution.
if not, i may be able to help...
i posted a similar question to the EJB/JBoss forum a few days ago (haven't gotten a response). i'm also trying to use the MaximumSize option to limit the number of bean instances. one thing you may have missed is the strictMaximumSize flag (which is documented less heavily than MaximumSize). unless it is set, the MaximumSize option is not a hard limit. e.g. you'll want content like the following in your jboss.xml
<container-pool-conf>
5
true
</container-pool-conf>
this didn't work exactly how i expected it to, but it may work for you. in my case, i share a SLSB remote reference across multiple threads, and i wished to limit the number of concurrent invocations of it. my MaximumSize setting of 5 did not enforce this limit.
it's possible that jboss considers me to have only one instance of the SLSB, so it does not restrict concurrent access. i'm going to try sharing the home reference instead of the remote reference to see if that affects things.
-mike -
6. Re: Restrict number of bean instances
mgrove Mar 18, 2003 11:51 PM (in response to lumin)for the next person that comes across this thread in a search - i got a response to my forum post on this topic:
http://jboss.org/forums/thread.jsp?forum=47&thread=29670
the answer was that the strictMaximumSize setting was not added to 3.0 until 3.0.5. so that setting is silently ignored if you have an older version like i did. i assume it works as expected with 3.0.5 or later, although i have not verified.