Your SlideShare is downloading. ×
0
frameworkdemoiselle         2.0
/   zyccleversonsacramento.         . com      / robsonximenes       robsonximenes@        .com
2.0
ago2010              1.1.5    nov2009                          1.1.0  dez2010     1.2.0                              abr20...
JBoss? Eclipse?                      JSF?Hibernate?                  AspectJ?
Spring?   Guice?Seam?
context      and   dependency injection   jsr 299
coreextensions jpa   jsf   swing  components
transaction  annotation                     stereotype          br.gov.frameworkdemoiselle   templatemessage           exc...
bootstrap       interceptorbr.gov.frameworkdemoiselle.   internal                                   proxy impl            ...
class A {}            class B {               @Inject               A a;            }
class B {    @Inject    FacesContext context;}
class FacesContextFactory {    @Produces    public FacesContext create() {      return FacesContext.getCurrentInstance(); ...
class LoggerFactory {    @Produces    public Logger create(InjectionPoint ip) {      return create(ip.getMember().getDecla...
class A {    @Inject    EntityManager em;    public inserir (String s) {...}}                                      class B...
@InterceptorBinding@Target({METHOD, TYPE})public @interface Transactional { }
@Interceptor @Transactionalclass TransactionInterceptor {    ...    @AroundInvoke    public Object manage(InvocationContex...
# demoiselle.propertiesframeworkdemoiselle.transaction.class=br.gov.frameworkdemoiselle.transaction.NoTransaction*br.gov.f...
class B {    @Startup @Transactional    public carga () {…}    @Shutdown @Transactional    public descarga () {…}}
@PersistenceControllerclass A {    @Inject    EntityManager em;}                         @BusinessController              ...
@Controller@Stereotype@Target(TYPE)public @interface PersistenceController { }@Controller@Stereotype@Target(TYPE)public @i...
quitetura cebol    ra                   a
@Controller@Stereotype@Target(TYPE)public @interface PersistenceController { }@Controller@Stereotype@Target(TYPE)public @i...
@BusinessControllerclass B {    @Startup @Transactional    public carga () {…}    @ExceptionHandler    public trata (Creca...
@Interceptor @Controllerclass TransactionInterceptor {    ...    @AroundInvoke    public Object manage(InvocationContext c...
http://demoiselle.svn.sf.net/svnroot/demoiselle/framework                      /branches/demoiselle-2.0
forum.frameworkdemoiselle.gov.br
demoiselle-proposal
Demoiselle 2.0 no JavaOne Brasil 2010
Demoiselle 2.0 no JavaOne Brasil 2010
Demoiselle 2.0 no JavaOne Brasil 2010
Demoiselle 2.0 no JavaOne Brasil 2010
Demoiselle 2.0 no JavaOne Brasil 2010
Demoiselle 2.0 no JavaOne Brasil 2010
Demoiselle 2.0 no JavaOne Brasil 2010
Demoiselle 2.0 no JavaOne Brasil 2010
Upcoming SlideShare
Loading in...5
×

Demoiselle 2.0 no JavaOne Brasil 2010

1,149

Published on

Slides que apresentei no primeiro JavaOne Brasil em 2010 sobre a nova versão 2.0 do framework Demoiselle. Para mais detalhes, acesse: http://cleversonsacramento.wordpress.com/2010/12/14/o-primeiro-javaone-no-brasil/

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,149
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
29
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Demoiselle 2.0 no JavaOne Brasil 2010"

  1. 1. frameworkdemoiselle 2.0
  2. 2. / zyccleversonsacramento. . com / robsonximenes robsonximenes@ .com
  3. 3. 2.0
  4. 4. ago2010 1.1.5 nov2009 1.1.0 dez2010 1.2.0 abr2009 1.0.3dez2010 dez20082.0.0-B2 1.0 mar2008 0.1 dez2010 2.0.0
  5. 5. JBoss? Eclipse? JSF?Hibernate? AspectJ?
  6. 6. Spring? Guice?Seam?
  7. 7. context and dependency injection jsr 299
  8. 8. coreextensions jpa jsf swing components
  9. 9. transaction annotation stereotype br.gov.frameworkdemoiselle templatemessage exception util
  10. 10. bootstrap interceptorbr.gov.frameworkdemoiselle. internal proxy impl factory
  11. 11. class A {} class B { @Inject A a; }
  12. 12. class B { @Inject FacesContext context;}
  13. 13. class FacesContextFactory { @Produces public FacesContext create() { return FacesContext.getCurrentInstance(); }}
  14. 14. class LoggerFactory { @Produces public Logger create(InjectionPoint ip) { return create(ip.getMember().getDeclaringClass()); } private Logger create(Class type) { Logger logger = LoggerFactory.getLogger(type); return new LoggerProxy(logger); }}
  15. 15. class A { @Inject EntityManager em; public inserir (String s) {...}} class B { @Inject A a; @Transactional public carga () { a.inserir(“1”); a.inserir(“2”); } }
  16. 16. @InterceptorBinding@Target({METHOD, TYPE})public @interface Transactional { }
  17. 17. @Interceptor @Transactionalclass TransactionInterceptor { ... @AroundInvoke public Object manage(InvocationContext ctx) { initiate(); // begin Object result = null; try { result = ctx.proceed(); } catch (Exception cause) { handleException(cause); // marca para rollback throw cause; } finally { complete(); // commit ou rollback } return result; }}
  18. 18. # demoiselle.propertiesframeworkdemoiselle.transaction.class=br.gov.frameworkdemoiselle.transaction.NoTransaction*br.gov.frameworkdemoiselle.transaction.JPATransactionbr.gov.frameworkdemoiselle.transaction.JTATransactionseupacote.SuaEstrategiaDeTransacao
  19. 19. class B { @Startup @Transactional public carga () {…} @Shutdown @Transactional public descarga () {…}}
  20. 20. @PersistenceControllerclass A { @Inject EntityManager em;} @BusinessController class B { @Inject A a; }
  21. 21. @Controller@Stereotype@Target(TYPE)public @interface PersistenceController { }@Controller@Stereotype@Target(TYPE)public @interface BusinessController { }
  22. 22. quitetura cebol ra a
  23. 23. @Controller@Stereotype@Target(TYPE)public @interface PersistenceController { }@Controller@Stereotype@Target(TYPE)public @interface BusinessController { }
  24. 24. @BusinessControllerclass B { @Startup @Transactional public carga () {…} @ExceptionHandler public trata (CrecaException e) {…}}
  25. 25. @Interceptor @Controllerclass TransactionInterceptor { ... @AroundInvoke public Object manage(InvocationContext ctx) { Object result = null; try { result = ctx.proceed(); } catch (Exception cause) { if (!handleException(cause)) { // delega aos tratadores throw cause; } } return result; }}
  26. 26. http://demoiselle.svn.sf.net/svnroot/demoiselle/framework /branches/demoiselle-2.0
  27. 27. forum.frameworkdemoiselle.gov.br
  28. 28. demoiselle-proposal
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×