This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes Message driven bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Message driven bean" Watch "Message driven bean" New topic

Message driven bean

trupti nigam
Ranch Hand

Joined: Jun 21, 2001
Posts: 613
Hi all
I have written a message driven bean examples.
the message driven bean has onMessage(),ejbCreate(),ejbRemove() & setMessageDrivenContex() methods.
The client sends the message onto the queue.
I am using weblogic6.
but when i try to run the examples i am getting an error message saying
"Exception in thread "main" java.lang.NoSuchMethodError: main"
As far as i know , there shouldn't be any main() in the message driven bean.
please let me know what is wrong in my example..
Steve Chernyak
Ranch Hand

Joined: Oct 19, 2000
Posts: 113
I think that it is looking for the main method in your client
trupti nigam
Ranch Hand

Joined: Jun 21, 2001
Posts: 613
no,actually it is not looking for the main() method..i got the answer today ..
basically message driven beans are not run from the command line..they are the listener beans which consumes messages..
when the client sends the message on to the queue the container in which it is deployed subscribes it for the que/topic..
so when u run the client from command line receives the msg.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Message driven bean
It's not a secret anymore!