wood burning stoves 2.0*
The moose likes Object Relational Mapping and the fly likes Similar to MDB in Hibernate? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Similar to MDB in Hibernate?" Watch "Similar to MDB in Hibernate?" New topic
Author

Similar to MDB in Hibernate?

Sahil Saxena
Greenhorn

Joined: May 26, 2005
Posts: 22
Hi,

I want to use a feature same like Message Driven Bean(MDB) in my project so does Hibernate provide such feature?

Incase not, is there any else solution to it as I dont want to use EJB.

Thanks


SCJP 1.4 & SCWCD
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41095
    
  44
MDB are Java objects running inside of an EJB container and which are accessible via JMS. They have nothing to do with Hibernate and its functionality (which kind of competes with entity beans, not message-driven beans).

Is your question more about accessing a server via JMS, or about persisting objects? Because the two really have nothing to do with each other.


Ping & DNS - my free Android networking tools app
Sahil Saxena
Greenhorn

Joined: May 26, 2005
Posts: 22
Thanks Ulf for ur answer.

Well in my project I want server should send a request to client when server receives any message for that clientif there is a session between them.(You can say like callback).

I had read about Message Driven Bean which performs the above functionality but I dont want to use Message Driven Bean because I am using Tomcat web container and I was expecting Hibernate might be providing same feature like MDB but as you said that Hibernate provides feature like Entity bean I think I have to look for other option.

May you suggest any other option you know?

Thanks.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41095
    
  44
What kind of communication do you have in mind - synchronous or asynchronous? It seems unusual for the server to contact the client; does the client include some kind of server process as well, which listens to requests?
Sahil Saxena
Greenhorn

Joined: May 26, 2005
Posts: 22
Hi,

It has to be asynchronous communication because the client will be also doing other things in the session.

No the client dont have any process which would be listening to the server request but I was thinking of using JMS at the client side as well as server side.

Do you think JMS will work in the above scenario?

Thanks
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41095
    
  44
Sure, JMS is an option. Client and Server just need to check with the JMS server every so often if there are any new messages. Come to think of it, simple mail (SMTP for sending, POP3 for receiving) might suffice.

OpenJMS is a open source JMS server, while Apache James is an open source mail server (or maybe you can use an existing mail server in your network).
[ January 05, 2006: Message edited by: Ulf Dittmer ]
 
Don't get me started about those stupid light bulbs.
 
subject: Similar to MDB in Hibernate?
 
Similar Threads
Hibernate with DAO?
Pausing an MDB?
updating the database using Hibernate
Disable built-in Quartz service of JBoss5
MDB related query for defining static variable