Java class dynamically and make it accessible over the network by various jvms, i.e. serializable

I have a requirement to create dynamic java classes and make various jvms available on the network. I tried using the reflection tool and javassist, but nothing worked. Let me explain the scenario we are using Coherence distributed cache. It has the ability to perform aggregation / filtering in parallel across the cluster. For example, if a class has a [dynamic class], has a sum variable, and getAmount / setAmount methods. Then, if we execute the COHERENCE queries, it will start the process in parallel across the cluster.

I tried to create classes at runtime using javassist and reflection. I can access it from one JVM, but when I tried to access the same class from another jvm [through a consistency cluster]. I get an exception from a class that was not found [because the remote jvm has no idea about this class]. I can do this by creating the same class dynamically on the remote jvm and gain access to the methods. But consistency in the constructed methods / functions cannot be found by the class. can someone help me in this matter

+3
source share
2 answers

, javassist, ClassLoader. , JVM.

0

. , - node classpath/classloader JVM. , , , JVM . , JVM , .

0

Source: https://habr.com/ru/post/1742906/


All Articles