You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "Donatas Ciuksys (JIRA)" <ji...@apache.org> on 2012/10/26 13:47:12 UTC

[jira] [Created] (TOMEE-508) EntityManager dependency considered not passivation capable (CDI spec violation)

Donatas Ciuksys created TOMEE-508:
-------------------------------------

             Summary: EntityManager dependency considered not passivation capable (CDI spec violation)
                 Key: TOMEE-508
                 URL: https://issues.apache.org/jira/browse/TOMEE-508
             Project: TomEE
          Issue Type: Bug
    Affects Versions: 1.5.0
         Environment: Windows 7 x64; jdk1.7.0_09 32 bit; apache-tomee-1.5.1-20121026.064316-51-webprofile.zip
            Reporter: Donatas Ciuksys
            Priority: Blocker


1. Create class EntityManagerProducer:

@SessionScoped
@Stateful
public class EntityManagerProducer implements Serializable {
    
    @PersistenceContext(type=PersistenceContextType.EXTENDED)
    private EntityManager em;
    
    @Produces
    public EntityManager getEntityManager() {
        return em;
    }
}

2. Create injection client:

@Named
@SessionScoped
@Stateful
public class A implements Serializable  {
    
    @Inject
    private EntityManager em;

    public String getDelegateClassName() {
        return em.getDelegate().getClass().getCanonicalName();
    }
    
}

3. Create JSF page and try to call getDelegateClassName():

    <h:body>
        EntityManager is open: #{a.delegateClassName}
    </h:body>

4. Try to deploy the application to tomee - observe error message:

Caused by: org.apache.openejb.OpenEJBRuntimeException: org.apache.webbeans.exception.WebBeansConfigurationException: Passivation capable beans must satisfy passivation capable dependencies. Bean : A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named] does not satisfy. Details about the Injection-point: Field Injection Point, field name :  em, Bean Owner : [A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named]]
	at org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:323)
	at org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:150)
	... 48 more
Caused by: org.apache.webbeans.exception.WebBeansConfigurationException: Passivation capable beans must satisfy passivation capable dependencies. Bean : A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named] does not satisfy. Details about the Injection-point: Field Injection Point, field name :  em, Bean Owner : [A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named]]
	at org.apache.webbeans.component.AbstractOwbBean.validatePassivationDependencies(AbstractOwbBean.java:695)
	at org.apache.webbeans.component.AbstractInjectionTargetBean.validatePassivationDependencies(AbstractInjectionTargetBean.java:595)
	at org.apache.openejb.cdi.BeansDeployer.checkPassivationScope(BeansDeployer.java:414)
	at org.apache.openejb.cdi.BeansDeployer.validate(BeansDeployer.java:260)
	at org.apache.openejb.cdi.BeansDeployer.validateInjectionPoints(BeansDeployer.java:222)
	at org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:280)
	... 49 more
---------------------------------

I think this is CDI specification violation - page 3 of CDI specification contains following example:

@SessionScoped @Model
public class Login implements Serializable {
    @Inject Credentials credentials;
    @Inject @Users EntityManager userDatabase;
...

--
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: http://www.atlassian.com/software/jira

[jira] [Updated] (TOMEE-508) EntityManager dependency considered not passivation capable (CDI spec violation)

Posted by "Donatas Ciuksys (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TOMEE-508?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Donatas Ciuksys updated TOMEE-508:
----------------------------------

