[jira] [Updated] (DELTASPIKE-1034) DefaultEntityManagerHolder is not Serializeable
[ https://issues.apache.org/jira/browse/DELTASPIKE-1034?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gerhard Petracek updated DELTASPIKE-1034: - Priority: Minor (was: Major) > DefaultEntityManagerHolder is not Serializeable > --- > > Key: DELTASPIKE-1034 > URL: https://issues.apache.org/jira/browse/DELTASPIKE-1034 > Project: DeltaSpike > Issue Type: Bug > Components: JPA-Module >Affects Versions: 1.5.0 >Reporter: Reinhard Sandtner >Priority: Minor > > we have a {{@Dependent}} Service with {{@Transactional}} methods and use it > in a vaadin component. > vaadin stores everything in the session. so it tries to serialize the > {{DefaultEntityManagerHolder}} and serialization is not working because > neither {{DefaultEntityManagerHolder}} nor {{ActiveEntityManagerHolder}} is > Serialzeable. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Created] (DELTASPIKE-1034) DefaultEntityManagerHolder is not Serializeable
Reinhard Sandtner created DELTASPIKE-1034: - Summary: DefaultEntityManagerHolder is not Serializeable Key: DELTASPIKE-1034 URL: https://issues.apache.org/jira/browse/DELTASPIKE-1034 Project: DeltaSpike Issue Type: Bug Components: JPA-Module Affects Versions: 1.5.0 Reporter: Reinhard Sandtner Priority: Critical we have a {{@Dependent}} Service with {{@Transactional}} methods and use it in a vaadin component. vaadin stores everything in the session. so it tries to serialize the {{DefaultEntityManagerHolder}} and serialization is not working because neither {{DefaultEntityManagerHolder}} nor {{ActiveEntityManagerHolder}} is Serialzeable. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (DELTASPIKE-1034) DefaultEntityManagerHolder is not Serializeable
[ https://issues.apache.org/jira/browse/DELTASPIKE-1034?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15029872#comment-15029872 ] Gerhard Petracek commented on DELTASPIKE-1034: -- changed to minor, because it's possible to provide an alternative implementation. > DefaultEntityManagerHolder is not Serializeable > --- > > Key: DELTASPIKE-1034 > URL: https://issues.apache.org/jira/browse/DELTASPIKE-1034 > Project: DeltaSpike > Issue Type: Bug > Components: JPA-Module >Affects Versions: 1.5.0 >Reporter: Reinhard Sandtner >Priority: Minor > > we have a {{@Dependent}} Service with {{@Transactional}} methods and use it > in a vaadin component. > vaadin stores everything in the session. so it tries to serialize the > {{DefaultEntityManagerHolder}} and serialization is not working because > neither {{DefaultEntityManagerHolder}} nor {{ActiveEntityManagerHolder}} is > Serialzeable. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Resolved] (DELTASPIKE-1034) DefaultEntityManagerHolder is not Serializeable
[ https://issues.apache.org/jira/browse/DELTASPIKE-1034?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Gerhard Petracek resolved DELTASPIKE-1034. -- Resolution: Fixed > DefaultEntityManagerHolder is not Serializeable > --- > > Key: DELTASPIKE-1034 > URL: https://issues.apache.org/jira/browse/DELTASPIKE-1034 > Project: DeltaSpike > Issue Type: Bug > Components: JPA-Module >Affects Versions: 1.5.0 >Reporter: Reinhard Sandtner >Priority: Minor > Fix For: 1.5.2 > > > we have a {{@Dependent}} Service with {{@Transactional}} methods and use it > in a vaadin component. > vaadin stores everything in the session. so it tries to serialize the > {{DefaultEntityManagerHolder}} and serialization is not working because > neither {{DefaultEntityManagerHolder}} nor {{ActiveEntityManagerHolder}} is > Serialzeable. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
Re: deltaspike git commit: DELTASPIKE-1034 ActiveEntityManagerHolder needs to be Serializable
hi john, that just means an implementation needs to rely on it or needs additional concepts to handle it differently. DefaultEntityManagerHolder doesn't store it at all and the only useful implementation needed by the data-module stores it as a thread-local (see ThreadLocalEntityManagerHolder). regards, gerhard 2015-11-27 14:47 GMT+01:00 John D. Ament: > This requires entity manager to be serializable... Won't work. > On Nov 27, 2015 08:46, wrote: > > > Repository: deltaspike > > Updated Branches: > > refs/heads/master 7681a6d4d -> 74c0e3f84 > > > > > > DELTASPIKE-1034 ActiveEntityManagerHolder needs to be Serializable > > > > > > Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo > > Commit: > http://git-wip-us.apache.org/repos/asf/deltaspike/commit/74c0e3f8 > > Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/74c0e3f8 > > Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/74c0e3f8 > > > > Branch: refs/heads/master > > Commit: 74c0e3f8483e826398cc5f3491156db96b2f3b96 > > Parents: 7681a6d > > Author: gpetracek > > Authored: Fri Nov 27 14:41:03 2015 +0100 > > Committer: gpetracek > > Committed: Fri Nov 27 14:45:24 2015 +0100 > > > > -- > > .../jpa/spi/entitymanager/ActiveEntityManagerHolder.java| 5 > ++--- > > 1 file changed, 2 insertions(+), 3 deletions(-) > > -- > > > > > > > > > http://git-wip-us.apache.org/repos/asf/deltaspike/blob/74c0e3f8/deltaspike/modules/jpa/api/src/main/java/org/apache/deltaspike/jpa/spi/entitymanager/ActiveEntityManagerHolder.java > > -- > > diff --git > > > a/deltaspike/modules/jpa/api/src/main/java/org/apache/deltaspike/jpa/spi/entitymanager/ActiveEntityManagerHolder.java > > > b/deltaspike/modules/jpa/api/src/main/java/org/apache/deltaspike/jpa/spi/entitymanager/ActiveEntityManagerHolder.java > > index 19ee6a6..2d34582 100644 > > --- > > > a/deltaspike/modules/jpa/api/src/main/java/org/apache/deltaspike/jpa/spi/entitymanager/ActiveEntityManagerHolder.java > > +++ > > > b/deltaspike/modules/jpa/api/src/main/java/org/apache/deltaspike/jpa/spi/entitymanager/ActiveEntityManagerHolder.java > > @@ -19,15 +19,15 @@ > > package org.apache.deltaspike.jpa.spi.entitymanager; > > > > import javax.persistence.EntityManager; > > +import java.io.Serializable; > > > > /** > > * Optional holder which allows to customize the handling of the {@link > > EntityManager}. > > * Multiple Entity-Managers with different qualifiers aren't supported. > > * See the data-module for further details. > > */ > > -public interface ActiveEntityManagerHolder > > +public interface ActiveEntityManagerHolder extends Serializable > > { > > - > > void set(EntityManager entityManager); > > > > boolean isSet(); > > @@ -35,5 +35,4 @@ public interface ActiveEntityManagerHolder > > EntityManager get(); > > > > void dispose(); > > - > > } > > > > >