Warning: Trying to access array offset on value of type bool in /home/feltexco/public_html/felix/wp-content/plugins/google-maps-ready/modules/options/models/options.php on line 16

Warning: Trying to access array offset on value of type bool in /home/feltexco/public_html/felix/wp-content/plugins/google-maps-ready/modules/options/models/options.php on line 16

Warning: Trying to access array offset on value of type bool in /home/feltexco/public_html/felix/wp-content/plugins/google-maps-ready/modules/options/models/options.php on line 16

Warning: Cannot modify header information - headers already sent by (output started at /home/feltexco/public_html/felix/wp-content/plugins/google-maps-ready/modules/options/models/options.php:16) in /home/feltexco/public_html/felix/wp-includes/rest-api/class-wp-rest-server.php on line 1758

Warning: Cannot modify header information - headers already sent by (output started at /home/feltexco/public_html/felix/wp-content/plugins/google-maps-ready/modules/options/models/options.php:16) in /home/feltexco/public_html/felix/wp-includes/rest-api/class-wp-rest-server.php on line 1758

Warning: Cannot modify header information - headers already sent by (output started at /home/feltexco/public_html/felix/wp-content/plugins/google-maps-ready/modules/options/models/options.php:16) in /home/feltexco/public_html/felix/wp-includes/rest-api/class-wp-rest-server.php on line 1758

Warning: Cannot modify header information - headers already sent by (output started at /home/feltexco/public_html/felix/wp-content/plugins/google-maps-ready/modules/options/models/options.php:16) in /home/feltexco/public_html/felix/wp-includes/rest-api/class-wp-rest-server.php on line 1758

Warning: Cannot modify header information - headers already sent by (output started at /home/feltexco/public_html/felix/wp-content/plugins/google-maps-ready/modules/options/models/options.php:16) in /home/feltexco/public_html/felix/wp-includes/rest-api/class-wp-rest-server.php on line 1758

Warning: Cannot modify header information - headers already sent by (output started at /home/feltexco/public_html/felix/wp-content/plugins/google-maps-ready/modules/options/models/options.php:16) in /home/feltexco/public_html/felix/wp-includes/rest-api/class-wp-rest-server.php on line 1758

Warning: Cannot modify header information - headers already sent by (output started at /home/feltexco/public_html/felix/wp-content/plugins/google-maps-ready/modules/options/models/options.php:16) in /home/feltexco/public_html/felix/wp-includes/rest-api/class-wp-rest-server.php on line 1758

