With the below code I am trying to send messages other application. In Tomcat, working fine - messages sent is equal to messages received in jconsole. but when I deploy in weblogic, found sent message count is not matching with received count in jconsole means some messages are missed.
@ManagedResource
public class OBSNotificationPublisher{
@Autowired
private MessageChannel channel;
Message <?> message = MessageBuilder.withPayload( obj ).setHeader(JmxHeaders.NOTIFICATION_TYPE, notficationType ).build();<br>
channel.send( message );
}
**applicationcontext.xml**
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:si="http://www.springframework.org/schema/integration"
xmlns:jmx="http://www.springframework.org/schema/integration/jmx"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/integration
http://www.springframework.org/schema/integration/spring-integration.xsd
http://www.springframework.org/schema/integration/jmx
http://www.springframework.org/schema/integration/jmx/spring-integration-jmx.xsd">
<context:mbean-server/>
<context:mbean-export/>
<si:message-history/>
<si:channel id="channel"/>
<jmx:notification-publishing-channel-adapter
id="adapter" channel="channel"
object-name="obs.jmx.publisher:name=obsNotificationPublisher"
default-notification-type="default.type">
</jmx:notification-publishing-channel-adapter>
<bean id="obsNotificationPublisher" class="com.obs.eas.jmx.publisher.OBSNotificationPublisher" />
</beans>
Below are the weblogic server args used :
-Dweblogic.wsee.skip.async.response=true -Dcom.sun.management.jmxremote.port=6666 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.autodiscovery=true -Djavax.management.builder.initial=weblogic.management.jmx.mbeanserver.WLSMBeanServerBuilder
Can someone here help me why some messages are missed that are put in the channel ?? missing count is random for every run. thanks in advance.