• Post Reply Bookmark Topic Watch Topic
  • New Topic

Multiple Database

 
Jobin Mathew
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In Entity bean, can I specify the database at runtime. I heard this is possible in EJB3. If yes, can any one explain me, how to do it?

Thanks in advance.
 
Gagan Indus
Ranch Hand
Posts: 346
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I actually don't have a good answer, have not worked with EJB3. It is certainly possible to configure multiple data sources and use one, or change the JNDI binding dynamically etc, depends on the container. I hope others may have definitive answer for you.

But what i am really interested to know is under what circumstances would you actually need to do this? Could you share that?
 
JigaR Parekh
Ranch Hand
Posts: 112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes you can achive this with EntityManager as now your CMP is not bound to perticular datasource,

I have achived same with BMP and Hibernate

Hope this will help
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!