Warning: Cannot modify header information - headers already sent by (output started at /home/feltexco/public_html/felix/wp-content/plugins/google-maps-ready/modules/options/models/options.php:16) in /home/feltexco/public_html/felix/wp-includes/rest-api/class-wp-rest-server.php on line 1758
{"id":646,"date":"2014-04-30T17:02:51","date_gmt":"2014-04-30T20:02:51","guid":{"rendered":"http:\/\/www.feltex.com.br\/felix\/?p=646"},"modified":"2014-11-17T11:44:10","modified_gmt":"2014-11-17T13:44:10","slug":"exemplo-completo-jsf-primefaces-ejb-hibernate-mysql-jms","status":"publish","type":"post","link":"https:\/\/www.feltex.com.br\/felix\/exemplo-completo-jsf-primefaces-ejb-hibernate-mysql-jms\/","title":{"rendered":"Exemplo completo com JSF Primefaces + EJB + Hibernate + MySQL + JMS"},"content":{"rendered":"

Exemplo completo com JSF Primefaces + EJB + Hibernate + MySQL + JMS<\/H1><\/p>\n

Ol\u00e1 Amigos,<\/p>\n

Continuando o trabalho de implementa\u00e7\u00e3o do projeto AcademicNet incluiremos o uso de Filas. Vamos trabalhar tanto com Queue como Topic para nosso Exemplos.<\/p>\n

Tarefas:<\/p>\n

    \n
  1. – Configura\u00e7\u00e3o da Fila no servidor <\/li>\n
  2. – Cria\u00e7\u00e3o de componentes para consumir as filas<\/li>\n
  3. – Cria\u00e7\u00e3o do Servlet que enviar\u00e1 uma mensagem para a fila<\/li>\n
  4. – Trabalhar com Queue fila de Aluno<\/li>\n
  5. – Trabalhar com Topic fila de Professor<\/li>\n<\/ol>\n

    Veja como ficar\u00e1 o nosso exemplo:<\/p>\n

    \"queue\"<\/a><\/p>\n


    \nTipos de filas:
    \n Queue – Fila de mensagens que Point-to-Point (Ponto a ponto). Neste caso h\u00e1 um cliente e um consumidor de mensagens.
    \n Topic – Fila de mensagens Publish-Subscribe (Publica\u00e7\u00e3o e consumo). Neste caso h\u00e1 um cliente e v\u00e1rios consumidores das mensagens.
    \n MDB – Message Drive Bean \u00e9 um tipo especial de EJB que consegue consumir as mensagens disponibilizadas nas filas JMS. Ele tem todas as caracter\u00edstica de um EJB (transa\u00e7\u00e3o, gerenciamento de contexto) e precisa implementar uma Interface “MessageListener” que fica monitorando as mensagens que entram na fila.<\/p>\n

    Para que sua fila funciona \u00e9 necess\u00e1rio fazer uma configura\u00e7\u00e3o no servidor..<\/p>\n

    Inclus\u00e3o da configura\u00e7\u00e3o das filas<\/H2>
    \n Acesse o arquivo “wildfly-8.0.0.Final\\standalone\\configuration\\standalone.xml”. Localize a tag
    \n“hornetq-server”. Adicione o seguinte conte\u00fado entre a tag inicial e final.<\/p>\n
    \r\n     \r\n                    \r\n                        \r\n                        \r\n                    <\/jms-queue>\r\n                    \r\n                        \r\n                        \r\n                    <\/jms-topic>\r\n     <\/jms-destinations>\r\n<\/pre>\n

    Cria\u00e7\u00e3o dos consumidores MDB (Message Drive Bean)<\/H2><\/p>\n

    Nesta parte criaremos o MDB que consumir\u00e1 a fila de alunos:<\/p>\n

    \r\n\r\npackage br.com.feltex.academicnet.mdb;\r\n\r\nimport javax.ejb.ActivationConfigProperty;\r\nimport javax.ejb.MessageDriven;\r\nimport javax.jms.Message;\r\nimport javax.jms.MessageListener;\r\nimport javax.jms.ObjectMessage;\r\nimport javax.jms.TextMessage;\r\n\r\nimport br.com.feltex.academicnet.entidade.Aluno;\r\n\r\n\/**\r\n * Message-Driven Bean implementation class for: AlunoMDB\r\n *\/\r\n@MessageDriven(activationConfig = {\r\n\t\t@ActivationConfigProperty(propertyName = \"destinationType\", propertyValue = \"javax.jms.Queue\"),\r\n\t\t@ActivationConfigProperty(propertyName = \"destination\", propertyValue = \"java:\/queue\/alunoQueue\") }, mappedName = \"java:\/queue\/alunoQueue\")\r\npublic class AlunoQueueMDB implements MessageListener {\r\n\r\n\tpublic AlunoQueueMDB() {\r\n\r\n\t}\r\n\r\n\tpublic void onMessage(Message message) {\r\n\t\tSystem.out.println(getClass() + \" Inicio\");\r\n\t\ttry {\r\n\r\n\t\t\tif (message instanceof TextMessage) {\r\n\t\t\t\tTextMessage mensagem = (TextMessage) message;\r\n\t\t\t\tSystem.out.println(\"Mensagem recebida: \" + mensagem.getText());\r\n\t\t\t} else if (message instanceof ObjectMessage) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tObjectMessage obj = (ObjectMessage) message;\r\n\t\t\t\t\tAluno aluno = (Aluno) obj.getObject();\r\n\t\t\t\t\tSystem.out.println(\"Objeto Recebido: \" + aluno);\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tSystem.out.println(getClass() + \" Fim\");\r\n\t}\r\n}\r\n<\/pre>\n

    Vamos analisar o c\u00f3digo:<\/p>\n

    @MessageDriven – Esta anota\u00e7\u00e3o define que a sua classe \u00e9 um MDB e que poder\u00e1 consumir mensagens de uma fila JMS
    \n @ActivationConfigProperty(propertyName = “destinationType”, propertyValue = “javax.jms.Queue”),
    \n @ActivationConfigProperty(propertyName = “destination”, propertyValue = “java:\/queue\/alunoQueue”)},
    \nmappedName = “java:\/queue\/alunoQueue”)
    \n Nas declara\u00e7\u00f5es de “ActivationConfigProperty” definimos que tipo de fila estamos utilizando. Neste caso \u00e9 uma Queue e qual o nome da fila “queue\/alunoQueue”.<\/p>\n

    O nosso MDB deve implementar a interface “MessageListener” que define o m\u00e9todo “onMessage()”. Esse m\u00e9todo \u00e9 o respons\u00e1vel por executar as a\u00e7\u00f5es de consumo da mensagem.<\/p>\n

    O m\u00e9todo recebe como par\u00e2metro um objeto do tipo Message. Nele teremos o conte\u00fado que foi disponibilizado pelo cliente (produtor da mensagem).<\/p>\n

    \r\n\tpublic void onMessage(Message message) {\r\n\t\tSystem.out.println(getClass() + \" Inicio\");\r\n\t\ttry {\r\n\r\n\t\t\tif (message instanceof TextMessage) {\r\n\t\t\t\tTextMessage mensagem = (TextMessage) message;\r\n\t\t\t\tSystem.out.println(\"Mensagem recebida: \" + mensagem.getText());\r\n\t\t\t} else if (message instanceof ObjectMessage) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tObjectMessage obj = (ObjectMessage) message;\r\n\t\t\t\t\tAluno aluno = (Aluno) obj.getObject();\r\n\t\t\t\t\tSystem.out.println(\"Objeto Recebido: \" + aluno);\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tSystem.out.println(getClass() + \" Fim\");\r\n\t}\r\n<\/pre>\n

    No nosso caso \u00e9 verificado o tipo da mensagem. Se \u00e9 uma mensagem do tipo texto (TextMessage) converteremos o conte\u00fado em texto. Se for do tipo ObjectMessage converteremos em um objeto do tipo Aluno, pois a nossa fila \u00e9 de objetos aluno.
    \nAten\u00e7\u00e3o: Se for colocado um objeto diferente de Aluno na fila haver\u00e1 erro na execu\u00e7\u00e3o da fila.<\/b><\/p>\n

    Cria\u00e7\u00e3o do Servlet produtor da mensagem<\/H2><\/p>\n

    C\u00f3digo utilizando o padr\u00e3o JMS 1.1 contido na especifica\u00e7\u00e3o JEE 6.<\/p>\n

    \r\npackage br.com.feltex.academicnet.servlet;\r\n\r\nimport java.io.IOException;\r\nimport java.io.PrintWriter;\r\n\r\nimport javax.annotation.Resource;\r\nimport javax.jms.Connection;\r\nimport javax.jms.ConnectionFactory;\r\nimport javax.jms.JMSException;\r\nimport javax.jms.MessageProducer;\r\nimport javax.jms.ObjectMessage;\r\nimport javax.jms.Queue;\r\nimport javax.jms.Session;\r\nimport javax.servlet.ServletException;\r\nimport javax.servlet.annotation.WebServlet;\r\nimport javax.servlet.http.HttpServlet;\r\nimport javax.servlet.http.HttpServletRequest;\r\nimport javax.servlet.http.HttpServletResponse;\r\n\r\nimport br.com.feltex.academicnet.entidade.Aluno;\r\n\r\n@WebServlet(\"\/AlunoServletJMS\")\r\npublic class AlunoServletJMS extends HttpServlet {\r\n\tprivate static final long serialVersionUID = 1L;\r\n\r\n\t@Resource(mappedName = \"java:\/queue\/alunoQueue\")\r\n\tprivate Queue fila;\r\n\r\n\t@Resource(mappedName = \"java:\/ConnectionFactory\")\r\n\tprivate ConnectionFactory connectionFactory;\r\n\r\n\tprotected void doGet(HttpServletRequest request,\r\n\t\t\tHttpServletResponse response) throws ServletException, IOException {\r\n\t\tdoPost(request, response);\r\n\t}\r\n\r\n\tprotected void doPost(HttpServletRequest request,\r\n\t\t\tHttpServletResponse response) throws ServletException, IOException {\r\n\t\tSystem.out.println(getClass() + \"Inicio........\");\r\n\t\tAluno aluno = new Aluno();\r\n\t\taluno.setMatricula(2221L);\r\n\t\taluno.setNome(\"Maria da Silva\");\r\n\t\tenviarObjetoForma1(aluno);\r\n\t\tSystem.out.println(getClass() + \"Fim........\");\r\n\t\t\r\n\t\tPrintWriter out = response.getWriter();\t\t\r\n\t\tout.print(\"

    Objeto enviado com sucesso! JMS 1.0<\/H1>\");\t\r\n\t}\r\n\r\n\t\/**\r\n\t * Envia um objeto complexo para a fila JMS\r\n\t * \r\n\t * @param aluno Classe de entidade\r\n\t * Esta forma de envio \u00e9 a mais conhecida e utilizada atualmente\r\n\t *\/\r\n\tpublic void enviarObjetoForma1(Aluno aluno) {\r\n\t\ttry {\r\n\t\t\tConnection connection = connectionFactory.createConnection();\r\n\t\t\ttry {\r\n\t\t\t\tSession session = connection.createSession(false,\r\n\t\t\t\t\t\tSession.AUTO_ACKNOWLEDGE);\r\n\t\t\t\tObjectMessage objMessage = session.createObjectMessage();\r\n\t\t objMessage.setObject(aluno);\r\n\t\t \t\t\t\t\r\n\t\t\t\tMessageProducer messageProducer = session.createProducer(fila);\r\n\t\t\t\tmessageProducer.send(objMessage);\r\n\t\t\t\tmessageProducer.close();\r\n\t\t\t} finally {\r\n\t\t\t\tconnection.close();\r\n\t\t\t}\r\n\t\t} catch (JMSException ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t}\t\r\n}\r\n<\/pre>\n

    Encontramos 2 anota\u00e7\u00f5es do tipo “resource”. A primeira faz o mapeamento para a fila que usaremos para gravar a fila. E na segunda anota\u00e7\u00e3o temos o apontamento para a F\u00e1brica de conex\u00e3o com de fila.<\/p>\n

    @Resource(mappedName = “java:\/queue\/alunoQueue”)
    \nprivate Queue fila;<\/p>\n

    @Resource(mappedName = “java:\/ConnectionFactory”)
    \nprivate ConnectionFactory connectionFactory;<\/p>\n

    No m\u00e9todo doPost(…) h\u00e1 uma chamada para o m\u00e9todo “enviarObjetoForma1(Aluno aluno)” que \u00e9 respons\u00e1vel por instanciar a fila e enviar a mensagem. Vejamos como \u00e9 m\u00e9todo.<\/p>\n

    \r\npublic void enviarObjetoForma1(Aluno aluno) {\r\ntry {\r\n\tConnection connection = connectionFactory.createConnection();\r\n\ttry {\r\n\t\tSession session = connection.createSession(false,\r\n\t\t\t\tSession.AUTO_ACKNOWLEDGE);\r\n\t\tObjectMessage objMessage = session.createObjectMessage();\r\n\t\tobjMessage.setObject(aluno);\r\n\t        \t\t\t\t\r\n\t\tMessageProducer messageProducer = session.createProducer(fila);\r\n\t\tmessageProducer.send(objMessage);\r\n\t\tmessageProducer.close();\r\n\t\t} finally {\r\n\t\t  connection.close();\r\n    \t   }\r\n\t} catch (JMSException ex) {\r\n\tex.printStackTrace();\r\n }\r\n}\r\n<\/pre>\n

    O processo de envio de uma mensagem \u00e9 parecido com a conex\u00e3o de um banco de dados em JDBC.
    \n\u00c9 criada uma conex\u00e3o com o banco de Dados, nessa conex\u00e3o \u00e9 criada uma sess\u00e3o. Utilizamos essa sess\u00e3o para incluirmos um objeto e depois executamos o m\u00e9todo de envio de mensagem (send).<\/p>\n

    Pronto. Definimos o uso de fila Queue para o nosso projeto.<\/p>\n

    Implementa\u00e7\u00e3o via JMS 2.0<\/H2><\/p>\n

    O envio de mensagem JMS foi simplificado na especifica\u00e7\u00e3o JMS 2.0. Nessa vers\u00e3o n\u00e3o utilizamos uma ConnectionFactory e sim um contexto. Vejam um exemplo de envio de mensagem em outro servlet. Observe que o consumidor e a fila s\u00e3o os mesmos o que mudou foi a simplifica\u00e7\u00e3o no envio.<\/p>\n

    \r\npackage br.com.feltex.academicnet.servlet;\r\n\r\nimport java.io.IOException;\r\nimport java.io.PrintWriter;\r\n\r\nimport javax.annotation.Resource;\r\nimport javax.inject.Inject;\r\nimport javax.jms.JMSConnectionFactory;\r\nimport javax.jms.JMSContext;\r\nimport javax.jms.JMSException;\r\nimport javax.jms.ObjectMessage;\r\nimport javax.jms.Queue;\r\nimport javax.servlet.ServletException;\r\nimport javax.servlet.annotation.WebServlet;\r\nimport javax.servlet.http.HttpServlet;\r\nimport javax.servlet.http.HttpServletRequest;\r\nimport javax.servlet.http.HttpServletResponse;\r\n\r\nimport br.com.feltex.academicnet.entidade.Aluno;\r\n\r\n@WebServlet(\"\/AlunoServletJMS2\")\r\npublic class AlunoServletJMS2 extends HttpServlet {\r\n\tprivate static final long serialVersionUID = 1L;\r\n\r\n\t@Resource(mappedName = \"java:\/queue\/alunoQueue\")\r\n\tprivate Queue fila;\r\n\r\n\t@Inject\r\n\t@JMSConnectionFactory(\"java:\/ConnectionFactory\")\r\n\tprivate JMSContext context;\r\n\r\n\tprotected void doGet(HttpServletRequest request,\r\n\t\t\tHttpServletResponse response) throws ServletException, IOException {\r\n\t\tdoPost(request, response);\r\n\t}\r\n\r\n\tprotected void doPost(HttpServletRequest request,\r\n\t\t\tHttpServletResponse response) throws ServletException, IOException {\r\n\t\tSystem.out.println(getClass() + \"Inicio........\");\r\n\t\tAluno aluno = new Aluno();\r\n\t\taluno.setMatricula(2221L);\r\n\t\taluno.setNome(\"Maria da Silva\");\r\n\t\tenviarObjetoForma2(aluno);\r\n\t\tSystem.out.println(getClass() + \"Fim........\");\r\n\r\n\t\tPrintWriter out = response.getWriter();\r\n\t\tout.print(\"

    Objeto enviado com sucesso! JMS 2.0<\/H1>\");\r\n\t}\r\n\r\n\t\/**\r\n\t * Envia um objeto complexo para a fila JMS\r\n\t * \r\n\t * \r\n\t *\/\r\n\tpublic void enviarObjetoForma2(Aluno aluno) {\r\n\t\ttry {\r\n\t\t\tObjectMessage objMessage = context.createObjectMessage();\r\n\t\t\tobjMessage.setObject(aluno);\r\n\t\t\tcontext.createProducer().send(fila, objMessage);\r\n\r\n\t\t} catch (JMSException ex) {\r\n\t\t\tex.printStackTrace();\r\n\t\t}\r\n\t}\r\n}\r\n<\/pre>\n

    Observe que o c\u00f3digo<\/p>\n

    \r\n@Resource(mappedName = \"java:\/ConnectionFactory\")\r\n\tprivate ConnectionFactory connectionFactory;\r\n\r\n<\/pre>\n

    Foi substitu\u00eddo por <\/p>\n

    \r\n        @Inject\r\n\t@JMSConnectionFactory(\"java:\/ConnectionFactory\")\r\n\tprivate JMSContext context;\r\n<\/pre>\n

    Execu\u00e7\u00e3o do projeto<\/H2>
    \n Rode o projeto completo. Acesse o menu principal e escolha as op\u00e7\u00f5es de envio JMS
    \n “Envio de Mensagem JMS 1.0 (Queue) – Alunos”
    \n “Envio de Mensagem JMS 2.0(Queue) – Alunos”<\/p>\n

    Abra\u00e7os e bons estudos.<\/p>\n

    Links relacionados<\/H2>
    \n JMS no JEE 6<\/a>
    \n
    JMS no JEE 7<\/a><\/p>\n

    Pr\u00f3ximos passos<\/H2>
    \n No pr\u00f3ximo Post<\/b> trataremos o uso de filas
    JMS Topic<\/a>.
    \n
    Exemplo Completo(AcademicNetWebJMS.war)<\/a><\/p>\n

    Links relacionados <\/h2>\n

    Recomendo que leia: Como gerenciar a transa\u00e7\u00e3o JPA com Hibernate via Filtro em projeto Web<\/a><\/p>\n

    Leia tamb\u00e9m: Exemplo completo com JSF Primefaces + EJB + Hibernate + MySQL + JMS (Topic)<\/a><\/p>\n

    Voc\u00ea ir\u00e1 gostar:Bean Transaction Management<\/a><\/p>\n

    N\u00e3o se esque\u00e7a de curtir este post nas rede sociais. D\u00ea a sua contribui\u00e7\u00e3o social e ajude o autor:<\/H2><\/p>\n","protected":false},"excerpt":{"rendered":"

    Exemplo completo com JSF Primefaces + EJB + Hibernate + MySQL + JMS Ol\u00e1 Amigos, Continuando o trabalho de implementa\u00e7\u00e3o do projeto AcademicNet incluiremos o uso de Filas. Vamos trabalhar tanto com Queue como Topic para nosso Exemplos. Tarefas: – …<\/p>\n

    Exemplo completo com JSF Primefaces + EJB + Hibernate + MySQL + JMS<\/span> Read More »<\/a><\/p>\n

    <\/p>\n","protected":false},"author":1,"featured_media":681,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0},"categories":[1],"tags":[],"yoast_head":"\nExemplo comPrimefaces + EJB + Hibernate + MySQL + JMS<\/title>\n<meta name=\"description\" content=\"Exemplo completo com JSF Primefaces + EJB + Hibernate + MySQL + JMS\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.feltex.com.br\/felix\/exemplo-completo-jsf-primefaces-ejb-hibernate-mysql-jms\/\" \/>\n<meta property=\"og:locale\" content=\"pt_BR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Exemplo comPrimefaces + EJB + Hibernate + MySQL + JMS\" \/>\n<meta property=\"og:description\" content=\"Exemplo completo com JSF Primefaces + EJB + Hibernate + MySQL + JMS\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.feltex.com.br\/felix\/exemplo-completo-jsf-primefaces-ejb-hibernate-mysql-jms\/\" \/>\n<meta property=\"og:site_name\" content=\"Aprenda Java\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/feltex.br\" \/>\n<meta property=\"article:published_time\" content=\"2014-04-30T20:02:51+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2014-11-17T13:44:10+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.feltex.com.br\/felix\/wp-content\/uploads\/2014\/04\/queue.png\" \/>\n\t<meta property=\"og:image:width\" content=\"530\" \/>\n\t<meta property=\"og:image:height\" content=\"260\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:label1\" content=\"Escrito por\" \/>\n\t<meta name=\"twitter:data1\" content=\"Andr\u00e9 F\u00e9lix\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. tempo de leitura\" \/>\n\t<meta name=\"twitter:data2\" content=\"7 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.feltex.com.br\/felix\/#website\",\"url\":\"https:\/\/www.feltex.com.br\/felix\/\",\"name\":\"Aprenda Java\",\"description\":\"Cursos de java, SQL e Engenharia de Software\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.feltex.com.br\/felix\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"pt-BR\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.feltex.com.br\/felix\/exemplo-completo-jsf-primefaces-ejb-hibernate-mysql-jms\/#primaryimage\",\"inLanguage\":\"pt-BR\",\"url\":\"https:\/\/www.feltex.com.br\/felix\/wp-content\/uploads\/2014\/04\/queue.png\",\"contentUrl\":\"https:\/\/www.feltex.com.br\/felix\/wp-content\/uploads\/2014\/04\/queue.png\",\"width\":530,\"height\":260},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.feltex.com.br\/felix\/exemplo-completo-jsf-primefaces-ejb-hibernate-mysql-jms\/#webpage\",\"url\":\"https:\/\/www.feltex.com.br\/felix\/exemplo-completo-jsf-primefaces-ejb-hibernate-mysql-jms\/\",\"name\":\"Exemplo comPrimefaces + EJB + Hibernate + MySQL + JMS\",\"isPartOf\":{\"@id\":\"https:\/\/www.feltex.com.br\/felix\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.feltex.com.br\/felix\/exemplo-completo-jsf-primefaces-ejb-hibernate-mysql-jms\/#primaryimage\"},\"datePublished\":\"2014-04-30T20:02:51+00:00\",\"dateModified\":\"2014-11-17T13:44:10+00:00\",\"author\":{\"@id\":\"https:\/\/www.feltex.com.br\/felix\/#\/schema\/person\/1e49f842c6254b4561b66ccf573c2069\"},\"description\":\"Exemplo completo com JSF Primefaces + EJB + Hibernate + MySQL + JMS\",\"breadcrumb\":{\"@id\":\"https:\/\/www.feltex.com.br\/felix\/exemplo-completo-jsf-primefaces-ejb-hibernate-mysql-jms\/#breadcrumb\"},\"inLanguage\":\"pt-BR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.feltex.com.br\/felix\/exemplo-completo-jsf-primefaces-ejb-hibernate-mysql-jms\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.feltex.com.br\/felix\/exemplo-completo-jsf-primefaces-ejb-hibernate-mysql-jms\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Exemplo completo com JSF Primefaces + EJB + Hibernate + MySQL + JMS\"}]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.feltex.com.br\/felix\/#\/schema\/person\/1e49f842c6254b4561b66ccf573c2069\",\"name\":\"Andr\\u00e9 F\\u00e9lix\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.feltex.com.br\/felix\/#personlogo\",\"inLanguage\":\"pt-BR\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d2d9cc82cab40245e6f803982b1448e6?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d2d9cc82cab40245e6f803982b1448e6?s=96&r=g\",\"caption\":\"Andr\\u00e9 F\\u00e9lix\"},\"sameAs\":[\"http:\/\/www.feltex.com.br\"],\"url\":\"https:\/\/www.feltex.com.br\/felix\/author\/andre.felix\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Exemplo comPrimefaces + EJB + Hibernate + MySQL + JMS","description":"Exemplo completo com JSF Primefaces + EJB + Hibernate + MySQL + JMS","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.feltex.com.br\/felix\/exemplo-completo-jsf-primefaces-ejb-hibernate-mysql-jms\/","og_locale":"pt_BR","og_type":"article","og_title":"Exemplo comPrimefaces + EJB + Hibernate + MySQL + JMS","og_description":"Exemplo completo com JSF Primefaces + EJB + Hibernate + MySQL + JMS","og_url":"https:\/\/www.feltex.com.br\/felix\/exemplo-completo-jsf-primefaces-ejb-hibernate-mysql-jms\/","og_site_name":"Aprenda Java","article_publisher":"https:\/\/www.facebook.com\/feltex.br","article_published_time":"2014-04-30T20:02:51+00:00","article_modified_time":"2014-11-17T13:44:10+00:00","og_image":[{"width":530,"height":260,"url":"https:\/\/www.feltex.com.br\/felix\/wp-content\/uploads\/2014\/04\/queue.png","type":"image\/png"}],"twitter_misc":{"Escrito por":"Andr\u00e9 F\u00e9lix","Est. tempo de leitura":"7 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/www.feltex.com.br\/felix\/#website","url":"https:\/\/www.feltex.com.br\/felix\/","name":"Aprenda Java","description":"Cursos de java, SQL e Engenharia de Software","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.feltex.com.br\/felix\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"pt-BR"},{"@type":"ImageObject","@id":"https:\/\/www.feltex.com.br\/felix\/exemplo-completo-jsf-primefaces-ejb-hibernate-mysql-jms\/#primaryimage","inLanguage":"pt-BR","url":"https:\/\/www.feltex.com.br\/felix\/wp-content\/uploads\/2014\/04\/queue.png","contentUrl":"https:\/\/www.feltex.com.br\/felix\/wp-content\/uploads\/2014\/04\/queue.png","width":530,"height":260},{"@type":"WebPage","@id":"https:\/\/www.feltex.com.br\/felix\/exemplo-completo-jsf-primefaces-ejb-hibernate-mysql-jms\/#webpage","url":"https:\/\/www.feltex.com.br\/felix\/exemplo-completo-jsf-primefaces-ejb-hibernate-mysql-jms\/","name":"Exemplo comPrimefaces + EJB + Hibernate + MySQL + JMS","isPartOf":{"@id":"https:\/\/www.feltex.com.br\/felix\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.feltex.com.br\/felix\/exemplo-completo-jsf-primefaces-ejb-hibernate-mysql-jms\/#primaryimage"},"datePublished":"2014-04-30T20:02:51+00:00","dateModified":"2014-11-17T13:44:10+00:00","author":{"@id":"https:\/\/www.feltex.com.br\/felix\/#\/schema\/person\/1e49f842c6254b4561b66ccf573c2069"},"description":"Exemplo completo com JSF Primefaces + EJB + Hibernate + MySQL + JMS","breadcrumb":{"@id":"https:\/\/www.feltex.com.br\/felix\/exemplo-completo-jsf-primefaces-ejb-hibernate-mysql-jms\/#breadcrumb"},"inLanguage":"pt-BR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.feltex.com.br\/felix\/exemplo-completo-jsf-primefaces-ejb-hibernate-mysql-jms\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.feltex.com.br\/felix\/exemplo-completo-jsf-primefaces-ejb-hibernate-mysql-jms\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Exemplo completo com JSF Primefaces + EJB + Hibernate + MySQL + JMS"}]},{"@type":"Person","@id":"https:\/\/www.feltex.com.br\/felix\/#\/schema\/person\/1e49f842c6254b4561b66ccf573c2069","name":"Andr\u00e9 F\u00e9lix","image":{"@type":"ImageObject","@id":"https:\/\/www.feltex.com.br\/felix\/#personlogo","inLanguage":"pt-BR","url":"https:\/\/secure.gravatar.com\/avatar\/d2d9cc82cab40245e6f803982b1448e6?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d2d9cc82cab40245e6f803982b1448e6?s=96&r=g","caption":"Andr\u00e9 F\u00e9lix"},"sameAs":["http:\/\/www.feltex.com.br"],"url":"https:\/\/www.feltex.com.br\/felix\/author\/andre.felix\/"}]}},"_links":{"self":[{"href":"https:\/\/www.feltex.com.br\/felix\/wp-json\/wp\/v2\/posts\/646"}],"collection":[{"href":"https:\/\/www.feltex.com.br\/felix\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.feltex.com.br\/felix\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.feltex.com.br\/felix\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.feltex.com.br\/felix\/wp-json\/wp\/v2\/comments?post=646"}],"version-history":[{"count":17,"href":"https:\/\/www.feltex.com.br\/felix\/wp-json\/wp\/v2\/posts\/646\/revisions"}],"predecessor-version":[{"id":1613,"href":"https:\/\/www.feltex.com.br\/felix\/wp-json\/wp\/v2\/posts\/646\/revisions\/1613"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.feltex.com.br\/felix\/wp-json\/wp\/v2\/media\/681"}],"wp:attachment":[{"href":"https:\/\/www.feltex.com.br\/felix\/wp-json\/wp\/v2\/media?parent=646"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.feltex.com.br\/felix\/wp-json\/wp\/v2\/categories?post=646"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.feltex.com.br\/felix\/wp-json\/wp\/v2\/tags?post=646"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}