aspose file tools*
The moose likes OO, Patterns, UML and Refactoring and the fly likes EJB-centric app Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "EJB-centric app" Watch "EJB-centric app" New topic
Author

EJB-centric app

Henrique Ordine
Ranch Hand

Joined: Sep 03, 2004
Posts: 127
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.


J2EE Architect/Developer
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
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.


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Henrique Ordine
Ranch Hand

Joined: Sep 03, 2004
Posts: 127
If I document that my CatalogSearchDAO accesses the DB from the web container, does that still make my architecture unclean and inconsistent?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: EJB-centric app