Demoiselle 2.0 no JavaOne Brasil 2010
Upcoming SlideShare
Loading in...5
×

Like this? Share it with your network

Share

Demoiselle 2.0 no JavaOne Brasil 2010

  • 1,709 views
Uploaded on

Slides que apresentei no primeiro JavaOne Brasil em 2010 sobre a nova versão 2.0 do framework Demoiselle. Para mais detalhes, acesse:......

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/

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
1,709
On Slideshare
1,709
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
28
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. frameworkdemoiselle 2.0
  • 2. / zyccleversonsacramento. . com / robsonximenes robsonximenes@ .com
  • 3. 2.0
  • 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. JBoss? Eclipse? JSF?Hibernate? AspectJ?
  • 6. Spring? Guice?Seam?
  • 7. context and dependency injection jsr 299
  • 8. coreextensions jpa jsf swing components
  • 9. transaction annotation stereotype br.gov.frameworkdemoiselle templatemessage exception util
  • 10. bootstrap interceptorbr.gov.frameworkdemoiselle. internal proxy impl factory
  • 11. class A {} class B { @Inject A a; }
  • 12. class B { @Inject FacesContext context;}
  • 13. class FacesContextFactory { @Produces public FacesContext create() { return FacesContext.getCurrentInstance(); }}
  • 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. class A { @Inject EntityManager em; public inserir (String s) {...}} class B { @Inject A a; @Transactional public carga () { a.inserir(“1”); a.inserir(“2”); } }
  • 16. @InterceptorBinding@Target({METHOD, TYPE})public @interface Transactional { }
  • 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. # demoiselle.propertiesframeworkdemoiselle.transaction.class=br.gov.frameworkdemoiselle.transaction.NoTransaction*br.gov.frameworkdemoiselle.transaction.JPATransactionbr.gov.frameworkdemoiselle.transaction.JTATransactionseupacote.SuaEstrategiaDeTransacao
  • 19. class B { @Startup @Transactional public carga () {…} @Shutdown @Transactional public descarga () {…}}
  • 20. @PersistenceControllerclass A { @Inject EntityManager em;} @BusinessController class B { @Inject A a; }
  • 21. @Controller@Stereotype@Target(TYPE)public @interface PersistenceController { }@Controller@Stereotype@Target(TYPE)public @interface BusinessController { }
  • 22. quitetura cebol ra a
  • 23. @Controller@Stereotype@Target(TYPE)public @interface PersistenceController { }@Controller@Stereotype@Target(TYPE)public @interface BusinessController { }
  • 24. @BusinessControllerclass B { @Startup @Transactional public carga () {…} @ExceptionHandler public trata (CrecaException e) {…}}
  • 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. http://demoiselle.svn.sf.net/svnroot/demoiselle/framework /branches/demoiselle-2.0
  • 27. forum.frameworkdemoiselle.gov.br
  • 28. demoiselle-proposal