Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

EJB-centric app

 
Henrique Ordine
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My application is EJB-centric, but some methods do not require any transaction or security. They're just catalog search methods. I was thinking of accessing the database directly from the web tier. From the web action I would call my DAO. Would this cause any problem? I know I'd need to make sure that both, my web server and my application server, have access to the database. Can you think of any other issue that might arise from this design?

Any thoughts will be much appreciated.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd try to keep the architecture clean and consistent and avoid db access from outside the EJB container.

You can make a session bean that runs under bean managed transactions and just never start any transactions. I worked with a vendor framework that deployed the same session bean twice, once as CMT and once as BMT.
 
Henrique Ordine
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I document that my CatalogSearchDAO accesses the DB from the web container, does that still make my architecture unclean and inconsistent?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic