The UDTT smart data collector supports a default JMS handler to collect smart data, which can help buffer the request for collecting the data to avoid the potential performance bottleneck. User also can implement the JMS by MQ. You can configure the JMS collecting pattern in client side and server side.
The smartDAO should be set as smartDAOImpl or jmsDAOImpl. If it's set as jmsDAOImpl, it uses the JMS collecting pattern.
2 Create an MDBEJB project named SmartChannelJMSHandlerEJB and create a Bean implementation class for Enterprise Bean. Following is the sample code for the Bean class SmartDataJMSHandlerMDB:
package com.ibm.btt.channel.smart.dao.jms; import com.ibm.btt.channel.smart.jmshandler.SmartJMSHandler; /** * Bean implementation class for Enterprise Bean: SmartDataJMSHandlerMDB */ public class SmartDataJMSHandlerMDBBean extends SmartJMSHandler implements javax.ejb.MessageDrivenBean,javax.jms.MessageListener{ /** * ejbRemove */ public void ejbRemove() { } /** * ejbCreate */ public void ejbCreate() { } private javax.ejb.MessageDrivenContext fMessageDrivenCtx;
▪ Create a connection factory: JNDI name:jms/SmartChannelCF(should be the same with the jmsConnectionFactory field that set in the smart configuration file. In this case, the file is SmartChannelDataCollect.xml);
▪ Create a queue: JNDI name:jms/SmartQueue (should be the same with the jmsSendQueue field that set in the smart configuration file. In this case, the file is SmartChannelDataCollect.xml);
▪ Create an activation specification: JNDI name:jms/SmartActSpec (should be the same with the activationSpecJndiName field that set in the MDB EJB project ibm-ejb-jar-bnd.xml).
The UDTT smart data collector supports a default JMS handler to collect smart data, which can help buffer the request for collecting the data to avoid the potential performance bottleneck. User also can implement the JMS by MQ. You can configure the JMS collecting pattern in client side and server side.
1 To collect the data by JMS pattern in the client side, you need to create the MDBEJB project and configure the JMS in WebSphere admin console. Refer to the step 2 and step 3 in JMS handler in server side.
2 Then copy the jmsClinetCollector.jsp data from the client/collector directory of bttweb2collector into the web directory of the web project. Integrate the jmsClinetCollector.jsp into the web page which is configured to collect the data. Add the initialization code in the script:”initJmsEnv()”. Following is the sample code: