0

How to deploy ZK to JBoss 7.0.1

asked 2012-05-23 20:29:29 +0800

andrelins gravatar image andrelins
39

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

delete flag offensive retag edit

5 Replies

Sort by ยป oldest newest

answered 2012-09-03 01:48:48 +0800

samchuang gravatar image samchuang
4084 4

hi

you can put War file to jboss-xxx/standalone/deployments

link publish delete flag offensive edit

answered 2012-09-03 10:38:05 +0800

andrelins gravatar image andrelins
39

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.

link publish delete flag offensive edit

answered 2012-09-04 04:00:50 +0800

samchuang gravatar image samchuang
4084 4

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

link publish delete flag offensive edit

answered 2013-08-09 17:39:41 +0800

echinopsii gravatar image echinopsii
6 1

updated 2013-08-09 17:48:28 +0800

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

link publish delete flag offensive edit

answered 2013-12-14 17:30:09 +0800

nmpallas gravatar image nmpallas
115 4
http://nmpallas.wordpress...

updated 2013-12-14 17:30:54 +0800

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

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2012-05-23 20:29:29 +0800

Seen: 224 times

Last updated: Dec 14 '13

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More