Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Scout » MOM marshaller question(How to use a different marshaller instance?)
MOM marshaller question [message #1864046] Wed, 13 March 2024 11:15 Go to next message
Stefan Mutschler is currently offline Stefan MutschlerFriend
Messages: 26
Registered: June 2012
Location: Baden-Baden, Germany
Junior Member
Hello all,

I am currently testing how to use MOM and it works fine so far when using the default ObjectMapper. But when trying to configure a different mapper like the JsonMapper I find that the ObjectMapper is still being used.

default.properties:
scout.mom.cluster.environment[scout.mom.jms.clientId]=Test
scout.mom.cluster.environment[scout.mom.name]=Scout Cluster MOM
scout.mom.cluster.environment[scout.mom.connectionfactory.name]=ClusterMom
scout.mom.cluster.environment[java.naming.factory.initial]=org.apache.activemq.jndi.ActiveMQInitialContextFactory
scout.mom.cluster.environment[java.naming.provider.url]=tcp://localhost:61616?jms.useAsyncSend=true
scout.mom.cluster.environment[connectionFactoryNames]=ClusterMom
scout.mom.cluster.environment[java.naming.security.principal]=USERNAME
scout.mom.cluster.environment[java.naming.security.credentials]=PASSWORD
scout.mom.cluster.implementor=org.eclipse.scout.rt.mom.jms.JmsMomImplementor
scout.mom.marshaller=org.eclipse.scout.rt.mom.api.marshaller.JsonMarshaller


At startup Eclipse Scout shows the following information:
Scout Cluster MOM configuration: {scout.mom.name=Scout Cluster MOM, java.naming.security.principal=USERNAME, java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory, scout.mom.connectionfactory.name=ClusterMom, java.naming.provider.url=tcp://localhost:61616?jms.useAsyncSend=true, connectionFactoryNames=ClusterMom, java.naming.security.credentials=PASSWORD, scout.mom.jms.clientId=Test, scout.mom.marshaller=org.eclipse.scout.rt.mom.api.marshaller.ObjectMarshaller@63c5542f}


ObjectMarshaller is still being used which I can also confirm from the subscriber side having a look at the message received from my connected test service.

Taking a look at the ClusterMom implementation I can see that ObjectMarshaller is set as the DefaultMarshaller there.

What am I missing? Any ideas or pointers for me?

Best regards

Stefan

[Updated on: Wed, 13 March 2024 11:17]

Report message to a moderator

Re: MOM marshaller question [message #1864051 is a reply to message #1864046] Wed, 13 March 2024 14:50 Go to previous messageGo to next message
Paolo Bazzi is currently offline Paolo BazziFriend
Messages: 33
Registered: January 2017
Location: Switzerland
Member
Hi Stefan

The `scout.mom.marshaller` property is not a global one but interpreted as part of the environment configuration of your MOM.

So in your case use this notation to exchange the marshaller:

scout.mom.cluster.environment[scout.mom.marshaller]=org.eclipse.scout.rt.mom.api.marshaller.JsonMarshaller


Regards.
Paolo


Eclipse Scout Homepage | Documentation | GitHub
Re: MOM marshaller question [message #1864053 is a reply to message #1864051] Wed, 13 March 2024 15:25 Go to previous message
Stefan Mutschler is currently offline Stefan MutschlerFriend
Messages: 26
Registered: June 2012
Location: Baden-Baden, Germany
Junior Member
Hello Paolo,

works like a charm! Thank you for your reply...

Stefan
Previous Topic:BrowserField cannot load page
Next Topic:Problem with IntelliJ Plugin with 2023.3.4, 2023.2.6 is working fine
Goto Forum:
  


Current Time: Mon May 20 03:13:59 GMT 2024

Powered by FUDForum. Page generated in 0.03169 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top