Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.

EJB 3.1

2.800 Aufrufe

Veröffentlicht am

Slide da palestra EJB 3.1 apresentado no auditório do Uniceub pelo DFJUG (DF Java User Group) no dia 14/07/2010.

  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://soo.gd/qURD } ......................................................................................................................... Download Full EPUB Ebook here { https://soo.gd/qURD } ......................................................................................................................... Download Full doc Ebook here { https://soo.gd/qURD } ......................................................................................................................... Download PDF EBOOK here { https://soo.gd/qURD } ......................................................................................................................... Download EPUB Ebook here { https://soo.gd/qURD } ......................................................................................................................... Download doc Ebook here { https://soo.gd/qURD } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book THIS can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer THIS is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story THIS Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money THIS the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths THIS Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Antworten 
    Sind Sie sicher, dass Sie …  Ja  Nein
    Ihre Nachricht erscheint hier
  • DOWNLOAD THAT BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book that can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer that is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story That Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money That the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths that Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Antworten 
    Sind Sie sicher, dass Sie …  Ja  Nein
    Ihre Nachricht erscheint hier
  • DOWNLOAD THAT BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book that can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer that is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story That Helped Ignite a Movement,-- Atomic Habits: An Easy & Proven Way to Build Good Habits & Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money That the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths that Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Antworten 
    Sind Sie sicher, dass Sie …  Ja  Nein
    Ihre Nachricht erscheint hier
  • DOWNLOAD THIS BOOKS INTO AVAILABLE FORMAT (Unlimited) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download Full EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ACCESS WEBSITE for All Ebooks ......................................................................................................................... Download Full PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... Download doc Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Antworten 
    Sind Sie sicher, dass Sie …  Ja  Nein
    Ihre Nachricht erscheint hier
  • Realmente, com relação ao Black Hole EJB (2.1), tanto a 3.0, que trouxe excelentes melhorias, tanto a 3.1, que as sacramentou, me ajudaram muito. Vamos aguardar mais novidades ainda para a 3.2
       Antworten 
    Sind Sie sicher, dass Sie …  Ja  Nein
    Ihre Nachricht erscheint hier

