Hi, i'm not very fond of these Helper-Classes: Most of the time, they only add an additional Layer which just proxies calls to the SessionBeans: The benefit you get is mostly, that you can wrap all ejb-related errors inside the Helpers. This saves you some coding, but most of the time you want to react on a RemoteException in a different way the than on a finder Exception.
We code the EJB-Access driectly in the Actions and try to keep the Actions small by keeping most of the Code inside SessionBeans (which is a generally a good idea, as you can reuse this code in context's where Struts is not applicable, eg. with a Swing-Client). In order for this to work, it's a good idea, to use a SessionFacade(http://java.sun.com/blueprints/patterns/j2ee_patterns/session_ facade/index.html) to avoid having to code against numerous ejb's in your action - in our experience, this is sufficient: A helper-class just doubles the Methods of the Facade. Check out, if portability from an ejb-Architecture to a pure-jdbc Architecture is really a requirement, or if it even is possible: I'm not really sure, wether it pays to code independently of the j2ee-architecture, as it means to wrap most of the main-features (EntityBean, SessionBean, MDB, jndi and so on) - with applicationspecific classes that abstract out the functionality: I think in projects under high pressure you throw away all the benefits of j2ee with this approach. So, by keeping the code in the actions small, we us Actions in a "Command"-way: which works quite nicely for us: As there is not so much code in the action, we don't have problems with writing new ones or changing the old ones. hope this helps greetings stf --- vierundsechzig.de friedensallee 7-9 22765 hamburg telefon +49 (040) 306033 -43 telefax +49 (040) 306033 -64 http://www.vierundsechzig.de mailto:[EMAIL PROTECTED] > -----Ursprungliche Nachricht----- > Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Gesendet: Mittwoch, 19. Dezember 2001 01:01 > An: Struts Users Mailing List > Betreff: accessing EJB components from a Struts application? > > > > Hi all, > > after browsing the FAQ and searching the mailing list archive, > I have not yet found a 'premium way' to go for EJB business logic > integration into a Struts application. > > It's pretty clear that the EJB stuff should go into the action classes. > I also saw hints that it might be useful to add another layer between > the action classes and the entity/session beans in order to keep the > action classes small and independent from the underlying business logic > tier architecture. > > So the recommended architecture would be > > action class <-> ejb 'helper' class <-> EJB Session/Entity Bean > > which allows for e.g. replacing the EJB tier by direct JDBC > database access without having to modify the action classes. > > Is the presented view correct/recommendable, or have I probably missed > some important developments concerning the Struts<->EJB issue? > Besides selected threads of this mailing list, are there any > instructive resources/links regarding the topic? > > Regards, > > -- > Thomas Corte > <[EMAIL PROTECTED]> > > > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>