    Affects Version/s: 1.5.1
    
> EntityManager dependency considered not passivation capable (CDI spec violation)
> --------------------------------------------------------------------------------
>
>                 Key: TOMEE-508
>                 URL: https://issues.apache.org/jira/browse/TOMEE-508
>             Project: TomEE
>          Issue Type: Bug
>    Affects Versions: 1.5.0, 1.5.1
>         Environment: Windows 7 x64; jdk1.7.0_09 32 bit; apache-tomee-1.5.1-20121026.064316-51-webprofile.zip
>            Reporter: Donatas Ciuksys
>            Priority: Blocker
>
> 1. Create class EntityManagerProducer:
> @SessionScoped
> @Stateful
> public class EntityManagerProducer implements Serializable {
>     
>     @PersistenceContext(type=PersistenceContextType.EXTENDED)
>     private EntityManager em;
>     
>     @Produces
>     public EntityManager getEntityManager() {
>         return em;
>     }
> }
> 2. Create injection client:
> @Named
> @SessionScoped
> @Stateful
> public class A implements Serializable  {
>     
>     @Inject
>     private EntityManager em;
>     public String getDelegateClassName() {
>         return em.getDelegate().getClass().getCanonicalName();
>     }
>     
> }
> 3. Create JSF page and try to call getDelegateClassName():
>     <h:body>
>         EntityManager is open: #{a.delegateClassName}
>     </h:body>
> 4. Try to deploy the application to tomee - observe error message:
> Caused by: org.apache.openejb.OpenEJBRuntimeException: org.apache.webbeans.exception.WebBeansConfigurationException: Passivation capable beans must satisfy passivation capable dependencies. Bean : A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named] does not satisfy. Details about the Injection-point: Field Injection Point, field name :  em, Bean Owner : [A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named]]
> 	at org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:323)
> 	at org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:150)
> 	... 48 more
> Caused by: org.apache.webbeans.exception.WebBeansConfigurationException: Passivation capable beans must satisfy passivation capable dependencies. Bean : A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named] does not satisfy. Details about the Injection-point: Field Injection Point, field name :  em, Bean Owner : [A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named]]
> 	at org.apache.webbeans.component.AbstractOwbBean.validatePassivationDependencies(AbstractOwbBean.java:695)
> 	at org.apache.webbeans.component.AbstractInjectionTargetBean.validatePassivationDependencies(AbstractInjectionTargetBean.java:595)
> 	at org.apache.openejb.cdi.BeansDeployer.checkPassivationScope(BeansDeployer.java:414)
> 	at org.apache.openejb.cdi.BeansDeployer.validate(BeansDeployer.java:260)
> 	at org.apache.openejb.cdi.BeansDeployer.validateInjectionPoints(BeansDeployer.java:222)
> 	at org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:280)
> 	... 49 more
> ---------------------------------
> I think this is CDI specification violation - page 3 of CDI specification contains following example:
> @SessionScoped @Model
> public class Login implements Serializable {
>     @Inject Credentials credentials;
>     @Inject @Users EntityManager userDatabase;
> ...

--
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: http://www.atlassian.com/software/jira

[jira] [Resolved] (TOMEE-508) EntityManager dependency considered not passivation capable (CDI spec violation)

Posted by "Donatas Ciuksys (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TOMEE-508?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Donatas Ciuksys resolved TOMEE-508.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 1.5.1
    
> EntityManager dependency considered not passivation capable (CDI spec violation)
> --------------------------------------------------------------------------------
>
>                 Key: TOMEE-508
>                 URL: https://issues.apache.org/jira/browse/TOMEE-508
>             Project: TomEE
>          Issue Type: Bug
>    Affects Versions: 1.5.0, 1.5.1
>         Environment: Windows 7 x64; jdk1.7.0_09 32 bit; apache-tomee-1.5.1-20121026.064316-51-webprofile.zip
>            Reporter: Donatas Ciuksys
>            Priority: Blocker
>             Fix For: 1.5.1
>
>
> 1. Create class EntityManagerProducer:
> @SessionScoped
> @Stateful
> public class EntityManagerProducer implements Serializable {
>     
>     @PersistenceContext(type=PersistenceContextType.EXTENDED)
>     private EntityManager em;
>     
>     @Produces
>     public EntityManager getEntityManager() {
>         return em;
>     }
> }
> 2. Create injection client:
> @Named
> @SessionScoped
> @Stateful
> public class A implements Serializable  {
>     
>     @Inject
>     private EntityManager em;
>     public String getDelegateClassName() {
>         return em.getDelegate().getClass().getCanonicalName();
>     }
>     
> }
> 3. Create JSF page and try to call getDelegateClassName():
>     <h:body>
>         EntityManager is open: #{a.delegateClassName}
>     </h:body>
> 4. Try to deploy the application to tomee - observe error message:
> Caused by: org.apache.openejb.OpenEJBRuntimeException: org.apache.webbeans.exception.WebBeansConfigurationException: Passivation capable beans must satisfy passivation capable dependencies. Bean : A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named] does not satisfy. Details about the Injection-point: Field Injection Point, field name :  em, Bean Owner : [A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named]]
> 	at org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:323)
> 	at org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:150)
> 	... 48 more
> Caused by: org.apache.webbeans.exception.WebBeansConfigurationException: Passivation capable beans must satisfy passivation capable dependencies. Bean : A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named] does not satisfy. Details about the Injection-point: Field Injection Point, field name :  em, Bean Owner : [A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named]]
> 	at org.apache.webbeans.component.AbstractOwbBean.validatePassivationDependencies(AbstractOwbBean.java:695)
> 	at org.apache.webbeans.component.AbstractInjectionTargetBean.validatePassivationDependencies(AbstractInjectionTargetBean.java:595)
> 	at org.apache.openejb.cdi.BeansDeployer.checkPassivationScope(BeansDeployer.java:414)
> 	at org.apache.openejb.cdi.BeansDeployer.validate(BeansDeployer.java:260)
> 	at org.apache.openejb.cdi.BeansDeployer.validateInjectionPoints(BeansDeployer.java:222)
> 	at org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:280)
> 	... 49 more
> ---------------------------------
> I think this is CDI specification violation - page 3 of CDI specification contains following example:
> @SessionScoped @Model
> public class Login implements Serializable {
>     @Inject Credentials credentials;
>     @Inject @Users EntityManager userDatabase;
> ...

--
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: http://www.atlassian.com/software/jira

[jira] [Commented] (TOMEE-508) EntityManager dependency considered not passivation capable (CDI spec violation)

Posted by "Donatas Ciuksys (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TOMEE-508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13485888#comment-13485888 ] 

Donatas Ciuksys commented on TOMEE-508:
---------------------------------------

The example above is not EXTENDED PersistenceContext specific. Changing type to TRANSACTIONAL gives the same result: "...WebBeansConfigurationException: Passivation capable beans must satisfy passivation capable dependencies".

CDI specification does not restrict places where EntityManager can be injected. Contrary - there is an example, where pasivation capable bean injects EntityManager (CDI spec page 3):

@SessionScoped @Model
public class Login implements Serializable {
    @Inject Credentials credentials;
    @Inject @Users EntityManager userDatabase; 

I have not found the way how to implement this with OpenWebBeans.
                
> EntityManager dependency considered not passivation capable (CDI spec violation)
> --------------------------------------------------------------------------------
>
>                 Key: TOMEE-508
>                 URL: https://issues.apache.org/jira/browse/TOMEE-508
>             Project: TomEE
>          Issue Type: Bug
>    Affects Versions: 1.5.0, 1.5.1
>         Environment: Windows 7 x64; jdk1.7.0_09 32 bit; apache-tomee-1.5.1-20121026.064316-51-webprofile.zip
>            Reporter: Donatas Ciuksys
>            Priority: Blocker
>
> 1. Create class EntityManagerProducer:
> @SessionScoped
> @Stateful
> public class EntityManagerProducer implements Serializable {
>     
>     @PersistenceContext(type=PersistenceContextType.EXTENDED)
>     private EntityManager em;
>     
>     @Produces
>     public EntityManager getEntityManager() {
>         return em;
>     }
> }
> 2. Create injection client:
> @Named
> @SessionScoped
> @Stateful
> public class A implements Serializable  {
>     
>     @Inject
>     private EntityManager em;
>     public String getDelegateClassName() {
>         return em.getDelegate().getClass().getCanonicalName();
>     }
>     
> }
> 3. Create JSF page and try to call getDelegateClassName():
>     <h:body>
>         EntityManager is open: #{a.delegateClassName}
>     </h:body>
> 4. Try to deploy the application to tomee - observe error message:
> Caused by: org.apache.openejb.OpenEJBRuntimeException: org.apache.webbeans.exception.WebBeansConfigurationException: Passivation capable beans must satisfy passivation capable dependencies. Bean : A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named] does not satisfy. Details about the Injection-point: Field Injection Point, field name :  em, Bean Owner : [A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named]]
> 	at org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:323)
> 	at org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:150)
> 	... 48 more
> Caused by: org.apache.webbeans.exception.WebBeansConfigurationException: Passivation capable beans must satisfy passivation capable dependencies. Bean : A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named] does not satisfy. Details about the Injection-point: Field Injection Point, field name :  em, Bean Owner : [A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named]]
> 	at org.apache.webbeans.component.AbstractOwbBean.validatePassivationDependencies(AbstractOwbBean.java:695)
> 	at org.apache.webbeans.component.AbstractInjectionTargetBean.validatePassivationDependencies(AbstractInjectionTargetBean.java:595)
> 	at org.apache.openejb.cdi.BeansDeployer.checkPassivationScope(BeansDeployer.java:414)
> 	at org.apache.openejb.cdi.BeansDeployer.validate(BeansDeployer.java:260)
> 	at org.apache.openejb.cdi.BeansDeployer.validateInjectionPoints(BeansDeployer.java:222)
> 	at org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:280)
> 	... 49 more
> ---------------------------------
> I think this is CDI specification violation - page 3 of CDI specification contains following example:
> @SessionScoped @Model
> public class Login implements Serializable {
>     @Inject Credentials credentials;
>     @Inject @Users EntityManager userDatabase;
> ...

--
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: http://www.atlassian.com/software/jira

[jira] [Commented] (TOMEE-508) EntityManager dependency considered not passivation capable (CDI spec violation)

Posted by "Romain Manni-Bucau (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TOMEE-508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13485938#comment-13485938 ] 

Romain Manni-Bucau commented on TOMEE-508:
------------------------------------------

Hmm, the injected entitymanager is serializable
                
> EntityManager dependency considered not passivation capable (CDI spec violation)
> --------------------------------------------------------------------------------
>
>                 Key: TOMEE-508
>                 URL: https://issues.apache.org/jira/browse/TOMEE-508
>             Project: TomEE
>          Issue Type: Bug
>    Affects Versions: 1.5.0, 1.5.1
>         Environment: Windows 7 x64; jdk1.7.0_09 32 bit; apache-tomee-1.5.1-20121026.064316-51-webprofile.zip
>            Reporter: Donatas Ciuksys
>            Priority: Blocker
>
> 1. Create class EntityManagerProducer:
> @SessionScoped
> @Stateful
> public class EntityManagerProducer implements Serializable {
>     
>     @PersistenceContext(type=PersistenceContextType.EXTENDED)
>     private EntityManager em;
>     
>     @Produces
>     public EntityManager getEntityManager() {
>         return em;
>     }
> }
> 2. Create injection client:
> @Named
> @SessionScoped
> @Stateful
> public class A implements Serializable  {
>     
>     @Inject
>     private EntityManager em;
>     public String getDelegateClassName() {
>         return em.getDelegate().getClass().getCanonicalName();
>     }
>     
> }
> 3. Create JSF page and try to call getDelegateClassName():
>     <h:body>
>         EntityManager is open: #{a.delegateClassName}
>     </h:body>
> 4. Try to deploy the application to tomee - observe error message:
> Caused by: org.apache.openejb.OpenEJBRuntimeException: org.apache.webbeans.exception.WebBeansConfigurationException: Passivation capable beans must satisfy passivation capable dependencies. Bean : A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named] does not satisfy. Details about the Injection-point: Field Injection Point, field name :  em, Bean Owner : [A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named]]
> 	at org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:323)
> 	at org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:150)
> 	... 48 more
> Caused by: org.apache.webbeans.exception.WebBeansConfigurationException: Passivation capable beans must satisfy passivation capable dependencies. Bean : A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named] does not satisfy. Details about the Injection-point: Field Injection Point, field name :  em, Bean Owner : [A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named]]
> 	at org.apache.webbeans.component.AbstractOwbBean.validatePassivationDependencies(AbstractOwbBean.java:695)
> 	at org.apache.webbeans.component.AbstractInjectionTargetBean.validatePassivationDependencies(AbstractInjectionTargetBean.java:595)
> 	at org.apache.openejb.cdi.BeansDeployer.checkPassivationScope(BeansDeployer.java:414)
> 	at org.apache.openejb.cdi.BeansDeployer.validate(BeansDeployer.java:260)
> 	at org.apache.openejb.cdi.BeansDeployer.validateInjectionPoints(BeansDeployer.java:222)
> 	at org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:280)
> 	... 49 more
> ---------------------------------
> I think this is CDI specification violation - page 3 of CDI specification contains following example:
> @SessionScoped @Model
> public class Login implements Serializable {
>     @Inject Credentials credentials;
>     @Inject @Users EntityManager userDatabase;
> ...

--
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: http://www.atlassian.com/software/jira

[jira] [Commented] (TOMEE-508) EntityManager dependency considered not passivation capable (CDI spec violation)

Posted by "Mark Struberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TOMEE-508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13485956#comment-13485956 ] 

Mark Struberg commented on TOMEE-508:
-------------------------------------

CDI-1.0 did require those checks to be done at boot time via the 'Bean Type'. And this is the class javax.persistence.EntityManager which is of course not Serializable. This is clearly overreaching and thus I fixed it in CDI-1.1 (https://issues.jboss.org/browse/CDI-153)

I remember that I removed all those overly strict checks in OWB already. Afair I also had to disable a few 1.0 TCK checks. Romain, is there some tweak code in TomEE which you added to fulfil the TCK? If so, then we should drop that. 
But might as well be that we still need some tweaks in OWB itself. 
                
> EntityManager dependency considered not passivation capable (CDI spec violation)
> --------------------------------------------------------------------------------
>
>                 Key: TOMEE-508
>                 URL: https://issues.apache.org/jira/browse/TOMEE-508
>             Project: TomEE
>          Issue Type: Bug
>    Affects Versions: 1.5.0, 1.5.1
>         Environment: Windows 7 x64; jdk1.7.0_09 32 bit; apache-tomee-1.5.1-20121026.064316-51-webprofile.zip
>            Reporter: Donatas Ciuksys
>            Priority: Blocker
>
> 1. Create class EntityManagerProducer:
> @SessionScoped
> @Stateful
> public class EntityManagerProducer implements Serializable {
>     
>     @PersistenceContext(type=PersistenceContextType.EXTENDED)
>     private EntityManager em;
>     
>     @Produces
>     public EntityManager getEntityManager() {
>         return em;
>     }
> }
> 2. Create injection client:
> @Named
> @SessionScoped
> @Stateful
> public class A implements Serializable  {
>     
>     @Inject
>     private EntityManager em;
>     public String getDelegateClassName() {
>         return em.getDelegate().getClass().getCanonicalName();
>     }
>     
> }
> 3. Create JSF page and try to call getDelegateClassName():
>     <h:body>
>         EntityManager is open: #{a.delegateClassName}
>     </h:body>
> 4. Try to deploy the application to tomee - observe error message:
> Caused by: org.apache.openejb.OpenEJBRuntimeException: org.apache.webbeans.exception.WebBeansConfigurationException: Passivation capable beans must satisfy passivation capable dependencies. Bean : A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named] does not satisfy. Details about the Injection-point: Field Injection Point, field name :  em, Bean Owner : [A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named]]
> 	at org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:323)
> 	at org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:150)
> 	... 48 more
> Caused by: org.apache.webbeans.exception.WebBeansConfigurationException: Passivation capable beans must satisfy passivation capable dependencies. Bean : A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named] does not satisfy. Details about the Injection-point: Field Injection Point, field name :  em, Bean Owner : [A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named]]
> 	at org.apache.webbeans.component.AbstractOwbBean.validatePassivationDependencies(AbstractOwbBean.java:695)
> 	at org.apache.webbeans.component.AbstractInjectionTargetBean.validatePassivationDependencies(AbstractInjectionTargetBean.java:595)
> 	at org.apache.openejb.cdi.BeansDeployer.checkPassivationScope(BeansDeployer.java:414)
> 	at org.apache.openejb.cdi.BeansDeployer.validate(BeansDeployer.java:260)
> 	at org.apache.openejb.cdi.BeansDeployer.validateInjectionPoints(BeansDeployer.java:222)
> 	at org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:280)
> 	... 49 more
> ---------------------------------
> I think this is CDI specification violation - page 3 of CDI specification contains following example:
> @SessionScoped @Model
> public class Login implements Serializable {
>     @Inject Credentials credentials;
>     @Inject @Users EntityManager userDatabase;
> ...

--
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: http://www.atlassian.com/software/jira

[jira] [Commented] (TOMEE-508) EntityManager dependency considered not passivation capable (CDI spec violation)

Posted by "Romain Manni-Bucau (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TOMEE-508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13485946#comment-13485946 ] 

Romain Manni-Bucau commented on TOMEE-508:
------------------------------------------

it is clearly serializable
                
> EntityManager dependency considered not passivation capable (CDI spec violation)
> --------------------------------------------------------------------------------
>
>                 Key: TOMEE-508
>                 URL: https://issues.apache.org/jira/browse/TOMEE-508
>             Project: TomEE
>          Issue Type: Bug
>    Affects Versions: 1.5.0, 1.5.1
>         Environment: Windows 7 x64; jdk1.7.0_09 32 bit; apache-tomee-1.5.1-20121026.064316-51-webprofile.zip
>            Reporter: Donatas Ciuksys
>            Priority: Blocker
>
> 1. Create class EntityManagerProducer:
> @SessionScoped
> @Stateful
> public class EntityManagerProducer implements Serializable {
>     
>     @PersistenceContext(type=PersistenceContextType.EXTENDED)
>     private EntityManager em;
>     
>     @Produces
>     public EntityManager getEntityManager() {
>         return em;
>     }
> }
> 2. Create injection client:
> @Named
> @SessionScoped
> @Stateful
> public class A implements Serializable  {
>     
>     @Inject
>     private EntityManager em;
>     public String getDelegateClassName() {
>         return em.getDelegate().getClass().getCanonicalName();
>     }
>     
> }
> 3. Create JSF page and try to call getDelegateClassName():
>     <h:body>
>         EntityManager is open: #{a.delegateClassName}
>     </h:body>
> 4. Try to deploy the application to tomee - observe error message:
> Caused by: org.apache.openejb.OpenEJBRuntimeException: org.apache.webbeans.exception.WebBeansConfigurationException: Passivation capable beans must satisfy passivation capable dependencies. Bean : A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named] does not satisfy. Details about the Injection-point: Field Injection Point, field name :  em, Bean Owner : [A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named]]
> 	at org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:323)
> 	at org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:150)
> 	... 48 more
> Caused by: org.apache.webbeans.exception.WebBeansConfigurationException: Passivation capable beans must satisfy passivation capable dependencies. Bean : A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named] does not satisfy. Details about the Injection-point: Field Injection Point, field name :  em, Bean Owner : [A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named]]
> 	at org.apache.webbeans.component.AbstractOwbBean.validatePassivationDependencies(AbstractOwbBean.java:695)
> 	at org.apache.webbeans.component.AbstractInjectionTargetBean.validatePassivationDependencies(AbstractInjectionTargetBean.java:595)
> 	at org.apache.openejb.cdi.BeansDeployer.checkPassivationScope(BeansDeployer.java:414)
> 	at org.apache.openejb.cdi.BeansDeployer.validate(BeansDeployer.java:260)
> 	at org.apache.openejb.cdi.BeansDeployer.validateInjectionPoints(BeansDeployer.java:222)
> 	at org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:280)
> 	... 49 more
> ---------------------------------
> I think this is CDI specification violation - page 3 of CDI specification contains following example:
> @SessionScoped @Model
> public class Login implements Serializable {
>     @Inject Credentials credentials;
>     @Inject @Users EntityManager userDatabase;
> ...

--
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: http://www.atlassian.com/software/jira

[jira] [Commented] (TOMEE-508) EntityManager dependency considered not passivation capable (CDI spec violation)

Posted by "Donatas Ciuksys (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TOMEE-508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13491308#comment-13491308 ] 

Donatas Ciuksys commented on TOMEE-508:
---------------------------------------

The EntityManager dependency is no longer considered as not passivation capable as of: 
apache-tomee-1.5.1-20121106.041324-61-webprofile.zip

This issue may be closed.
                
> EntityManager dependency considered not passivation capable (CDI spec violation)
> --------------------------------------------------------------------------------
>
>                 Key: TOMEE-508
>                 URL: https://issues.apache.org/jira/browse/TOMEE-508
>             Project: TomEE
>          Issue Type: Bug
>    Affects Versions: 1.5.0, 1.5.1
>         Environment: Windows 7 x64; jdk1.7.0_09 32 bit; apache-tomee-1.5.1-20121026.064316-51-webprofile.zip
>            Reporter: Donatas Ciuksys
>            Priority: Blocker
>             Fix For: 1.5.1
>
>
> 1. Create class EntityManagerProducer:
> @SessionScoped
> @Stateful
> public class EntityManagerProducer implements Serializable {
>     
>     @PersistenceContext(type=PersistenceContextType.EXTENDED)
>     private EntityManager em;
>     
>     @Produces
>     public EntityManager getEntityManager() {
>         return em;
>     }
> }
> 2. Create injection client:
> @Named
> @SessionScoped
> @Stateful
> public class A implements Serializable  {
>     
>     @Inject
>     private EntityManager em;
>     public String getDelegateClassName() {
>         return em.getDelegate().getClass().getCanonicalName();
>     }
>     
> }
> 3. Create JSF page and try to call getDelegateClassName():
>     <h:body>
>         EntityManager is open: #{a.delegateClassName}
>     </h:body>
> 4. Try to deploy the application to tomee - observe error message:
> Caused by: org.apache.openejb.OpenEJBRuntimeException: org.apache.webbeans.exception.WebBeansConfigurationException: Passivation capable beans must satisfy passivation capable dependencies. Bean : A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named] does not satisfy. Details about the Injection-point: Field Injection Point, field name :  em, Bean Owner : [A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named]]
> 	at org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:323)
> 	at org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:150)
> 	... 48 more
> Caused by: org.apache.webbeans.exception.WebBeansConfigurationException: Passivation capable beans must satisfy passivation capable dependencies. Bean : A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named] does not satisfy. Details about the Injection-point: Field Injection Point, field name :  em, Bean Owner : [A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named]]
> 	at org.apache.webbeans.component.AbstractOwbBean.validatePassivationDependencies(AbstractOwbBean.java:695)
> 	at org.apache.webbeans.component.AbstractInjectionTargetBean.validatePassivationDependencies(AbstractInjectionTargetBean.java:595)
> 	at org.apache.openejb.cdi.BeansDeployer.checkPassivationScope(BeansDeployer.java:414)
> 	at org.apache.openejb.cdi.BeansDeployer.validate(BeansDeployer.java:260)
> 	at org.apache.openejb.cdi.BeansDeployer.validateInjectionPoints(BeansDeployer.java:222)
> 	at org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:280)
> 	... 49 more
> ---------------------------------
> I think this is CDI specification violation - page 3 of CDI specification contains following example:
> @SessionScoped @Model
> public class Login implements Serializable {
>     @Inject Credentials credentials;
>     @Inject @Users EntityManager userDatabase;
> ...

--
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: http://www.atlassian.com/software/jira

[jira] [Commented] (TOMEE-508) EntityManager dependency considered not passivation capable (CDI spec violation)

Posted by "Romain Manni-Bucau (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TOMEE-508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13485177#comment-13485177 ] 

Romain Manni-Bucau commented on TOMEE-508:
------------------------------------------

This case is not specified, an extended em is not defined outside a stateful and cant really be produced (cdi).

the spec doesnt defined the behavior doing it and it is really not sthg you should do
                
> EntityManager dependency considered not passivation capable (CDI spec violation)
> --------------------------------------------------------------------------------
>
>                 Key: TOMEE-508
>                 URL: https://issues.apache.org/jira/browse/TOMEE-508
>             Project: TomEE
>          Issue Type: Bug
>    Affects Versions: 1.5.0, 1.5.1
>         Environment: Windows 7 x64; jdk1.7.0_09 32 bit; apache-tomee-1.5.1-20121026.064316-51-webprofile.zip
>            Reporter: Donatas Ciuksys
>            Priority: Blocker
>
> 1. Create class EntityManagerProducer:
> @SessionScoped
> @Stateful
> public class EntityManagerProducer implements Serializable {
>     
>     @PersistenceContext(type=PersistenceContextType.EXTENDED)
>     private EntityManager em;
>     
>     @Produces
>     public EntityManager getEntityManager() {
>         return em;
>     }
> }
> 2. Create injection client:
> @Named
> @SessionScoped
> @Stateful
> public class A implements Serializable  {
>     
>     @Inject
>     private EntityManager em;
>     public String getDelegateClassName() {
>         return em.getDelegate().getClass().getCanonicalName();
>     }
>     
> }
> 3. Create JSF page and try to call getDelegateClassName():
>     <h:body>
>         EntityManager is open: #{a.delegateClassName}
>     </h:body>
> 4. Try to deploy the application to tomee - observe error message:
> Caused by: org.apache.openejb.OpenEJBRuntimeException: org.apache.webbeans.exception.WebBeansConfigurationException: Passivation capable beans must satisfy passivation capable dependencies. Bean : A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named] does not satisfy. Details about the Injection-point: Field Injection Point, field name :  em, Bean Owner : [A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named]]
> 	at org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:323)
> 	at org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:150)
> 	... 48 more
> Caused by: org.apache.webbeans.exception.WebBeansConfigurationException: Passivation capable beans must satisfy passivation capable dependencies. Bean : A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named] does not satisfy. Details about the Injection-point: Field Injection Point, field name :  em, Bean Owner : [A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named]]
> 	at org.apache.webbeans.component.AbstractOwbBean.validatePassivationDependencies(AbstractOwbBean.java:695)
> 	at org.apache.webbeans.component.AbstractInjectionTargetBean.validatePassivationDependencies(AbstractInjectionTargetBean.java:595)
> 	at org.apache.openejb.cdi.BeansDeployer.checkPassivationScope(BeansDeployer.java:414)
> 	at org.apache.openejb.cdi.BeansDeployer.validate(BeansDeployer.java:260)
> 	at org.apache.openejb.cdi.BeansDeployer.validateInjectionPoints(BeansDeployer.java:222)
> 	at org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:280)
> 	... 49 more
> ---------------------------------
> I think this is CDI specification violation - page 3 of CDI specification contains following example:
> @SessionScoped @Model
> public class Login implements Serializable {
>     @Inject Credentials credentials;
>     @Inject @Users EntityManager userDatabase;
> ...

--
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: http://www.atlassian.com/software/jira

[jira] [Commented] (TOMEE-508) EntityManager dependency considered not passivation capable (CDI spec violation)

Posted by "Donatas Ciuksys (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TOMEE-508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13485941#comment-13485941 ] 

Donatas Ciuksys commented on TOMEE-508:
---------------------------------------

Putting this simply: could the class org.apache.openejb.persistence.JtaEntityManager be made Serializable??? Currently it is not.
                
> EntityManager dependency considered not passivation capable (CDI spec violation)
> --------------------------------------------------------------------------------
>
>                 Key: TOMEE-508
>                 URL: https://issues.apache.org/jira/browse/TOMEE-508
>             Project: TomEE
>          Issue Type: Bug
>    Affects Versions: 1.5.0, 1.5.1
>         Environment: Windows 7 x64; jdk1.7.0_09 32 bit; apache-tomee-1.5.1-20121026.064316-51-webprofile.zip
>            Reporter: Donatas Ciuksys
>            Priority: Blocker
>
> 1. Create class EntityManagerProducer:
> @SessionScoped
> @Stateful
> public class EntityManagerProducer implements Serializable {
>     
>     @PersistenceContext(type=PersistenceContextType.EXTENDED)
>     private EntityManager em;
>     
>     @Produces
>     public EntityManager getEntityManager() {
>         return em;
>     }
> }
> 2. Create injection client:
> @Named
> @SessionScoped
> @Stateful
> public class A implements Serializable  {
>     
>     @Inject
>     private EntityManager em;
>     public String getDelegateClassName() {
>         return em.getDelegate().getClass().getCanonicalName();
>     }
>     
> }
> 3. Create JSF page and try to call getDelegateClassName():
>     <h:body>
>         EntityManager is open: #{a.delegateClassName}
>     </h:body>
> 4. Try to deploy the application to tomee - observe error message:
> Caused by: org.apache.openejb.OpenEJBRuntimeException: org.apache.webbeans.exception.WebBeansConfigurationException: Passivation capable beans must satisfy passivation capable dependencies. Bean : A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named] does not satisfy. Details about the Injection-point: Field Injection Point, field name :  em, Bean Owner : [A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named]]
> 	at org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:323)
> 	at org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:150)
> 	... 48 more
> Caused by: org.apache.webbeans.exception.WebBeansConfigurationException: Passivation capable beans must satisfy passivation capable dependencies. Bean : A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named] does not satisfy. Details about the Injection-point: Field Injection Point, field name :  em, Bean Owner : [A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named]]
> 	at org.apache.webbeans.component.AbstractOwbBean.validatePassivationDependencies(AbstractOwbBean.java:695)
> 	at org.apache.webbeans.component.AbstractInjectionTargetBean.validatePassivationDependencies(AbstractInjectionTargetBean.java:595)
> 	at org.apache.openejb.cdi.BeansDeployer.checkPassivationScope(BeansDeployer.java:414)
> 	at org.apache.openejb.cdi.BeansDeployer.validate(BeansDeployer.java:260)
> 	at org.apache.openejb.cdi.BeansDeployer.validateInjectionPoints(BeansDeployer.java:222)
> 	at org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:280)
> 	... 49 more
> ---------------------------------
> I think this is CDI specification violation - page 3 of CDI specification contains following example:
> @SessionScoped @Model
> public class Login implements Serializable {
>     @Inject Credentials credentials;
>     @Inject @Users EntityManager userDatabase;
> ...

--
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: http://www.atlassian.com/software/jira

[jira] [Commented] (TOMEE-508) EntityManager dependency considered not passivation capable (CDI spec violation)

Posted by "Donatas Ciuksys (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TOMEE-508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13485959#comment-13485959 ] 

Donatas Ciuksys commented on TOMEE-508:
---------------------------------------

> it is clearly serializable
Sorry, I was looking at wrong source: https://svn.apache.org/repos/asf/openejb/branches/openejb-4.0.0-beta-1-016/container/openejb-core/src/main/java/org/apache/openejb/persistence/JtaEntityManager.java
                
> EntityManager dependency considered not passivation capable (CDI spec violation)
> --------------------------------------------------------------------------------
>
>                 Key: TOMEE-508
>                 URL: https://issues.apache.org/jira/browse/TOMEE-508
>             Project: TomEE
>          Issue Type: Bug
>    Affects Versions: 1.5.0, 1.5.1
>         Environment: Windows 7 x64; jdk1.7.0_09 32 bit; apache-tomee-1.5.1-20121026.064316-51-webprofile.zip
>            Reporter: Donatas Ciuksys
>            Priority: Blocker
>
> 1. Create class EntityManagerProducer:
> @SessionScoped
> @Stateful
> public class EntityManagerProducer implements Serializable {
>     
>     @PersistenceContext(type=PersistenceContextType.EXTENDED)
>     private EntityManager em;
>     
>     @Produces
>     public EntityManager getEntityManager() {
>         return em;
>     }
> }
> 2. Create injection client:
> @Named
> @SessionScoped
> @Stateful
> public class A implements Serializable  {
>     
>     @Inject
>     private EntityManager em;
>     public String getDelegateClassName() {
>         return em.getDelegate().getClass().getCanonicalName();
>     }
>     
> }
> 3. Create JSF page and try to call getDelegateClassName():
>     <h:body>
>         EntityManager is open: #{a.delegateClassName}
>     </h:body>
> 4. Try to deploy the application to tomee - observe error message:
> Caused by: org.apache.openejb.OpenEJBRuntimeException: org.apache.webbeans.exception.WebBeansConfigurationException: Passivation capable beans must satisfy passivation capable dependencies. Bean : A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named] does not satisfy. Details about the Injection-point: Field Injection Point, field name :  em, Bean Owner : [A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named]]
> 	at org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:323)
> 	at org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:150)
> 	... 48 more
> Caused by: org.apache.webbeans.exception.WebBeansConfigurationException: Passivation capable beans must satisfy passivation capable dependencies. Bean : A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named] does not satisfy. Details about the Injection-point: Field Injection Point, field name :  em, Bean Owner : [A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named]]
> 	at org.apache.webbeans.component.AbstractOwbBean.validatePassivationDependencies(AbstractOwbBean.java:695)
> 	at org.apache.webbeans.component.AbstractInjectionTargetBean.validatePassivationDependencies(AbstractInjectionTargetBean.java:595)
> 	at org.apache.openejb.cdi.BeansDeployer.checkPassivationScope(BeansDeployer.java:414)
> 	at org.apache.openejb.cdi.BeansDeployer.validate(BeansDeployer.java:260)
> 	at org.apache.openejb.cdi.BeansDeployer.validateInjectionPoints(BeansDeployer.java:222)
> 	at org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:280)
> 	... 49 more
> ---------------------------------
> I think this is CDI specification violation - page 3 of CDI specification contains following example:
> @SessionScoped @Model
> public class Login implements Serializable {
>     @Inject Credentials credentials;
>     @Inject @Users EntityManager userDatabase;
> ...

--
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: http://www.atlassian.com/software/jira

[jira] [Commented] (TOMEE-508) EntityManager dependency considered not passivation capable (CDI spec violation)

Posted by "Mark Struberg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TOMEE-508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13485910#comment-13485910 ] 

Mark Struberg commented on TOMEE-508:
-------------------------------------

The spec is not saying anything about serializability of injected EMs.

"3.6. Additional built-in beans" defines 
* javax.transaction.UserTransaction,
* javax.security.Principal,
* javax.validation.ValidationFactory,
* javax.validation.Validator,
"These beans are passivation capable dependencies, as defined in Section 6.6.2, “Passivation capable dependencies”."

Since this paragraph doesn't mention anything about EntityManager or EntityManagerFactory it is not guaranteed to be serializable.
The reason why this might work in GF is that EclipseLink might provide a Serializable EntityManager (which is btw a lie).

Btw, there is NO EntityManager on the planet which is guaranteed to be Serializable. Thats just bollocks. EM-per-session is just a broken pattern all the way! What is your use case? Imo the EM samples we have in the CDI spec are just misleading as managed-EM injection in to CDI beans is not really well defined. Who manages the transaction for such an EM? As long as we dont have @Transactional outside of EJB you will not be able to manage it yourself. 
                
> EntityManager dependency considered not passivation capable (CDI spec violation)
> --------------------------------------------------------------------------------
>
>                 Key: TOMEE-508
>                 URL: https://issues.apache.org/jira/browse/TOMEE-508
>             Project: TomEE
>          Issue Type: Bug
>    Affects Versions: 1.5.0, 1.5.1
>         Environment: Windows 7 x64; jdk1.7.0_09 32 bit; apache-tomee-1.5.1-20121026.064316-51-webprofile.zip
>            Reporter: Donatas Ciuksys
>            Priority: Blocker
>
> 1. Create class EntityManagerProducer:
> @SessionScoped
> @Stateful
> public class EntityManagerProducer implements Serializable {
>     
>     @PersistenceContext(type=PersistenceContextType.EXTENDED)
>     private EntityManager em;
>     
>     @Produces
>     public EntityManager getEntityManager() {
>         return em;
>     }
> }
> 2. Create injection client:
> @Named
> @SessionScoped
> @Stateful
> public class A implements Serializable  {
>     
>     @Inject
>     private EntityManager em;
>     public String getDelegateClassName() {
>         return em.getDelegate().getClass().getCanonicalName();
>     }
>     
> }
> 3. Create JSF page and try to call getDelegateClassName():
>     <h:body>
>         EntityManager is open: #{a.delegateClassName}
>     </h:body>
> 4. Try to deploy the application to tomee - observe error message:
> Caused by: org.apache.openejb.OpenEJBRuntimeException: org.apache.webbeans.exception.WebBeansConfigurationException: Passivation capable beans must satisfy passivation capable dependencies. Bean : A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named] does not satisfy. Details about the Injection-point: Field Injection Point, field name :  em, Bean Owner : [A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named]]
> 	at org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:323)
> 	at org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:150)
> 	... 48 more
> Caused by: org.apache.webbeans.exception.WebBeansConfigurationException: Passivation capable beans must satisfy passivation capable dependencies. Bean : A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named] does not satisfy. Details about the Injection-point: Field Injection Point, field name :  em, Bean Owner : [A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named]]
> 	at org.apache.webbeans.component.AbstractOwbBean.validatePassivationDependencies(AbstractOwbBean.java:695)
> 	at org.apache.webbeans.component.AbstractInjectionTargetBean.validatePassivationDependencies(AbstractInjectionTargetBean.java:595)
> 	at org.apache.openejb.cdi.BeansDeployer.checkPassivationScope(BeansDeployer.java:414)
> 	at org.apache.openejb.cdi.BeansDeployer.validate(BeansDeployer.java:260)
> 	at org.apache.openejb.cdi.BeansDeployer.validateInjectionPoints(BeansDeployer.java:222)
> 	at org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:280)
> 	... 49 more
> ---------------------------------
> I think this is CDI specification violation - page 3 of CDI specification contains following example:
> @SessionScoped @Model
> public class Login implements Serializable {
>     @Inject Credentials credentials;
>     @Inject @Users EntityManager userDatabase;
> ...

--
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: http://www.atlassian.com/software/jira

[jira] [Commented] (TOMEE-508) EntityManager dependency considered not passivation capable (CDI spec violation)

Posted by "Donatas Ciuksys (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TOMEE-508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13485889#comment-13485889 ] 

Donatas Ciuksys commented on TOMEE-508:
---------------------------------------

By the way, the example above works OK in Glassfish 3.x with both EXTENDED and TRANSACTIONAL types of PersistenceContext.
                
> EntityManager dependency considered not passivation capable (CDI spec violation)
> --------------------------------------------------------------------------------
>
>                 Key: TOMEE-508
>                 URL: https://issues.apache.org/jira/browse/TOMEE-508
>             Project: TomEE
>          Issue Type: Bug
>    Affects Versions: 1.5.0, 1.5.1
>         Environment: Windows 7 x64; jdk1.7.0_09 32 bit; apache-tomee-1.5.1-20121026.064316-51-webprofile.zip
>            Reporter: Donatas Ciuksys
>            Priority: Blocker
>
> 1. Create class EntityManagerProducer:
> @SessionScoped
> @Stateful
> public class EntityManagerProducer implements Serializable {
>     
>     @PersistenceContext(type=PersistenceContextType.EXTENDED)
>     private EntityManager em;
>     
>     @Produces
>     public EntityManager getEntityManager() {
>         return em;
>     }
> }
> 2. Create injection client:
> @Named
> @SessionScoped
> @Stateful
> public class A implements Serializable  {
>     
>     @Inject
>     private EntityManager em;
>     public String getDelegateClassName() {
>         return em.getDelegate().getClass().getCanonicalName();
>     }
>     
> }
> 3. Create JSF page and try to call getDelegateClassName():
>     <h:body>
>         EntityManager is open: #{a.delegateClassName}
>     </h:body>
> 4. Try to deploy the application to tomee - observe error message:
> Caused by: org.apache.openejb.OpenEJBRuntimeException: org.apache.webbeans.exception.WebBeansConfigurationException: Passivation capable beans must satisfy passivation capable dependencies. Bean : A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named] does not satisfy. Details about the Injection-point: Field Injection Point, field name :  em, Bean Owner : [A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named]]
> 	at org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:323)
> 	at org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:150)
> 	... 48 more
> Caused by: org.apache.webbeans.exception.WebBeansConfigurationException: Passivation capable beans must satisfy passivation capable dependencies. Bean : A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named] does not satisfy. Details about the Injection-point: Field Injection Point, field name :  em, Bean Owner : [A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named]]
> 	at org.apache.webbeans.component.AbstractOwbBean.validatePassivationDependencies(AbstractOwbBean.java:695)
> 	at org.apache.webbeans.component.AbstractInjectionTargetBean.validatePassivationDependencies(AbstractInjectionTargetBean.java:595)
> 	at org.apache.openejb.cdi.BeansDeployer.checkPassivationScope(BeansDeployer.java:414)
> 	at org.apache.openejb.cdi.BeansDeployer.validate(BeansDeployer.java:260)
> 	at org.apache.openejb.cdi.BeansDeployer.validateInjectionPoints(BeansDeployer.java:222)
> 	at org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:280)
> 	... 49 more
> ---------------------------------
> I think this is CDI specification violation - page 3 of CDI specification contains following example:
> @SessionScoped @Model
> public class Login implements Serializable {
>     @Inject Credentials credentials;
>     @Inject @Users EntityManager userDatabase;
> ...

--
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: http://www.atlassian.com/software/jira

[jira] [Commented] (TOMEE-508) EntityManager dependency considered not passivation capable (CDI spec violation)

Posted by "Donatas Ciuksys (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TOMEE-508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13486000#comment-13486000 ] 

Donatas Ciuksys commented on TOMEE-508:
---------------------------------------

I'll try to justify (or at least defend) the possibility to use Extended EntityManager outside of its home Stateful EJB: from JPA specification:

-----------------------------------------------
3.3 Persistence Context Lifetime
...
When an extended persistence context is used, the extended persistence context exists from the time the
EntityManager instance is created until it is closed. This persistence context might span multiple transactions
and non-transactional invocations of the EntityManager. A container-managed extended persistence
context is enlisted in the current transaction when *the EntityManager is invoked in the scope of
that transaction* or when the stateful session bean to which the extended persistence context is bound is
invoked in the scope of that transaction.
-----------------------------------------------

The first clause in the last sentence presumes the case when EntityManager was accessed somehow without accessing Stateful bean itself.
And yes, of course, as all powerfull things, this might easily be abused and give unintented & wrong results (if used unwisely).

Having all this in mind, and provided with powerful CDI scoped injection facility, one would really dare to inject extended EM :) I just guess that when this doesn't work out, one assumes her/his poor understanding of CDI/EJB and tries alternative ways (simpler, but requiring more programming).
                
