openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jose Luis Cetina (JIRA)" <j...@apache.org>
Subject [jira] [Created] (OPENJPA-2224) Enhancement in EntityListener
Date Thu, 05 Jul 2012 19:49:35 GMT
Jose Luis Cetina created OPENJPA-2224:
-----------------------------------------

             Summary: Enhancement in EntityListener
                 Key: OPENJPA-2224
                 URL: https://issues.apache.org/jira/browse/OPENJPA-2224
             Project: OpenJPA
          Issue Type: Improvement
          Components: jpa
    Affects Versions: 2.2.0
            Reporter: Jose Luis Cetina


The Enhancement try to Enhance my EntityListener.

The exception is caused by the JNDI lookup that i am performing in my EntityListener.

During the Enhancement processing, it looks like openjpa (Enhancement) is creating an
instance of your EntityListener.  The ctor for your EntityListener is
requiring a JNDI context and, of course, none exists in your build
environment.

public class EntityListener { 
    private BitacoraFacade bitacoraFacadeLocal;
    public EntityListener() {
        try {
            bitacoraFacadeLocal = (BitacoraFacade) UtilEJB.getEJBReference(BitacoraFacade.class);
        } catch (Exception ex) {
           ex.printStackTrace();
        }
    }


pom.xml:
<execution>
    <id>enhancer</id>
     <phase>process-classes</phase>
     <goals>
     <goal>enhance</goal>
     </goals>
</execution>

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message