[Messaging, JMS & JBossMQ] - Re: maxMessages
by Renen
I am probably confused. ;-) I generally am.
I think sessions worked the way you suggest in previous versions of JBoss / EJB. I read maxSessions to refer to the number of threads that can deliver messages to the queue at a time:
anonymous wrote :
| the maximum number of jms sessions that can concurrently deliver messages to this mdb - default 15
|
maxMessages definitely controls the number of MDBs instantiated, and there is a one-to-one correlation between messages being processed, and MDBs instantiated. Ie, setting maxMessages to 4 results in messages being processed 4 at a time.
What I didn't do last night was set maxMessages to a number greater than maxSessions. So I just set maxMessages to 20: 20 MDBs where instantiated, and 20 messages where processed at a time (in fact, I sent through more than 20 messages - they where still processed 20 at a go).
I have just run the test a different way. Last night I set the MDBs to simply iterate through a simple for loop until 10 seconds had passed. This evening I ran the test calling a database query that took ten seconds to elapse (so, in theory, perhaps the MDB could yield its thread to be used by another message call). The results where the same: there is a one-to-one correspondence between maxMessages, and message throughput (which I think is a good thing!).
And, there doesn't seem to be a pool size setting anymore. Its not reflected in ConfigJMSMessageListener, and JBoss throws an error if you try to set it.
I do need to mess with these settings: our resource constraints lie in the database, not in JBoss. I need to be able to control the throughput to ensure that the database does not get overwhelmed.
I would very much like to get better clarity on the definition of maxSession and maxMessages, so if anybody can shed any light, I'm listening!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4093707#4093707
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4093707
18Â years, 8Â months
[Beginners Corner] - How to define SecurityConf when creating a queue dynamically
by i_aspire_to_be
I have the following lines in the jbossmq-destinations-service.xml
<mbean code="org.jboss.mq.server.jmx.Queue"
| name="jboss.mq.destination:service=Queue,name=EMS1">
| <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
| <depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager</depends>
| <attribute name="SecurityConf">
| <security>
| <role name="mtosiclients" read="true" write="true"/>
| </security>
| </attribute>
| </mbean>
I wish to remove this entry from the XML and create a queue dynamically...
So I used the following code:
ObjectName objName = new ObjectName("jboss.mq:service=DestinationManager");
| MBeanServer server = MBeanServerLocator.locateJBoss();
| DestinationManagerMBean mbean = (DestinationManagerMBean)MBeanServerInvocationHandler.newProxyInstance(server, objName, DestinationManagerMBean.class, false);
|
| mbean.createQueue("EMS1", "queue/EMS1");
The queue gets created, but when I try to connect to it, I get a no permission error.
I wish to know whether this approach is correct and how to incorporate the Security conf which we specify in the XML, when we create the queue dynamically.
-----------------------------------
I am using jboss 4.0.5GA
Thanks in advance... for, at least you bothered to read my question :)
Jo
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4093697#4093697
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4093697
18Â years, 8Â months