[jboss-user] [EJB 3.0] - Re: Newbie: how to interface EJB code with external librarie
do-not-reply at jboss.com
Wed Aug 6 04:00:50 EDT 2008
Well let's try to answer that.
Think of EJB's as a facade in front of any complex functionality that should be executed remote and/or local with transactions and in a multi user environment. Stateless and stateful session beans are doing something for you while entities (pre EJB 3.0 entity beans) are business object which (mostly) get stored into a database.
So for example you can write a (stateful) session bean that manages the login and logoff off users. So here is the (at least for me) very simple hint for using EJB's: Keep things simple. Each ejb must have its own clear context.
For transactions (I think transactions are important for a trade system) there is nothing to do. You get them right out of the box if you're using container managed transactions.
For the ui by using jsf I personally prefer having one backing bean for one screen (i.e. login/logoff-ui). This backing bean can delegate its work to a ejb (that login facade mentioned above).
To concluse I would recommend to analyse the system carefully and do design the new app by using a combination of JSF and EJB.
Hope this helps in a way.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4168904#4168904
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4168904
More information about the jboss-user