• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

MDB in EAR doubt

 
Ranch Hand
Posts: 253
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ranchers,
I
I am having 2 ear applications(suppose sample1.ear & sample2.ear). Both are having web and ejb modules Both applications are having message driven beans of EJB 3.0. I deployed both of them in IBM websphere 7 server.
My Requirement is , sample1 has ejb session bean which access sample2 message driven bean.
what i did is , i added jar file of sample2.ear to sample1.ear and ran the application .but of no use. Please suggest me to work on this.

Thanks & Regards
vipul
 
Bartender
Posts: 1104
10
Netbeans IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Vipul,
A session bean does not 'access' a message driven bean. A session bean can post a message to a topic/queue. If the MDB is registered to listen to this queue/topic, it will pick-up the message and do the processing.
This page from the tutorial shows how a client can send a message to a queue/topic.
 
vipul John
Ranch Hand
Posts: 253
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ranganathan,

I didnot meant session bean access a message driven bean. I meant , session bean has IBM MQ server connection and queue connection code. I successfully sent a message to a MDB. But my requirement is different. Please check my post.


Thanks
Vipul Kumar
 
Ranganathan Kaliyur Mannar
Bartender
Posts: 1104
10
Netbeans IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Vipul,
I re-read your post. I am unable to infer anything different from what I understood earlier. Can you elaborate?
 
vipul John
Ranch Hand
Posts: 253
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ranganathan Kaliyur Mannar wrote:Hi Vipul,
A session bean does not 'access' a message driven bean. A session bean can post a message to a topic/queue. If the MDB is registered to listen to this queue/topic, it will pick-up the message and do the processing.




This is absolutely right. I am clear with this. My Issue is, In Sample1.ear , iam having a session bean which is sending messages to queue.queue is registered in IBM MQ server. that message has to reach MDB in sample2.ear. will it be possible? In my case iam unable to communicate with two different ears.

Thanks
Vipul Kumar

 
Ranganathan Kaliyur Mannar
Bartender
Posts: 1104
10
Netbeans IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If the MDB in the second ear listens to the queue that you are talking about, then, it will pick up the message. It doesn't matter where the message comes from.
reply
    Bookmark Topic Watch Topic
  • New Topic