Hello,

I am getting my hands on using JMX with Spring 3.0.

I want to see the notification getting updated in JConsole whenever I access my ServiceImpl method. But I get warning message from JConsole stating that

Code:
WARNING: Failed to deserialize a notification: java.io.NotSerializableException: org.springframework.jmx.export.notification.ModelMBeanNotificationPublisher
I am successfully able to expose my bean to MBean server & able to see it in JConsole. Here is my configuration

Code:
    <!-- MBean Server Factory -->
    <bean id="mbeanServer" class="org.springframework.jmx.support.MBeanServerFactoryBean">
     <property name="locateExistingServerIfPossible" value="true"></property>
     <property name="agentId" value="MMAC-056_1306399012572"></property>
    </bean>

    <!-- this bean must not be lazily initialized if the exporting is to happen -->
    <bean id="exporter" 
    class="org.springframework.jmx.export.MBeanExporter" lazy-init="false">
    <property name="beans">
    <map>
       <entry key="bean:name=searchCampaignService" value-ref="campaignService" />
    </map>
    </property>
    <property name="server" ref="mbeanServer"></property>
    <property name="autodetect" value="true"></property>
    <property name="registrationBehaviorName" value="REGISTRATION_REPLACE_EXISTING" />
    <property name="assembler">
    <bean class="org.springframework.jmx.export.assembler
                                                   .MethodNameBasedMBeanInfoAssembler">
	<property name="managedMethods">
		<value>searchCampaignById</value>
	</property>
    </bean>
    </property>
    <property name="notificationListenerMappings">
    <map>
        <entry key="bean:name=searchCampaignService">
            <bean class="com....TestLoggingNotificationHandler" />
        </entry>
    </map>
    </property>

    </bean>
My serviceimpl class implements NotificationPublisherAware interface & I am sending notification from the managed method.

I can also see the JConsole displaying the bean with operation & notification nodes.

I subscribe to notification & run my client application.

As soon as I run my client app and access the service, the JConsole displays warning stating that

Code:
 May 26, 2011 4:53:41 AM ClientNotifForwarder NotifFetcher.fetchOneNotif
    WARNING: Failed to deserialize a notification: java.io.NotSerializableException:   

    org.springframework.jmx.export.notification.ModelMBeanNotificationPublisher
I made my service & UserDataObject as serializable.. I also tried passing string to

Code:
 notification.setUserData("Test notification"+ctr);
but still JConsole keeps on displaying the warning notserializableexception.

Please let me know if I am missing any configuration or setting.

I don't know where I am going wrong?