[jboss-jira] [JBoss JIRA] (WFLY-3501) createStoredProcedureQuery - Trying to return an unknown connection: org.jboss.jca.adapters.jdbc.jdk7.WrappedConnectionJDK7

Maycon Oliveira (JIRA) issues at jboss.org
Mon Jun 16 07:27:24 EDT 2014


     [ https://issues.jboss.org/browse/WFLY-3501?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Maycon Oliveira updated WFLY-3501:
----------------------------------

    Description: 
The exception is throw when we call a StoredProcedure on a second EJB after do something with the EntityManager on the first EJB:

EJB1Session
 
@PersistenceContext
protected EntityManager em;
 
@EJB
protected EJB2Session session;
 
public void aa(){
    // do ANYTHING with EntityManager
    Query q = this.em.createQuery("select e from Anything e");

    q.getResultList();
    

//call a second EJB
     session.callStoredProcedureX();
}
--------------------------------
EJB2Session

@PersistenceContext
protected EntityManager em;
 
public void callStoredProcedureX() {
  StoredProcedureQuery storedProcedure = this.em.createStoredProcedureQuery("PROCEDURE_XXX");
  storedProcedure.execute();
}

  was:
The exception is throw when we call a StoredProcedure on a second EJB after do something with the EntityManager on the first EJB:

EJB1Session
 
@PersistenceContext
protected EntityManager em;
 
@EJB
protected EJB2Session session;
 
public void aa(){
    // do ANYTHING with EntityManager
    Query q = this.em.createQuery("select e from Anything e");
    q.getResultList();
    //call a second EJB
     session.callStoredProcedureX();
}
--------------------------------
EJB2Session

@PersistenceContext
protected EntityManager em;
 
public void callStoredProcedureX() {
  StoredProcedureQuery storedProcedure = this.em.createStoredProcedureQuery("PROCEDURE_XXX");
  storedProcedure.execute();
}



> createStoredProcedureQuery - Trying to return an unknown connection: org.jboss.jca.adapters.jdbc.jdk7.WrappedConnectionJDK7
> ---------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WFLY-3501
>                 URL: https://issues.jboss.org/browse/WFLY-3501
>             Project: WildFly
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 8.1.0.Final
>            Reporter: Maycon Oliveira
>            Assignee: Jason Greene
>            Priority: Minor
>
> The exception is throw when we call a StoredProcedure on a second EJB after do something with the EntityManager on the first EJB:
> EJB1Session
>  
> @PersistenceContext
> protected EntityManager em;
>  
> @EJB
> protected EJB2Session session;
>  
> public void aa(){
>     // do ANYTHING with EntityManager
>     Query q = this.em.createQuery("select e from Anything e");
>     q.getResultList();
>     
> //call a second EJB
>      session.callStoredProcedureX();
> }
> --------------------------------
> EJB2Session
> @PersistenceContext
> protected EntityManager em;
>  
> public void callStoredProcedureX() {
>   StoredProcedureQuery storedProcedure = this.em.createStoredProcedureQuery("PROCEDURE_XXX");
>   storedProcedure.execute();
> }



--
This message was sent by Atlassian JIRA
(v6.2.6#6264)


More information about the jboss-jira mailing list