EJB 3.1

  1. 2. Sobre Mim <ul><li>Trabalha com EJB desde a versão 2.1 </li></ul><ul><li>Possui mais de 10 anos de experiência em TI </li></ul><ul><li>Arquiteto de Software Sênior </li></ul><ul><li>Instrutor da Bluestar Tecnologia desde 2006 </li></ul><ul><li>Possui várias certificações Java </li></ul>
  2. 3. Sobre Você <ul><li>Quantas pessoas utilizam ou já utilizaram EJB (qualquer versão)? </li></ul><ul><li>Quantas pessoas já precisaram escalar suas aplicações? </li></ul><ul><li>Quantas pessoas utilizam produtos não padronizados com as mesmas características? </li></ul>
  3. 4. Agenda <ul><li>Visão Geral </li></ul><ul><li>Novas Características </li></ul><ul><li>Conclusão </li></ul><ul><li>Dúvidas e Perguntas </li></ul>
  4. 5. <ul><li>Visão Geral </li></ul>
  5. 6. Visão Geral <ul><li>A comunidade foi ouvida </li></ul>
  6. 7. Visão Geral <ul><li>Spec EJB 3.1 </li></ul><ul><ul><li>JSR 318 </li></ul></ul><ul><ul><li>Iniciou em 17/07/2007 </li></ul></ul><ul><ul><li>Release final liberada em 10/12/2009 </li></ul></ul><ul><ul><li>Liderada por Kenneth Saks, Sun Microsystens </li></ul></ul><ul><ul><li>JPA definida pela JSR 317 </li></ul></ul>
  7. 8. Visão Geral <ul><li>Objetivos </li></ul><ul><ul><li>Simplificar a arquitetura EJB </li></ul></ul><ul><ul><li>Reduzir a complexidade </li></ul></ul><ul><ul><li>Adicionar novas funcionalidade </li></ul></ul>
  8. 9. <ul><li>Novas Características </li></ul>
  9. 10. Novas Características <ul><li>Singleton </li></ul><ul><li>Interface Opcional </li></ul><ul><li>Timer Service Melhorado </li></ul><ul><li>EJB na Camada Web </li></ul><ul><li>Session Bean Assíncronos </li></ul><ul><li>EJB Lite </li></ul><ul><li>Nomes JNDI Padronizados </li></ul><ul><li>EJB 3 Java SE Runtime </li></ul>
  10. 11. Novas Características <ul><li>Singleton </li></ul><ul><ul><li>Novo EJB </li></ul></ul><ul><ul><li>Similar ao pattern Singleton (GOF) </li></ul></ul><ul><ul><li>Boa opção para cache </li></ul></ul><ul><ul><li>Dispõem dos serviços do container </li></ul></ul>
  11. 12. Novas Características <ul><li>Singleton </li></ul><ul><ul><li>É necessário controlar: </li></ul></ul><ul><ul><ul><li>Concorrência </li></ul></ul></ul><ul><ul><ul><li>Integridade dos dados </li></ul></ul></ul><ul><ul><li>Dois métodos </li></ul></ul><ul><ul><ul><li>Container Managed Concurrency </li></ul></ul></ul><ul><ul><ul><ul><li>O container controla concorrência baseada em annotation ao nível de método </li></ul></ul></ul></ul><ul><ul><ul><li>Bean Managed Concurrency </li></ul></ul></ul><ul><ul><ul><ul><li>O desenvolvedor é responsável pelo controle de concorrência </li></ul></ul></ul></ul>
  12. 13. Novas Características
  13. 14. Novas Características <ul><li>Singleton </li></ul><ul><ul><li>Container Managed Concurrency </li></ul></ul><ul><ul><ul><li>@Lock(READ) </li></ul></ul></ul><ul><ul><ul><ul><li>Habilita leitura a todos os acessos </li></ul></ul></ul></ul><ul><ul><ul><li>@Lock(WRITE) </li></ul></ul></ul><ul><ul><ul><ul><li>Permite apenas um único acesso </li></ul></ul></ul></ul><ul><ul><ul><li>@AccessTimeout(value=1, unit=SECONDS) </li></ul></ul></ul><ul><ul><ul><ul><li>Aplicável a classes e métodos </li></ul></ul></ul></ul><ul><ul><ul><ul><li>Especifica o tempo que o método pode ficar bloqueado </li></ul></ul></ul></ul>
  14. 15. Novas Características
  15. 16. Novas Características
  16. 17. Novas Características <ul><li>Singleton </li></ul><ul><ul><li>O Singleton pode ser iniciado junto com o container </li></ul></ul><ul><ul><ul><li>Basta usar a annotation @Startup </li></ul></ul></ul>
  17. 18. Novas Características
  18. 19. Novas Características <ul><li>Singleton </li></ul><ul><ul><li>Um Singleton pode depender de outro durante a subida do container </li></ul></ul><ul><ul><ul><li>@DependsOn – Define a sequência de inicialização dos EJBs </li></ul></ul></ul>
  19. 20. Novas Características
  20. 21. Novas Características <ul><li>Interface Opcional </li></ul><ul><ul><li>EJBs parecidos com POJO </li></ul></ul><ul><ul><li>Interfaces as vezes são desnecessárias </li></ul></ul>
  21. 22. Novas Características
  22. 23. Novas Características <ul><li>Time Service melhorado </li></ul><ul><ul><li>Uso simplificado </li></ul></ul><ul><ul><li>Pode-se utilizar Annotations </li></ul></ul><ul><ul><li>Similar a Cron Linux </li></ul></ul>
  23. 24. Novas Características <ul><li>Time Service melhorado </li></ul><ul><ul><li>Exemplo de limitações do EJB 3.0 </li></ul></ul><ul><ul><ul><li>Agendamento feito programaticamente </li></ul></ul></ul><ul><ul><ul><li>Tarefas executados apenas um vez ou em ciclos bem definidos </li></ul></ul></ul>
  24. 25. Novas Características
  25. 26. Novas Características
  26. 27. Novas Características
  27. 28. Novas Características
  28. 29. Novas Características <ul><li>EJB na Camada Web </li></ul><ul><ul><li>Modelo de empacotamento diferenciado para aplicações Web-Centric </li></ul></ul><ul><ul><li>EJBs dentro de WAR </li></ul></ul><ul><ul><li>JAR e WAR continuam existindo </li></ul></ul>
  29. 30. Novas Características
  30. 31. Novas Características
  31. 32. Novas Características <ul><li>Session Bean Assíncrono </li></ul><ul><ul><li>Alternativa ao JMS </li></ul></ul><ul><ul><li>Uso de Annotations </li></ul></ul><ul><ul><li>APIs Future e AsyncResult </li></ul></ul>
  32. 33. Novas Características
  33. 34. Novas Características
  34. 35. Novas Características <ul><li>EJB Lite </li></ul><ul><ul><li>Subconjunto da API EJB3.1 para Web Profile </li></ul></ul><ul><ul><li>Expansão da portabilidade do EJBs </li></ul></ul><ul><ul><li>Publicação do EJB podem ser feitas em </li></ul></ul><ul><ul><ul><li>Web Profile </li></ul></ul></ul><ul><ul><ul><li>Full Profile </li></ul></ul></ul>
  35. 36. Novas Características
  36. 37. Novas Características <ul><li>Nome JNDI Padronizado </li></ul><ul><ul><li>Problema </li></ul></ul><ul><ul><ul><li>Portabilidade dos EJBs não transparente para o cliente </li></ul></ul></ul>
  37. 38. Novas Características <ul><li>Nome JNDI Padronizado </li></ul><ul><ul><li>OC4J </li></ul></ul><ul><ul><ul><li>Usa o nome especificado na annotation @Stateless </li></ul></ul></ul><ul><ul><li>JBOSS </li></ul></ul><ul><ul><ul><li>Usa application EAR + Nome do EJB + /remote </li></ul></ul></ul><ul><ul><ul><ul><li>App/CustomerManager/remote </li></ul></ul></ul></ul>
  38. 39. Novas Características <ul><li>Nome JNDI Padronizado </li></ul><ul><ul><li>Padrão </li></ul></ul><ul><ul><ul><li>java:global[/application-name]/<module-name>/<bean-name>[!<fully-qualified-interface-name>] </li></ul></ul></ul><ul><ul><ul><li>java:app[/<module-name>]/<bean-name>[!<fully-qualified-interface-name>] </li></ul></ul></ul><ul><ul><ul><li>java:module/<bean-name>[!<fully-qualified-interface-name>] </li></ul></ul></ul>
  39. 40. Novas Características <ul><li>Nome JNDI Padronizado </li></ul><ul><ul><li>MyWebApp.war </li></ul></ul><ul><ul><ul><li>java:global/MyWebApp/CustomerManager! br.com.waelson.CustomerManager </li></ul></ul></ul><ul><ul><li>MyAppEJB.jar </li></ul></ul><ul><ul><ul><li>java:app/MyAppEJB/CustomerManager!br.com.waelson.CustomerManager </li></ul></ul></ul><ul><ul><li>MyApp.ear </li></ul></ul><ul><ul><ul><li>java:module/MyApp/MyAppEJB/CustomerManager! br.com.waelson.CustomerManager </li></ul></ul></ul>
  40. 41. EJB 3 Java SE Runtime <ul><li>Principais motivações: </li></ul><ul><ul><li>Dificuldade em testes locais com EJB </li></ul></ul><ul><ul><li>Necessidade de rodar EJBs sobre a mesma JVM do cliente </li></ul></ul>
  41. 42. EJB 3 Java SE Runtime
  42. 43. EJB 3 Java SE Runtime <ul><li>São necessários 3 jars </li></ul><ul><ul><li>accountEJB.jar </li></ul></ul><ul><ul><li>clienteAccount.jar </li></ul></ul><ul><ul><li>vendor-provider.jar </li></ul></ul><ul><ul><li>% java -cp account.jar:client.jar:vendor-provider.jar br.com.waelson.AccountTest </li></ul></ul>
  43. 44. <ul><li>Conclusão </li></ul>
  44. 45. Conclusão <ul><li>A cada versão torna-se mais fácil trabalhar com EJBs </li></ul><ul><li>JNDI Names portável </li></ul><ul><li>Novas funcionalidades </li></ul><ul><ul><li>Asynchronous Beans e Singleton </li></ul></ul>
  45. 46. Dúvidas e Perguntas
  46. 47. Contato <ul><li>www.waelson.com.br </li></ul><ul><li>[email_address] </li></ul><ul><li>waelson </li></ul>

×