File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes publish another message inside a messagebean ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "publish another message inside a messagebean ?" Watch "publish another message inside a messagebean ?" New topic
Author

publish another message inside a messagebean ?

Edward Chen
Ranch Hand

Joined: Dec 23, 2003
Posts: 798
Hi, I have a questions about message bean. we can publish another message inside a messagebean. We can do that ?
for example,
onMessage(..){
//check if the stock is below 0; if yes, publish a warning message to sale depatment.
if(stockAmount < 0){
// publish a new message
Topic ss = (Topic) context.lookup(..);
..
publisher.publish(tm);
}
}
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Yes, that is is possible.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: publish another message inside a messagebean ?