[ 
https://issues.apache.org/jira/browse/OWB-1112?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15145931#comment-15145931
 ] 

Mark Struberg commented on OWB-1112:
------------------------------------

Hi Victor! OWB did behave that way for some time, but sadly we have been forced 
to implement this behaviour to pass the TCK.
We went on and fixed the spec for CDI-1.2:
https://issues.jboss.org/browse/CDI-140
https://issues.jboss.org/browse/CDI-141
https://issues.jboss.org/browse/CDI-153

I suggest you use @RequestScoped for your producer. Anything longer than that 
is broken in clusters anyway.


> CDI Producer method
> -------------------
>
>                 Key: OWB-1112
>                 URL: https://issues.apache.org/jira/browse/OWB-1112
>             Project: OpenWebBeans
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.2.7
>         Environment: Arch Linux kernel 4.3.3, application server TomEE 1.7.3 
> PLUME
>            Reporter: Victor Machado Pasqualino
>            Assignee: Mark Struberg
>             Fix For: 1.6.3
>
>
> I have the producer method 
> @Produces
> @ViewScoped
> @ViewEntityManager
> private EntityManager viewEntityManager() {
>       return new EntityManagerImpl(entityManagerFactory);
> }
> The problem is EntityManager.class is not serializable so a error saying 
> EntityManager.class it's not serializable and @ViewScoped should be 
> serializable. But EntityManagerImpl.class is a serializable class. Weld 
> implementation works fine.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to