geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anthony Insolia (JIRA)" <>
Subject [jira] [Created] (GERONIMO-6387) @EJB doesn't work in an EJB annotated with @Entity
Date Thu, 13 Sep 2012 08:53:08 GMT
Anthony Insolia created GERONIMO-6387:

             Summary: @EJB doesn't work in an EJB annotated with @Entity
                 Key: GERONIMO-6387
             Project: Geronimo
          Issue Type: Bug
      Security Level: public (Regular issues)
          Components: dependencies
    Affects Versions: 3.0-beta-1
         Environment: Geronimo 3.0 Beta
JavaEE6 singleton sample
            Reporter: Anthony Insolia

I have an @Singleton bean also annotated @Startup. The singleton is startin gup and it is
accessible to other @ManagedBeans that inject the singleton using @EJB.
public class Factory { 
 private EntityManagerFactory emf = null; 
 private EntityManager entityManager = null;

@ManagedBean(name = "Credentials")
public class Credentials {  
 private User user = null; 
 private String username;  
 private String password;  
 private String company;  
 private String verification = null;  
 private boolean loggedIn = false;
 private InitialContext initialcontext = null; 
 private Factory factory; 
 public Credentials() {}

 work fine: the @EJB resolves the reference to my factory object/singleton. In the same WAR
I have an entity bean defined as below and the @EJB doesnt work.
@ManagedBean(name = "User")
public class User extends Particle {
 private long uuid = 0;
 private long csid = 0;
  private Factory factory;

I've added an Entity bean to the singleton example and get the same results

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message