[Clustering/JBoss] - Re: ConcurrentModificationException during session serializa
by nbelaevski
"smarlow(a)redhat.com" wrote : What I mean, is should SessionBasedClusteredSession.writeExternal + SessionBasedClusteredSession.readExternal instead synchronize on getSession(), which should be the same StandardSessionFacade as RichFaces is synchronizing on.
|
| I haven't recreated the bug yet. I could either recreate it or you could try the following SessionBasedClusteredSession change (two line change to synchronize on common session facade) :
|
| public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
| | {
| | synchronized (getSession()) // change 1 of 2
| | {
| | // Let superclass read in everything but the attribute map
| | super.readExternal(in);
| |
| | attributes = (Map) in.readObject();
| | }
| | }
| |
| | public void writeExternal(ObjectOutput out) throws IOException
| | {
| | synchronized (getSession) // change 2 of 2
| | {
| | // Let superclass write out everything but the attribute map
| | super.writeExternal(out);
| |
| | // Don't replicate any excluded attributes
| | Map excluded = removeExcludedAttributes(attributes);
| |
| | out.writeObject(attributes);
| |
| | // Restore any excluded attributes
| | if (excluded != null)
| | attributes.putAll(excluded);
| | }
| |
| | }
| |
|
Yes, if synchronization will occur on StandardSessionFacade visible to the application/framework developers, than it should work ok. I haven't built JBoss AS before, so not sure whether I'll be able to make these changes and test; in any case, I'll try that and report.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4239820#4239820
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4239820
16 years, 10 months
[EJB 3.0] - Re: SessionContext not injected when using scoped class load
by rubenvdg
I checked the list of included classes in the ear.
rvdginste@odalix:/tmp/test$ for i in `ls *.jar` ; do echo $i ; jar tf $i | grep 'javax.annotation' ; jar tf $i | grep 'javax.ejb' ; done
| xxxxx-ejbs-dev-SNAPSHOT.jar
| Toryt-annotations-I-2.0.jar
| antlr-2.7.6.jar
| aopalliance-1.0.jar
| asm-1.5.3.jar
| asm-attrs-1.5.3.jar
| cglib-2.1_3.jar
| commons-beanutils-1.7.0.jar
| commons-beanutils-core-1.7.0.jar
| commons-collections-3.2.jar
| commons-lang-2.0.jar
| commons-logging-1.1.1.jar
| dom4j-1.6.1.jar
| dwr-2.0.3.jar
| ehcache-1.2.3.jar
| ezmorph-1.0.4.jar
| hibernate-3.2.6.ga.jar
| hibernate-annotations-3.3.1.GA.jar
| hibernate-commons-annotations-3.0.0.ga.jar
| hibernate-entitymanager-3.3.2.GA.jar
| hibernate-search-3.0.0.GA.jar
| hibernate-validator-3.0.0.ga.jar
| javassist-3.4.GA.jar
| json-lib-2.2.2-jdk15.jar
| jsr250-api-1.0.jar
| javax/annotation/
| javax/annotation/security/
| javax/annotation/Generated.class
| javax/annotation/PostConstruct.class
| javax/annotation/PreDestroy.class
| javax/annotation/Resource$AuthenticationType.class
| javax/annotation/Resource.class
| javax/annotation/Resources.class
| javax/annotation/security/DeclareRoles.class
| javax/annotation/security/DenyAll.class
| javax/annotation/security/PermitAll.class
| javax/annotation/security/RolesAllowed.class
| javax/annotation/security/RunAs.class
| log4j-1.2.14.jar
| lucene-core-2.2.0.jar
| ppwcode-metainfo-I-2.1.jar
| ppwcode-util-exception-III-1.0.jar
| ppwcode-util-reflection-I-1.0.jar
| ppwcode-util-serialization-I-1.0.jar
| ppwcode-value-III-dev-SNAPSHOT.jar
| ppwcode-vernacular-exception-III-2.0-SNAPSHOT.jar
| ppwcode-vernacular-l10n-III-1.1-SNAPSHOT.jar
| ppwcode-vernacular-persistence-III-1.0.0-SNAPSHOT.jar
| ppwcode-vernacular-resourcebundle-II-1.4.jar
| ppwcode-vernacular-semantics-VI-2.0-SNAPSHOT.jar
| ppwcode-vernacular-value-III-2.1-SNAPSHOT.jar
| slf4j-api-1.5.6.jar
| slf4j-log4j12-1.5.6.jar
| spring-beans-2.5.jar
| spring-context-2.5.jar
| spring-core-2.5.6.jar
| spring-jdbc-2.5.jar
| spring-test-2.5.6.jar
| spring-tx-2.5.jar
|
As you can see, the @Resource annotation is included in the ear, and taking into account the "isolated=true" setting, this explains why the session context wasn't injected.
Thanks a bunch!
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4239811#4239811
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4239811
16 years, 10 months