Here are the options for an MDB Container and the related Resource Adapter:
openejb.xml
<openejb> <Container id="MyMDBContainer" type="MESSAGE"> # The resource adapter delivers messages to the container ResourceAdapter MyActiveMQResourceAdapter # Specifies the message listener interface handled by this container MessageListenerInterface javax.jms.MessageListener # Specifies the activation spec class ActivationSpecClass org.apache.activemq.ra.ActiveMQActivationSpec # Specifies the maximum number of bean instances that are # allowed to exist for each MDB deployment. InstanceLimit 10 </Container> <Resource id="MyActiveMQResourceAdapter" provider="Default JMS Resource Adapter"> # Broker configuration URI as defined by ActiveMQ # see http://activemq.apache.org/broker-configuration-uri.html BrokerXmlConfig broker:(tcp://localhost:61616)?useJmx=false # Broker address ServerUrl vm://localhost?async=true # Specifies the size of the thread pool available to AciveMQ. ThreadPoolSize 30 </Resource> </openejb>
Note on BrokerConfigXml
See Broker Configuration URI for the full list of URI syntax and options.
Support for the "broker:" and "properties:" URI syntaxes should work out of the box. For the "xbean:" option you'll need to add spring, xbean-spring and possibly a few other libraries to the libs/ dir (or your classpath if we are embedded) – all of which will be available from an activemq 4.1.1 distro.