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

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

[~kmpraveen10] with deserialization you need to use the "current" classloader 
in several situtations. I didn't dig but by default the JVM uses the caller 
classloader which is the container one if hazelcast is in the container. This 
needs to extends few JVM classes instead of using them directly to fix it. This 
is typically what does 
https://github.com/hazelcast/hazelcast/blob/953512928855638a2ea3f0e2a6afcf45008d7e37/hazelcast/src/main/java/com/hazelcast/nio/IOUtil.java#L119
 but this implementation is not enough since it misses interfaces typically ( 
protected Class resolveProxyClass(final String[] interfaces) ) and primitives 
so can be a side effect of that. Typically ensure to create the config with the 
classloader you want and not the default one which can be the container one 
depending how the setup is done 
(https://github.com/hazelcast/hazelcast/blob/67cabaeb2762faea92a9ff81e2e6649aa46ea007/hazelcast-client/src/main/java/com/hazelcast/client/config/XmlClientConfigBuilder.java#L163)

> Hazelcast integration in TomEE
> ------------------------------
>
>                 Key: TOMEE-1723
>                 URL: https://issues.apache.org/jira/browse/TOMEE-1723
>             Project: TomEE
>          Issue Type: Bug
>          Components: TomEE Core Server
>    Affects Versions: 1.7.2
>         Environment: J2EE application deployed in TomEE, using Hazelcast 
> distributed executor APIs
>            Reporter: Praveen 
>             Fix For: 1.7.3
>
>
> Tomee has Hazelcast jar in it's library. I am using TomEE1.7.2 which has  
> Hazelcast 3.5 version. The application is deployed in multiple tomee 
> instances and Hazelcast cluster has formed successfully. However when i tried 
> distributed executor to execute the task on other JVM, the task executed 
> successfully on other JVM but the control is not coming back to the source 
> JVM. Finally the Future task timeouts and returns null. Other Hazelcast 
> features (distributed map, cluster formation etc.) are working fine except 
> distributed executor. I have used same version of Hazelcast in pom.xml with 
> scope provided. 
> Surprising behavior is - deleting the Hazelcast jar from Tomee library and 
> including explicit dependency on Hazelcast jar of same version (3.5) in the 
> application is working fine. Not able to comprehend this behavior.
> Using latest versions of Hazelcast (3.6.1) in TomEE also didn't solve the 
> issue. 
> Looks like an integration issue of TomEE with Hazelcast.
>  Please investigate and let us know the solution and root cause.



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

Reply via email to