Author: keith
Date: Sun Jul 20 07:32:42 2008
New Revision: 19670
URL: http://wso2.org/svn/browse/wso2?view=rev&revision=19670

Log:
Adding documentation on service Lefecycle support


Added:
   trunk/mashup/java/xdocs/servicelifycycle.html
Modified:
   trunk/mashup/java/xdocs/annotations.html
   trunk/mashup/java/xdocs/toc.html

Modified: trunk/mashup/java/xdocs/annotations.html
URL: 
http://wso2.org/svn/browse/wso2/trunk/mashup/java/xdocs/annotations.html?rev=19670&r1=19669&r2=19670&view=diff
==============================================================================
--- trunk/mashup/java/xdocs/annotations.html    (original)
+++ trunk/mashup/java/xdocs/annotations.html    Sun Jul 20 07:32:42 2008
@@ -1,4 +1,5 @@
-<!--
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><!--
   ~ Copyright 2005-2008 WSO2, Inc. (http://wso2.com)
   ~
   ~ Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,19 +14,14 @@
   ~ See the License for the specific language governing permissions and
   ~ limitations under the License.
   -->
-<html>
-<head>
 
   <meta http-equiv="content-type" content="">
-  <title>JavaScript Web Service Annotations</title>
+  
 
 
-  <link href="css/mashup-docs.css" rel="stylesheet" type="text/css" 
media="all">
+  <title>JavaScript Web Service Annotations</title><link 
href="css/mashup-docs.css" rel="stylesheet" type="text/css" media="all"></head>
 
-</head>
-
-
-    <body>
+<body>
 <div id="main-content">
 <h1>JavaScript Web Service Annotations</h1>
 
@@ -41,7 +37,7 @@
   <li><a href="#inputTypes">inputTypes and
 outputType Annotations</a></li>
 
-  <li><a href="#httpMethod">httpMethod and httpLocation Annotations</a></li>
+  <li><a href="#httpMethod">httpMethod and httpLocation 
Annotations</a></li><li><a href="#lifecycle">init and destroy 
Annotations</a></li>
 
 
   <li><a href="#Other">Other Annotations</a></li>
@@ -132,6 +128,11 @@
 Please refer documentation on <a href="restyservices.html">Writing
 RESTy Services</a>&nbsp;for details.<br>
 
+<br><h2 id="httpMethod"><a name="lifecycle"></a>init and destroy 
Annotations</h2>
+
+<br>
+
+Please refer documentation on <a href="servicelifycycle.html">Service 
Lifecycle Support</a> for details.<br>
 <br>
 
 <h2 id="Other">Other Annotations</h2>
@@ -172,9 +173,8 @@
 
 </ul>
 
-<p>� WSO2 Inc.</p>
+<p>� 2007-2008 WSO2 Inc.</p>
 
 </div>
 
-</body>
-</html>
+</body></html>
\ No newline at end of file

Added: trunk/mashup/java/xdocs/servicelifycycle.html
URL: 
http://wso2.org/svn/browse/wso2/trunk/mashup/java/xdocs/servicelifycycle.html?pathrev=19670
==============================================================================
--- (empty file)
+++ trunk/mashup/java/xdocs/servicelifycycle.html       Sun Jul 20 07:32:42 2008
@@ -0,0 +1,114 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html xmlns="http://www.w3.org/1999/xhtml";><head>
+<!--
+~ Copyright 2005-2008 WSO2, Inc. (http://wso2.com)
+~
+~ Licensed under the Apache License, Version 2.0 (the "License");
+~ you may not use this file except in compliance with the License.
+~ You may obtain a copy of the License at
+~
+~ http://www.apache.org/licenses/LICENSE-2.0
+~
+~ Unless required by applicable law or agreed to in writing, software
+~ distributed under the License is distributed on an "AS IS" BASIS,
+~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+~ See the License for the specific language governing permissions and
+~ limitations under the License.
+-->
+<meta http-equiv="content-type" content=""><title>Service Lifecycle 
Support</title>
+
+<link href="css/mashup-docs.css" rel="stylesheet" type="text/css" media="all">
+</head>
+
+<body lang="EN-US">
+<div id="main-content">
+<h1>Service Lifecycle Support</h1>
+<p>Service Lifecycle is a way to manage life cycle of a
+particular mashup
+you deploy in the WSO2 Mashup Server. For example, let's say a user
+wants a mashup to start execution as soon as a mashup gets deployed.
+Such situations may be a good example for the usage of
+service life cycle.The Service Lifecycle support in the WSO2 Mashup
+Server is powered by the "init" and "destroy" service level
+annotations. The function referred to by the "init" annotation will be
+executed when the particullar mashup is been deployed while
+the&nbsp;function referred to by the "destroy" annotation will be
+executed when the particullar mashup is been undeployed. You can have a
+look
+at
+the feedCache mashup that ships as a sample with the WSO2 Mashup Server
+for
+an illustration of the usage of these annotations.</p>
+<br>
+<h2 id="httpMethod">Using the init or
+destroy&nbsp;annotation</h2>
+<br>
+The "init" or "destroy" function can be specified in three different
+ways. They are as follows<br>
+<br>
+<ol>
+<li>Uisng this annotation in the following manner will make the
+function you reference reusable within your mashup. Using it in this
+manner will also make the referenced init function appear in the WSDL.
+For example if you deploy the following mashup, the corresponding WSDL
+will have a operation called myInitFunction.&nbsp; </li>
+<p style="margin-left: 40px;" class="code">//
+Because the function referenced by init is not a annonymous fucntion it
+can be reused in a mashup<br>
+this.init=myInitFunction;<br>
+function myInitFunction()
+{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+&nbsp;<br>
+&nbsp;&nbsp;&nbsp; // Do some stuff upon deployment<br>
+&nbsp;&nbsp;&nbsp; system.log("init");<br>
+}</p>
+<li>Uisng this annotation in the following manner will mean
+that you cannot reuse the function&nbsp;referenced by the
+annotation.
+Still using&nbsp;it in this manner will&nbsp;make the
+referenced init function
+appear in the WSDL. For example if you deploy the following mashup, the
+corresponding WSDL will have a operation
+calledmyInitFunction.&nbsp;
+</li>
+<p style="margin-left: 40px;" class="code">//The
+function referenced by init&nbsp;cannot be reused in your mashup<br>
+this.init = function myInitFunction()
+{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+<br>
+&nbsp;&nbsp;&nbsp; // Do some stuff upon deployment<br>
+&nbsp;&nbsp;&nbsp; system.log("init");<br>
+}</p>
+<li>Uisng this annotation in the following manner will mean
+that you cannot reuse the function&nbsp;referenced by the
+annotation. Furthermore the referenced init function
+will not appear in the WSDL.&nbsp; </li>
+<p style="margin-left: 40px;" class="code">//The
+function referenced by init&nbsp;cannot be reused in your mashup<br>
+this.init = function&nbsp;()
+{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+<br>
+&nbsp;&nbsp;&nbsp; // Do some stuff upon deployment<br>
+&nbsp;&nbsp;&nbsp; system.log("init");<br>
+}</p>
+<br>
+<h2 id="inputTypes">init annotation</h2>
+<br>
+The init annotation helps you specify the function that should be
+executed when a mashup is deployed. <span style="font-weight: bold;">Please
+note that using the session host object from within a init function
+will not preserve your session</span>. The reason is that the
+init function is called within the Masup Server and sessions are
+created when request enter the Mashup Server.<br>
+<br>
+<h2 id="inputTypes">destroy annotation</h2>
+<br>
+The destroy annotation helps you specify the function that should be
+executed when a mashup is undeployed. <span style="font-weight: bold;">Please 
note that using the
+session host object from within a destroy function will not give you
+the services&nbsp;session</span>.
+The reason is that the destroy function is called within the Masup
+Server
+and sessions are created when request enter the Mashup Server.</ol></div>
+<p>� 2007-2008 WSO2 Inc.</p>
+</body></html>
\ No newline at end of file

Modified: trunk/mashup/java/xdocs/toc.html
URL: 
http://wso2.org/svn/browse/wso2/trunk/mashup/java/xdocs/toc.html?rev=19670&r1=19669&r2=19670&view=diff
==============================================================================
--- trunk/mashup/java/xdocs/toc.html    (original)
+++ trunk/mashup/java/xdocs/toc.html    Sun Jul 20 07:32:42 2008
@@ -44,7 +44,7 @@
 <li><a href="dataBinding.html" target="mainFrame">Javascript
 Data Binding</a></li>
 <li><a href="restyservices.html" target="mainFrame">Writing
-RESTful services</a></li>
+RESTful services</a></li><li><a href="servicelifycycle.html" 
target="mainFrame">Service Lifecycle Support</a></li>
 <li><a href="e4xquickstart.html" target="mainFrame">E4X
 Quick Start Guide</a></li>
 <li><a href="tooling.html" target="mainFrame">Productivity

_______________________________________________
Mashup-dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/mashup-dev

Reply via email to