• Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
George Berish
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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">
<dependencies>
<!-- 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" />
</dependencies>
</module>

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"
><dependencies>
<module name="org.hornetq" />
</dependencies>
</module>

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?
 
Rob Spoor
Sheriff
Posts: 20820
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why not just use the interface, ObjectMessage? What does the class add that the interface doesn't have?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!