Forums Register Login
How can I get the HornetQ API to my ear application on Wildfly?

Can anyone tell me how to get the HornetQ API to my ear application on Wildfly?

My Message Driven Bean onMessage(Message msg) receives a message.

Then msg.getClass().getSimpleName() returns "HornetQObjectMessage".

But when I try to cast msg to HornetQObjectMessage the WildFly Log says:

I can see org/hornetq/jms/client/HornetQObjectMessage.class in this jar: WildFlyHome\modules\system\layers\base\org\hornetq\main\hornetq-core-client-2.4.7.Final.jar

So I know its there.

I tried adding this module I got from Oracle

<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.1" name="org.acmemq">
<!-- we depend on org.hornetq module since we will send messages to -->
<!-- the HornetQ server embedded in the local WildFly instance -->
<module name="org.hornetq" />

Then I modified the module's name to be my package name - GoTest.ear

<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.1" name="GoTest.ear"
<module name="org.hornetq" />

Nothing works. Everything I can find says I need to force the class loader to load dependencies. But I just can't seem to get my app dependent on the HornetQ API.

Can anyone offer any help on how to do that in this case?
Why not just use the interface, ObjectMessage? What does the class add that the interface doesn't have?
Yes, my master! Here is the tiny ad you asked for:
Rocket Oven Kickstarter - from the trailboss

This thread has been viewed 412 times.

All times above are in ranch (not your local) time.
The current ranch time is
Jul 18, 2018 12:38:55.