• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

EJB-centric app

 
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
reply
    Bookmark Topic Watch Topic
  • New Topic