简体   繁体   中英

Java EE 6 - SEAM + EJB integration / 3 tier architecture

I've been using JSF 2.1 & EJB 3.1. So far, my aplication have such flow:

  1. Facelets template
  2. @ManagedBean connected to .xhtml page
  3. @Stateless EJB bean that uses EntityManager to get entities from DB etc
  4. EJB bean is injected to @ManagedBean via @EJB

So basically for 1 entity class I have 2 classes and 1 xhtml page.

Now, I'm starting new project with SEAM 3 (solder, faces, security and validation modules). How can I simplify application flow? Can I use EntityManager inside JSF bean and get all EJB functions, like transactions etc? How can I organise my project (entity classes, bean classes, service classes)? Thanks for help!

How can I simplify application flow?

From what you are wrote i don't thinks that you have some complicated architecture.

Can I use EntityManager inside JSF bean and get all EJB functions, like transactions etc?

If this is possible why should you do that?

How can I organise my project (entity classes, bean classes, service classes)?

I would say that your application organisation should not be changed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM