Configure the JCA Adaptor
32.4. Configuring the JCA Adaptor The Java Connector Architecture (JCA) Adapter is what allows HornetQ to be integrated with JEE components such as MDBs and EJBs. It configures how components such as MDBs consume messages from the HornetQ server and also how components such as EJBs or Servlets can send messages. The HornetQ JCA adapter is deployed via the jms-ra.rar archive. The configuration of the adapter is found in this archive under META-INF/ra.xml. The configuration will look something like the following: org.hornetq.ra.HornetQResourceAdapter The transport type ConnectorClassName java.lang.String org.hornetq.core.remoting.impl.invm.InVMConnectorFactory The transport configuration. These values must be in the form of key=val;key=val; ConnectionParameters java.lang.String server-id=0 org.hornetq.ra.HornetQRAManagedConnection Factory The default session type SessionDefaultType java.lang.String javax.jms.Queue Try to obtain a lock within specified number of seconds; less than or equal to 0 disable this functionality UseTryLock java.lang.Integer 0 org.hornetq.ra.HornetQRAConnectionFactory javax.jms.Session org.hornetq.ra.HornetQRASession XATransaction BasicPassword javax.resource.spi.security.PasswordCredential false javax.jms.MessageListener org.hornetq.ra.inflow.HornetQActivationSpec destination There are three main parts to this configuration. A set of global properties for the adapter The configuration for the outbound part of the adapter. This is used for creating JMS resources within EE components. The configuration of the inbound part of the adapter. This is used for controlling the consumption of messages via MDBs.