We have a application which created in
weblogic 6
jdk1.3
now we migrate the same into jboss 4.1 with jdk1.6
Issues
1. performance is very slow
2. duplicate message calling [it calls repeatedly, so output is like duplicate]
here is our weblogic 6 jms setting
- <JMSConnectionFactory AllowCloseInOnMessage="false"
- DefaultDeliveryMode="Persistent" DefaultPriority="4"
- DefaultTimeToLive="0"
- JNDIName="com.query.QueryConnectionFactory"
- MessagesMaximum="-1" Name="Query Connection Factory"
- OverrunPolicy="KeepOld" Targets="myserver" TransactionTimeout="900"/>
Java code [queue name we created like mbean] and no problem in the code it works.
- private final static String JMS_FACTORY="com.query.QueryConnectionFactory";
- private final static String QUEUE_NAME="com.QueryQueue";
-
- private static Context ctx;
-
-
-
-
- public final static void dispatchQuery(String sessionDirectory,
- final QueryInfo queryInfo)
- throws ControllerException {
- try
- {
-
- ctx = getInitialContext();
-
- QueueConnectionFactory cf = (QueueConnectionFactory) ctx.lookup(JMS_FACTORY);
-
- QueueConnection queueConnection = cf.createQueueConnection();
- queueConnection.start();
-
- QueueSession session = queueConnection.createQueueSession(false,
- Session.AUTO_ACKNOWLEDGE);
-
- log("Session is: " + session);
-
- Queue queue = null;
-
- try
- {
- queue = (Queue) ctx.lookup(QUEUE_NAME);
- } catch (NamingException ne) {
- try
- {
- queue = session.createQueue(QUEUE_NAME);
- ctx.bind(QUEUE_NAME, queue);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- log("Queue is: " + queue);
-
- QueueSender sender = session.createSender(queue);
-
- QueryMessage queryMessage = new QueryMessage(sessionDirectory, queryInfo);
- ObjectMessage om = session.createObjectMessage(queryMessage);
- log("<<< DISPATCHER.. >> Before Sending message of " + om);
- sender.send(om);
- log("Sent message.");
- } catch (JMSException je) {
- String message = "Could not send the message due to:\n" +
- je.getMessage();
- throw new ControllerException(message);
- } catch (NamingException ne) {
- throw new ControllerException(ne.getMessage());
- }
- }
JBoss 4.1, the same code not working perfectly.
jbossmq-destinations-service.xml
- <mbean code="org.jboss.mq.server.jmx.Queue"
- name="jboss.mq.destination:service=Queue,name=com.query.QueryQueue">
- <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager</depends>
- </mbean>
JAVA, we used UIL2ConnectionFactory
- private final static String JMS_FACTORY="UIL2ConnectionFactory";
- private final static String QUEUE_NAME="queue/com.query.QueryQueue";
-