br.gov.frameworkdemoiselle.internal.producer
Class ConversationEntityManagerStore

java.lang.Object
  extended by br.gov.frameworkdemoiselle.internal.producer.AbstractEntityManagerStore
      extended by br.gov.frameworkdemoiselle.internal.producer.ConversationEntityManagerStore
All Implemented Interfaces:
EntityManagerStore, Serializable

@ConversationScoped
public class ConversationEntityManagerStore
extends AbstractEntityManagerStore

Implementation that stores produced entity managers on the conversation scope. It's the user responsibility to start and end conversations injecting the Conversation object inside of a conversation scoped bean that need the entity manager.

Author:
serpro
See Also:
Serialized Form

Constructor Summary
ConversationEntityManagerStore()
           
 
Method Summary
 javax.enterprise.context.Conversation getConversation()
           
 void initialize()
          Run this to initialize all persistence units.
 void terminate()
          Run this to close all persistence units.
 
Methods inherited from class br.gov.frameworkdemoiselle.internal.producer.AbstractEntityManagerStore
getCache, getEntityManager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConversationEntityManagerStore

public ConversationEntityManagerStore()
Method Detail

getConversation

public javax.enterprise.context.Conversation getConversation()

initialize

@PostConstruct
public void initialize()
Description copied from interface: EntityManagerStore
Run this to initialize all persistence units. It's recomended this method be annotated with PostConstruct, so it runs as soon as an EntityManager gets injected.


terminate

@PreDestroy
public void terminate()
Description copied from interface: EntityManagerStore
Run this to close all persistence units. It's recomended this method be annotated with PreDestroy, so it runs as soon as the scope the EntityManager is attached to ends.



Copyright © 2014 SERPRO - Serviço Federal de Processamento de Dados. All Rights Reserved.