Hi all,
The way Jaggery module loading was modified a bit and now you can
add/remove custom modules to a server easily.
At the product root level, there is a directory called "modules". There you
need to create a directory with desired module name and put a module.xml
which describes methods/hostobjects/scripts which are defined by the
module.
Following is a sample directory structure of the modules directory.
modules
├── email
│ └── module.xml
├── oauth
│ ├── module.xml
│ └── scripts
│ └── media_connect.js
└── ws
└── module.xml
At the moment, all jars that has hostobjects/methods need to be put as we
do with other jars and update the module.xml accordingly.
Following is a sample module.xml file. You can also define a
readOnly attribute which can be used to prevent overwriting of
constructor/method by webapps.
<module name="module_name" namespace="ns" expose="true" xmlns="
http://wso2.org/projects/jaggery/module.xml">
<!-- Hostobjects -->
<hostObject readOnly="true">
<className>org.wso2.carbon.hostobjects.xhr.XMLHttpRequest</className>
<name>XMLHttpRequest</name>
</hostObject>
.............
<!-- methods -->
<method readOnly="true">
<className>org.wso2.carbon.jaggery.core.manager.CommonManager</className>
<name>print</name>
</method>
.............
<!-- scripts -->
<script>
<name>media-connect</name>
<path>scripts/media_connect.js</path>
</script>
.............
</module>
--
*Ruchira Wageesha
Senior Software Engineer & Member, Management Committee, Development
Technologies*
*WSO2 Inc. - lean . enterprise . middleware | wso2.com*
*
email: [email protected], blog: ruchirawageesha.blogspot.com, mobile: +94
77 5493444*
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev