-
1. Re: Message "broadcasting"
clebert.suconic Jun 9, 2011 4:01 PM (in response to ronsen)All of our clustering examples are doing this kind of thing with either JMS topics or JMS Queues.. (and with the core-api also).
-
2. Re: Message "broadcasting"
ronsen Jun 9, 2011 4:24 PM (in response to clebert.suconic)got a link? hornetq or jboss examples?
-
3. Re: Message "broadcasting"
clebert.suconic Jun 9, 2011 4:31 PM (in response to ronsen)Look at the examples on the hornetq distribution.
-
4. Re: Message "broadcasting"
ronsen Jun 14, 2011 9:17 AM (in response to clebert.suconic)I tried to work according to the examples to test something, but for some reason the lookup of the queue as well as the lookup of the connection factory doesnt work adn drops this:
javax.naming.CommunicationException
: error unmarshalling return; nested exception is:
: org.hornetq.jms.referenceable.SerializableObjectRefAddr (no security manager: RMI class loader disabled)]
at org.jnp.interfaces.NamingContext.lookup(
)
at org.jnp.interfaces.NamingContext.lookup(
)
at javax.naming.InitialContext.lookup(Unknown Source)
at jma.client.Producer.main(
)
Caused by:
: error unmarshalling return; nested exception is:
: org.hornetq.jms.referenceable.SerializableObjectRefAddr (no security manager: RMI class loader disabled)
at sun.rmi.server.UnicastRef.invoke(Unknown Source)
at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
at org.jnp.interfaces.NamingContext.lookup(
)
... 3 more
the corresponding line is:
ConnectionFactory f = (ConnectionFactory)
ctx.lookup("/ConnectionFactory");@MessageDriven
,
@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"activationConfig =
{
),
@ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/testQueue"),
})
@ResourceAdapter
)
the order of them doesnt change anything.
In my "consumer class":
Together with:
public void
onMessage(Message message) {
try
{
TextMessage textMessage = (TextMessage)message;
String text = textMessage.getText();
System.
out.println("Message: "
+ text);
}
catch
(Exception e){e.printStackTrace();
}
}
Any idea?
Thanks in advance,
Edit:
________________________________
e.printStackTrace();
}
}
Any idea?
Thanks in advance,
Edit:
________________________________
- <queue name="testQueue">
- <entry name="/queue/testQueue"/>
- </queue>
added this as well to my config.
-
5. Re: Message "broadcasting"
ronsen Jun 14, 2011 9:15 AM (in response to ronsen)Btw. the wysiwyg here sucks -.- .....if i copy stuff and try to paste it, it usually breaks up everything or just pastes half of tehz content etc...
-
6. Re: Message "broadcasting"
ronsen Jun 14, 2011 9:28 AM (in response to ronsen)Ok for some reason some of the libs were missing after all it looks like this:
Exception in thread "main"
: org.hornetq.core.client.impl.ClientSessionFactoryImpl; org.hornetq.core.client.impl.ClientSessionFactoryImpl; class invalid for deserialization]
at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(
)
at org.jnp.interfaces.NamingContext.lookup(
)
at org.jnp.interfaces.NamingContext.lookup(
)
at javax.naming.InitialContext.lookup(Unknown Source)
at jma.client.Producer.main(
)
Caused by:
: org.hornetq.core.client.impl.ClientSessionFactoryImpl; org.hornetq.core.client.impl.ClientSessionFactoryImpl; class invalid for deserialization
at java.io.ObjectStreamClass.checkDeserialize(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
at java.io.ObjectInputStream.readSerialData(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at org.hornetq.jms.referenceable.SerializableObjectRefAddr.deserialize(
)
at org.hornetq.jms.referenceable.ConnectionFactoryObjectFactory.getObjectInstance(
)
at javax.naming.spi.NamingManager.getObjectInstance(Unknown Source)
at org.jnp.interfaces.NamingContext.getObjectInstance(
)
at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(
)
... 4 more
Caused by:
: org.hornetq.core.client.impl.ClientSessionFactoryImpl; class invalid for deserialization
at java.io.ObjectStreamClass.initNonProxy(Unknown Source)
at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
at java.io.ObjectInputStream.readClassDesc(Unknown Source)
... 16 more
referring to this line:
ConnectionFactory f = (ConnectionFactory) ctx.lookup(
"/ConnectionFactory");
-
7. Re: Message "broadcasting"
ataylor Jun 14, 2011 9:30 AM (in response to ronsen)I think thats a classpath issue with jboss, i think ive seen something like this before, google should find it
-
8. Re: Message "broadcasting"
ronsen Jun 14, 2011 9:40 AM (in response to ataylor)i actually added EVERYTHING from the libs to it...
-
9. Re: Message "broadcasting"
clebert.suconic Jun 14, 2011 10:59 AM (in response to ronsen)@Ron There's definitely something missing in your classpath. Either missing or you have wrong versions there on your client/lib
-
10. Re: Message "broadcasting"
ronsen Jun 14, 2011 11:21 AM (in response to clebert.suconic)Checked it all and finally found the bad guy hiding in the classpath as you said... I mixed up some of the jboss libs with the libs from the current hornetQ distribution. Due to that there were some mismatches in them.
Thanks a lot for rubbing it under my nose ;-)
greets