-
New Feature
-
Resolution: Done
-
Normal
-
None
-
Security Level: Jimmy
-
None
-
e.g.
glassfish 4.1.1
wildfly 9
-
ZK 8.0.2 S2
Concept
assume the following application containing 2 modules:
myapp.ear
+ejb-module (contains a Person class)
+war-module (ZK webapp using form proxy around the Person class)
since modern JEE containers use modular classloaders the classloader of the ejb module is not aware of the classes in the war file.
This currently leads to class loading Exceptions (see ZK-2932).
E.g. the FormProxyObject interface is not visible when creating a zk form proxy around the Person object.
This can be solved by placing the required Interfaces/Annotations into a shared classpath (visible for both modules ear and war)
Also the javaassist.jar needs to be placed into a shared lib folder.
The zkbind.jar which contains the required interfaces can be split in a way that only Interfaces/Annotations are actually shared, and the implementation classes remain in the war file.
I attached an initial working example which consists of
- the split zkbind-api.jar / zkbind-impl.jar (so far manually split there might be other interfaces that need to be added to the api jar)
- a maven project example generating an ear file that can be deployed into a wildfly/glassfish
To test the jars can be placed into the local .m2 folder
/repository/org/zkoss/zk/zkbind-api/8.0.1.1
/repository/org/zkoss/zk/zkbind-impl/8.0.1.1
and the ear can be built using
mvn clean package
resulting ear in:
/zkform-ear/target/zkform.ear
GOAL (the above is just a concept to illustrate the problem and provide first idea how this could be addressed)
It has to be decided if splitting the jar file is the best option to do this, or if there is a better approach to allow modular class loading.
- relates to
-
ZK-2932 zk form attribute don't works with wildfly/jboss
- Closed
-
ZK-4554 classloading issues with multiple war files (using shared zkbind-api.jar)
- Closed
-
ZK-3149 FormBinding on Hibernate Entity causes: RTE: "duplicate method: setHandler"
- Closed
-
ZK-4555 remove zkbind-api -> zul dependency
- Closed