Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Get message out of EJB  RSS feed

 
Milt Richardson
Greenhorn
Posts: 3
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I'm new to EJB's I just got my EJB to connect to activeMQ from Glassfish. My question is this:

I have another application running on the same server that my EJB is running on and I want to get the message from the receiving EJB. Is there a way to do this and if so how? There is additional processing I need to do to the message once it is received and I don't want to do it in the EJB.

Thanks,

Milt
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'll need to have you (presumably message driven) EJB send the message to this second destination after its done its thing with it.
 
Milt Richardson
Greenhorn
Posts: 3
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul what do you mean by destination. Do you mean that I have to send it to another queue or topic? If so, does that mean I would have to send it to a local topic on the app server so my other application can receive the message or is there another way to do it?

Also, The application I'm trying to send it to is in the same App Server as the EJB. so is there a way I can forward the message from the EJB jar to the App running in the other jar file?

Thanks!
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Paul what do you mean by destination. Do you mean that I have to send it to another queue or topic? If so, does that mean I would have to send it to a local topic on the app server so my other application can receive the message or is there another way to do it?

Yes. The other alternative would be to have your EJB call your other application synchronously if this is possible.

 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!