SóProvas


ID
1208197
Banca
CESPE / CEBRASPE
Órgão
TJ-SE
Ano
2014
Provas
Disciplina
Programação
Assuntos

Acerca de sistemas transacionais e de arquitetura Java EE 7, julgue os itens subsequentes.

JDBC faz conexão persistente entre as instâncias beans e as chamadas aos bancos de dados conectados, sendo, portanto, incompatível com sessões do tipo bean stateful.

Alternativas
Comentários
  • @PersistenceContext (EXTENDED)

  • Independente de utilizar anotação PersistenceContext, JPA/Hibernate ou qualquer outra tecnologica utiliza pode utilizar drivers JDBC para acesso. São camadas diferentes, assuntos distintos.

  • " Returning without Committing

    In a stateless session bean with bean-managed transactions, a business method must commit or roll back a transaction before returning. However, a stateful session bean does not have this restriction.

    In a stateful session bean with a JTA transaction, the association between the bean instance and the transaction is retained across multiple client calls. Even if each business method called by the client opens and closes the database connection, the association is retained until the instance completes the transaction.

    In a stateful session bean with a JDBC transaction, the JDBC connection retains the association between the bean instance and the transaction across multiple calls. If the connection is closed, the association is not retained."

    https://docs.oracle.com/javaee/6/tutorial/doc/bnciy.html

  • Alternativa correta é a "ERRADO".

    Ja que os de baixo nao ajudou em muita coisa..

  • O servidor de aplicação tem persistência através de JDBC, JPA e JTA, havendo necessidade de configuração de Datasources para funcionar.