Hi everybady!!!
I have a terrible problem, . . .  in my cuba aplication I have a @listener listening to an  JMS activeMQ, . . .  the problem is that when I run  my cuba aplication with a previous queue in the  activeMQ jump the wrong because the JPA of cuba-framework is not avilable and I lost some messages,." Could not open JPA EntityManager for transaction;" . . .  there are any to way to establish an dependecy betowing my “@listener” and the " @Inject private Persistence persistence;"?. . . .  I mean, don´t to execute @listener until the JPA of cuba will be complicly avilable!!. . . . Thank a lot!! . . .
attached code
the listener
get the folow wrong:
An error has occurred in the transaction: Listener method 'public void es.emtmadrid.adq.bo.activemq.listener.ActiveMqListener.listenPasarelaVirtual(es.emtmadrid.adq.bo.activemq.model.pasarelavirtual.Message)' threw exception; nested exception is org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: java.lang.NullPointerException
org.springframework.jms.listener.adapter.ListenerExecutionFailedException: Listener method 'public void es.emtmadrid.adq.bo.activemq.listener.ActiveMqListener.listenPasarelaVirtual(es.emtmadrid.adq.bo.activemq.model.pasarelavirtual.Message)' threw exception; nested exception is org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: java.lang.NullPointerException