This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Multiple Application Managed EntityManagerFactories  RSS feed

 
Jorge Moran
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello...
Coderanch has been really helpful for me... but this is the first time I haven't been able to find a topic that describes the problem Im having...

I'm developing an application using EJB3 and Icefaces... the thing is that after the user authenticates, I have to get a parameter from the database, which indicates the name of the persistence unit that specific user will have to use in the subsequent calls to every other enterprise bean. Most of the methods (I would even say, all of the methods are stateless) so the obvious thing to do would be
to use stateless beans, nevertheless since the persistence unit is different depending on the user... that wouldn't be the correct approach; neither would it be to make all of the other beans stateful just because the persistence unit is dynamic.

Any ideas of what the right solution would be?

Thanks in advance
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!