Reputation: 404
For example, as we configure the number of MDB instances listening to a JMS Queue in ejb 3 as given below,
@ActivationConfigProperty( propertyName = "maxSession", propertyValue = "someNumber")
I want to know how it can be done in EJB 2.1 Jboss 4.
Currently i use xDoclet for generating the ejb-jar.xml for the MDB and my current declaration is as follows.
* <!-- begin-xdoclet-definition -->
* @ejb.bean name="myEjb"
* acknowledge-mode="Auto-acknowledge"
* destination-type="javax.jms.Queue"
* what to use for max Session??
this results in activation configs in ejb-jar.xml as follows
<activation-config>
<activation-config-property>
<activation-config-property-name>destinationType</activation-config-property-name>
<activation-config-property-value>javax.jms.Queue</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>acknowledgeMode</activation-config-property-name>
<activation-config-property-value>Auto-acknowledge</activation-config-property-value>
</activation-config-property>
</activation-config>
Upvotes: 0
Views: 398
Reputation: 2947
According to xdoclet doc:
* @ejb.activation-config-property
* name="maxSession"
* value="someNumber"
Upvotes: 0
Reputation: 1045
The syntax that you have should work fine. If that is not working, I would suspect that you have a deployment descriptor file in your META-INF directory that is over riding the maxSession
value.
Or, conversely, if the maxSession
annotation is not being honored, you may have to use a deployment descriptor file, such as an ejb-jar.xml
file.
Upvotes: 0