-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi,
Anyone deployed ZK to JBoss 7.0.1? I can't find any documentation on how to do that.
JBoss 7 changed the way we do deployments. There's no $JBOSS_HOME/server/default/lib anymore. Now they have the concept of modules and dependencies.
Does anyone know how to do that please?
Thank you,
Andre
Thank you, samchuang, for your reply, but that does not work. That was not really what I asked. I need to know how to deploy the ZK libs to the server so they become visible to all applications installed and how do they fit into JBoss' new concept of modules and dependencies.
ok, I understand now, unfortunately JBOSS change to use the "Module" concept, shared lib need to use it, and I don't know how to use it.
I try to read JBOSS's doc, but I haven't successly setup shared lib.
If someone knows how to use JBOSS Module, please share the knowledge
Hello,
this is a quick and dirty solution working on JBoss EAP 6.1.
1) create ZKOSS module directory and copy ZK into it:
mkdir -p $JBOSS_HOME/modules/system/layers/base/org/zkoss/main
cp zkee-bin-eval-6.5.2/dist/lib/*.jar modules/system/layers/base/org/zkoss/main/
cp zkee-bin-eval-6.5.2/dist/lib/*/*.jar modules/system/layers/base/org/zkoss/main/
touch $JBOSS_HOME/modules/system/layers/base/org/zkoss/main/module.xml
2) edit the ZKOSS module.xml file
<module xmlns="urn:jboss:module:1.1" name="org.zkoss">
<resources>
<!-- ZK EE LIBS -->
<resource-root path="zcommon.jar"/>
<resource-root path="zel.jar"/>
<resource-root path="zhtml.jar"/>
<resource-root path="zkbind.jar"/>
<resource-root path="zkex.jar"/>
<resource-root path="zk.jar"/>
<resource-root path="zkmax.jar"/>
<resource-root path="zkplus.jar"/>
<resource-root path="zml.jar"/>
<resource-root path="zul.jar"/>
<resource-root path="zweb.jar"/>
<!-- ZK EXT LIBS - DIRTY PART : SHOULD DEFINE DISTINC MODULES AND DECLARE DEPENDENCIES -->
<resource-root path="bsh.jar"/>
<resource-root path="commons-collections.jar"/>
<resource-root path="commons-fileupload.jar"/>
<resource-root path="commons-io.jar"/>
<resource-root path="commons-logging.jar"/>
<resource-root path="Filters.jar"/>
<resource-root path="itext.jar"/>
<resource-root path="jasperreports.jar"/>
<resource-root path="jcommon.jar"/>
<resource-root path="jfreechart.jar"/>
<resource-root path="jxl.jar"/>
<resource-root path="poi.jar"/>
<!-- ZK FORGE LIBS -->
<resource-root path="flashchart.jar"/>
<resource-root path="gmapsz.jar"/>
<resource-root path="timelinez.jar"/>
<resource-root path="timeplotz.jar"/>
<resource-root path="zuljsp.jar"/>
<!-- ZK THEMES LIBS -->
<resource-root path="sapphire.jar"/>
<resource-root path="silvertail.jar"/>
</resources>
<dependencies>
</dependencies></module>
3) edit the jboss standalone.conf conf to add ZK module into the JBoss OSGI layer
<subsystem xmlns="urn:jboss:domain:osgi:1.2" activation="eager">
<properties>
<property name="org.osgi.framework.startlevel.beginning">
10
</property>
</properties>
<capabilities>
<capability name="sun.jdk"/>
<capability name="javax.jws.api"/>
<capability name="javax.persistence.api"/>
<capability name="javax.servlet.api"/>
<capability name="javax.transaction.api"/>
<capability name="javax.ws.rs.api"/>
............
<capability name="org.zkoss" startlevel="1"/>
............
4) start JBOSS and check org.zkoss is well loaded as an OSGI bundle
The part with the OSGi is true, but if you don't want to use OSGi, the only thing you need to do is to reference the module as deployed in the META-INF/MANIFEST.MF file or in the jboss-deployment-structure.xml file of your project to refer as dependecy of your deployment the zk module and you are there. The way jboss 7 loads deps has changed dramatically. The are no longer Hierarchical class loaders.
regards \n\m
Asked: 2012-05-23 20:29:29 +0800
Seen: 224 times
Last updated: Dec 14 '13