> EntityManager dependency considered not passivation capable (CDI spec violation)
> --------------------------------------------------------------------------------
>
>                 Key: TOMEE-508
>                 URL: https://issues.apache.org/jira/browse/TOMEE-508
>             Project: TomEE
>          Issue Type: Bug
>    Affects Versions: 1.5.0, 1.5.1
>         Environment: Windows 7 x64; jdk1.7.0_09 32 bit; apache-tomee-1.5.1-20121026.064316-51-webprofile.zip
>            Reporter: Donatas Ciuksys
>            Priority: Blocker
>
> 1. Create class EntityManagerProducer:
> @SessionScoped
> @Stateful
> public class EntityManagerProducer implements Serializable {
>     
>     @PersistenceContext(type=PersistenceContextType.EXTENDED)
>     private EntityManager em;
>     
>     @Produces
>     public EntityManager getEntityManager() {
>         return em;
>     }
> }
> 2. Create injection client:
> @Named
> @SessionScoped
> @Stateful
> public class A implements Serializable  {
>     
>     @Inject
>     private EntityManager em;
>     public String getDelegateClassName() {
>         return em.getDelegate().getClass().getCanonicalName();
>     }
>     
> }
> 3. Create JSF page and try to call getDelegateClassName():
>     <h:body>
>         EntityManager is open: #{a.delegateClassName}
>     </h:body>
> 4. Try to deploy the application to tomee - observe error message:
> Caused by: org.apache.openejb.OpenEJBRuntimeException: org.apache.webbeans.exception.WebBeansConfigurationException: Passivation capable beans must satisfy passivation capable dependencies. Bean : A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named] does not satisfy. Details about the Injection-point: Field Injection Point, field name :  em, Bean Owner : [A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named]]
> 	at org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:323)
> 	at org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:150)
> 	... 48 more
> Caused by: org.apache.webbeans.exception.WebBeansConfigurationException: Passivation capable beans must satisfy passivation capable dependencies. Bean : A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named] does not satisfy. Details about the Injection-point: Field Injection Point, field name :  em, Bean Owner : [A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named]]
> 	at org.apache.webbeans.component.AbstractOwbBean.validatePassivationDependencies(AbstractOwbBean.java:695)
> 	at org.apache.webbeans.component.AbstractInjectionTargetBean.validatePassivationDependencies(AbstractInjectionTargetBean.java:595)
> 	at org.apache.openejb.cdi.BeansDeployer.checkPassivationScope(BeansDeployer.java:414)
> 	at org.apache.openejb.cdi.BeansDeployer.validate(BeansDeployer.java:260)
> 	at org.apache.openejb.cdi.BeansDeployer.validateInjectionPoints(BeansDeployer.java:222)
> 	at org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:280)
> 	... 49 more
> ---------------------------------
> I think this is CDI specification violation - page 3 of CDI specification contains following example:
> @SessionScoped @Model
> public class Login implements Serializable {
>     @Inject Credentials credentials;
>     @Inject @Users EntityManager userDatabase;
> ...

--
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: http://www.atlassian.com/software/jira

[jira] [Commented] (TOMEE-508) EntityManager dependency considered not passivation capable (CDI spec violation)

Posted by "Donatas Ciuksys (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TOMEE-508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13485937#comment-13485937 ] 

Donatas Ciuksys commented on TOMEE-508:
---------------------------------------

Hi Mark,

I spent couple of hours last friday investigating "serializable EntityManager" problem, have read your blog post (https://struberg.wordpress.com/2012/04/25/is-there-a-way-to-fix-the-jpa-entitymanager/) too. I fully understand the issue with session management in cluster environments, yet I think this is a separate issue. Not all clusters need session synchronization, not every system needs clusters. I'd like to focus on single server case (or cluster without high-availability). I'm trying to find correct way how to implement large conversation-type use-cases (wizards etc.). Java EE proposes @ConversationScoped stateful EJBs with EXTENDED PersistenceContext, EntityManager inheritance and propagation. So I'm trying now to check wether my code is actually portable (for now I have checked only Glassfish).

Yes, CDI requires that passivation capable beans would use passivation capable dependencies, and EntityManager dependency is not implied to be passivation capable by default (let's not talk about CDI resource case - I'm actually interested in EXTENDED PersistenceContext, and this one cannot be declared as CDI resource). But plain JPA EntityManager is never returned to Java EE application - it is always wrapped (API has unwrap method too). And:

1. If EntityManager is not serializable, the wrapper could be (and in Glassfish case it is: com.sun.enterprise.container.common.impl.EntityManagerWrapper implements Serializable)
2. OpenJPA bug fix (https://issues.apache.org/jira/browse/OPENJPA-126) claims to have added the serializability support. Similar bug fix could be found for Hibernate too.

Again, I'm not trying here to defend "serializable EntityManager" case, but I strongly believe that if EJB container wraps EntityManager, the wrapper itself could be serializable - this makes programmer life simpler.
                
> EntityManager dependency considered not passivation capable (CDI spec violation)
> --------------------------------------------------------------------------------
>
>                 Key: TOMEE-508
>                 URL: https://issues.apache.org/jira/browse/TOMEE-508
>             Project: TomEE
>          Issue Type: Bug
>    Affects Versions: 1.5.0, 1.5.1
>         Environment: Windows 7 x64; jdk1.7.0_09 32 bit; apache-tomee-1.5.1-20121026.064316-51-webprofile.zip
>            Reporter: Donatas Ciuksys
>            Priority: Blocker
>
> 1. Create class EntityManagerProducer:
> @SessionScoped
> @Stateful
> public class EntityManagerProducer implements Serializable {
>     
>     @PersistenceContext(type=PersistenceContextType.EXTENDED)
>     private EntityManager em;
>     
>     @Produces
>     public EntityManager getEntityManager() {
>         return em;
>     }
> }
> 2. Create injection client:
> @Named
> @SessionScoped
> @Stateful
> public class A implements Serializable  {
>     
>     @Inject
>     private EntityManager em;
>     public String getDelegateClassName() {
>         return em.getDelegate().getClass().getCanonicalName();
>     }
>     
> }
> 3. Create JSF page and try to call getDelegateClassName():
>     <h:body>
>         EntityManager is open: #{a.delegateClassName}
>     </h:body>
> 4. Try to deploy the application to tomee - observe error message:
> Caused by: org.apache.openejb.OpenEJBRuntimeException: org.apache.webbeans.exception.WebBeansConfigurationException: Passivation capable beans must satisfy passivation capable dependencies. Bean : A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named] does not satisfy. Details about the Injection-point: Field Injection Point, field name :  em, Bean Owner : [A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named]]
> 	at org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:323)
> 	at org.apache.openejb.cdi.ThreadSingletonServiceImpl.initialize(ThreadSingletonServiceImpl.java:150)
> 	... 48 more
> Caused by: org.apache.webbeans.exception.WebBeansConfigurationException: Passivation capable beans must satisfy passivation capable dependencies. Bean : A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named] does not satisfy. Details about the Injection-point: Field Injection Point, field name :  em, Bean Owner : [A, Name:a, WebBeans Type:ENTERPRISE, API Types:[java.lang.Object,beans.A], Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default,javax.inject.Named]]
> 	at org.apache.webbeans.component.AbstractOwbBean.validatePassivationDependencies(AbstractOwbBean.java:695)
> 	at org.apache.webbeans.component.AbstractInjectionTargetBean.validatePassivationDependencies(AbstractInjectionTargetBean.java:595)
> 	at org.apache.openejb.cdi.BeansDeployer.checkPassivationScope(BeansDeployer.java:414)
> 	at org.apache.openejb.cdi.BeansDeployer.validate(BeansDeployer.java:260)
> 	at org.apache.openejb.cdi.BeansDeployer.validateInjectionPoints(BeansDeployer.java:222)
> 	at org.apache.openejb.cdi.OpenEJBLifecycle.startApplication(OpenEJBLifecycle.java:280)
> 	... 49 more
> ---------------------------------
> I think this is CDI specification violation - page 3 of CDI specification contains following example:
> @SessionScoped @Model
> public class Login implements Serializable {
>     @Inject Credentials credentials;
>     @Inject @Users EntityManager userDatabase;
> ...

--
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: http://www.atlassian.com/software/jira