Author: chirino
Date: Sun Oct 1 09:45:40 2006
New Revision: 451765
URL: http://svn.apache.org/viewvc?view=rev&rev=451765
Log:
Latest export from confluence
Added:
incubator/servicemix/site/main/users-space.data/
incubator/servicemix/site/main/users-space.data/example.zip (with props)
Modified:
incubator/servicemix/site/main/users-space.html
Added: incubator/servicemix/site/main/users-space.data/example.zip
URL:
http://svn.apache.org/viewvc/incubator/servicemix/site/main/users-space.data/example.zip?view=auto&rev=451765
==============================================================================
Binary file - no diff available.
Propchange: incubator/servicemix/site/main/users-space.data/example.zip
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Modified: incubator/servicemix/site/main/users-space.html
URL:
http://svn.apache.org/viewvc/incubator/servicemix/site/main/users-space.html?view=diff&rev=451765&r1=451764&r2=451765
==============================================================================
--- incubator/servicemix/site/main/users-space.html (original)
+++ incubator/servicemix/site/main/users-space.html Sun Oct 1 09:45:40 2006
@@ -112,9 +112,11 @@
<!--
<div class="pagetitle">Users space</div>
-->
- <DIV class="wiki-content"><P><B>Roadmap for a perspective
Servicemix developer</B></P>
+ <DIV class="wiki-content"><H2><A
name="Usersspace-RoadmapforaperspectiveServicemixdeveloper"></A><B>Roadmap for
a perspective Servicemix developer</B></H2>
+
+
+<H4><A name="Usersspace-THEPOINT%3A"></A>THE POINT:</H4>
-<P>THE POINT:</P>
<UL>
<LI>connect the dots between the documentation already existing on the
Servicemix website</LI>
<LI>Give a developer interested in Servicemix a run through on getting
the software up and running (with examples!)</LI>
@@ -122,7 +124,9 @@
</UL>
-<P> Conventions:</P>
+<H4><A name="Usersspace-Conventions%3A"></A>Conventions:</H4>
+
+<P>TERMS:</P>
<OL>
<LI>'company repository' = a remote Maven 2 repository used
within your company to hold dependencies/artifacts.</LI>
<LI>[Smix_source_folder] = the location of the folder created after
uncompressing the downloaded Smix source distribution (from .zip, .tar.gz
etc.).</LI>
@@ -130,7 +134,9 @@
</OL>
-<P><EM>NOTE: I am using</EM> <EM><SPAN class="nobr"><A
href="http://people.apache.org/maven-snapshot-repository/org/apache/servicemix/apache-servicemix/3.0-incubating-SNAPSHOT/apache-servicemix-3.0-incubating-20060907.104512-15-src.tar.gz"
title="Visit page outside Confluence"
rel="nofollow"><EM>apache-servicemix-3.0-incubating-20060907.104512-15-src.tar.gz</EM><SUP><IMG
class="rendericon"
src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0"
width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN></EM><EM>for the
following tutorial. If you do not use this snapshot release I cannot guarantee
the following will work.</EM></P>
+<P><EM>Note: I am using</EM> <EM><SPAN class="nobr"><A
href="http://people.apache.org/maven-snapshot-repository/org/apache/servicemix/apache-servicemix/3.0-incubating-SNAPSHOT/apache-servicemix-3.0-incubating-20060907.104512-15-src.tar.gz"
title="Visit page outside Confluence"
rel="nofollow"><EM>apache-servicemix-3.0-incubating-20060907.104512-15-src.tar.gz</EM><SUP><IMG
class="rendericon"
src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0"
width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN></EM><EM>for the
following tutorial. If you do not use this snapshot release I cannot guarantee
the following will work.</EM></P>
+
+<P><EM>Note: I am writing all this from a Apple MacBook, and therefore the
tutorital is from a BSD perspective.</EM></P>
<P>BEFORE STARTING:</P>
<UL>
@@ -138,19 +144,19 @@
</UL>
-<P><B>Getting the component dependencies into your local machine/company
repository</B></P>
+<H4><A
name="Usersspace-Gettingthecomponentdependenciesintoyourlocalmachine%2Fcompanyrepository"></A><B>Getting
the component dependencies into your local machine/company repository</B></H4>
<P>If you are going to be running any of the examples or doing any development
with a current SNAPSHOT/release then you may want to do a few things first. It
makes sense to check out the 3.0 (SNAPSHOT if you want the newest) source code
so that you can install the Smix component dependencies in your local
repository. First go here and download the <SPAN class="nobr"><A
href="http://servicemix.org/site/download.html" title="Visit page outside
Confluence" rel="nofollow">ServiceMix 3.0<SUP><IMG class="rendericon"
src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0"
width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN> sources. Next
you will want to build the Servicemix app and it's included components. Go
<SPAN class="nobr"><A href="http://servicemix.org/site/building.html"
title="Visit page outside Confluence" rel="nofollow">here<SUP><IMG
class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif"
height="0" width="0" align
="absmiddle" alt="" border="0"></SUP></A></SPAN> for instructions.</P>
-<P>Once you have built the 3.0 app, following the instructions linked above,
the Smix component modules will be installed locally. If you want to deploy
those dependencies to a company repository then keep reading. I can only give
information on doing this for Maven 2 as I did not try this for Maven 1. First
go into the top level project pom.xml with you favorite editor. This will be in
the [Smix_source_folder]/src folder. You are going to first edit out the
references to Maven 1. Search for 'm1', or in another case I searched
for 'maven-one'. There was a property and a plug in section I deleted
(maybe some other sections also). I think the plug in is the important one to
delte/coment out. Next edit the 'distributionManagement' section. Put
the relevent information for you company repository here. If you are working
with a SNAPSHOT release then you will need to put your snapshot repository
information in here.</P>
+<P>Once you have built the 3.0 app, following the instructions linked above,
the Smix component modules will be installed locally. If you want to deploy
those dependencies to a company repository then keep reading. I can only give
information on doing this for Maven 2 as I did not try this for Maven 1. First
go into the top level project pom.xml with you favorite editor. This will be in
the [Smix_source_folder]/src folder. You are going to first edit out the
references to Maven 1. Search for 'm1', or in another case I searched
for 'maven-one'. There was a property and a plug in section I deleted
(maybe some other sections also). I think the plug in is the important one to
delete/coment out. Next edit the 'distributionManagement' section.
Put the relevent information for you company repository here. If you are
working with a SNAPSHOT release then you will need to put your snapshot
repository information in here.</P>
<P>You should now be able to 'mvn -Dmaven.test.skip=true deploy'
and the dependencies will upload to the remote repository you defined. This is
a good thing when people you are working with will need the Smix component
dependencies. If others will be working on a Smix project you create it will
also come in handy, as they will not have to chase down dependencies. THANKS
MAVEN!!! I think there are other benefits too, such as faster
fetching since the dependencies are more local (physically).</P>
-<P><B>Next up install the compiled binary Servicemix...</B></P>
+<H4><A
name="Usersspace-NextupinstallthecompiledbinaryServicemix..."></A><B>Next up
install the compiled binary Servicemix...</B></H4>
<P>You now have Smix built from source, and the Smix components in a Maven 2
repository. The built distribution of Smix will be in
[Smix_source_folder]/apache-servicemix/target. There will be a source
distribution that is like (exactly like?) the one which you downloaded, and the
.zip, .tar.gzip binary distributions. Install the binary distribution following
<SPAN class="nobr"><A
href="http://servicemix.org/sm30ug/3-installation.html#3.Installation-UnixSourceInstallation"
title="Visit page outside Confluence" rel="nofollow">these<SUP><IMG
class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif"
height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN>
directions. Note those are for Unix, but you can follow the link and find
directions for Windows. Once you have installed the binary Servicemix
installation you are ready to do some testing.</P>
-<P> <B>wsdl-first</B></P>
+<H4><A name="Usersspace-wsdlfirst"></A><B>wsdl-first</B></H4>
<P>The first thing to do now is install the <SPAN class="nobr"><A
href="http://servicemix.org/sm30ug/1-quick-start.html#1.Quickstart-Deployasampleapplication"
title="Visit page outside Confluence" rel="nofollow">wsdl-first<SUP><IMG
class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif"
height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN>
service assembly (SA) which contains a few service units (SU's) (<SPAN
class="nobr"><A
href="https://sdlc6a.sun.com/ECom/EComActionServlet;jsessionid=728961EE41294F2FB2547B82D037F02E"
title="Visit page outside Confluence" rel="nofollow">See JBI specification
document<SUP><IMG class="rendericon"
src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0"
width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN>). The end
result is a XFire based SOAP service which is pretty simple. The actual code
for the service is in the file [Servicemix_binary_distribution_home]/examples/
wsdl-first/wsdl-first-jsr181-su/src/main/java/org/apache/servicemix/samples/wsdl_first/PersonImpl.java.
Phew! Take a look at the code, it is pretty simple. It uses an <SPAN
class="nobr"><A
href="http://java.sun.com/j2se/1.5.0/docs/guide/language/annotations.html"
title="Visit page outside Confluence" rel="nofollow">annotation<SUP><IMG
class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif"
height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN>
which describes the class as a <SPAN class="nobr"><A
href="http://dev2dev.bea.com/webservices/jwsm.html" title="Visit page outside
Confluence" rel="nofollow">jsr181<SUP><IMG class="rendericon"
src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0"
width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN> web service.
One interesting thing to note about this project is the use of an ant task
inside the parent pom.xml. This taks uses XFire's WsGenTask to create J
ava objects used by the web service, as described in the WSDL file.</P>
@@ -168,40 +174,59 @@
<P> That was the easy way....but you want to learn about developing so
let's do it the 'hard' way. First go to the
[Servicemix_binary_distribution_home]/examples/wsdl-first folder and type mvn
install. This example project is using a <SPAN class="nobr"><A
href="http://servicemix.org/site/maven-jbi-plugin.html" title="Visit page
outside Confluence" rel="nofollow">Maven 2 plugin<SUP><IMG class="rendericon"
src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0"
width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN> for creating
specific JBI components. If you look in the module pom.xml files you will see a
special packaging type. After the mvn install completes there will be file
called wsdl-first-sa-3.0-incubating-SNAPSHOT-installer in the wsdl-first-sa
module's target folder. This is SA for the wsdl-first example project. Now
we want to deploy this to our container. The Maven JBI plugin will take care of
this for us!!
! Note we need to make a small change to the wsdl-first-sa module's
pom.xml. The plugin will normally try to install all the shared libraries
needed by the SA when running the Maven goal jbi:projectDeploy. This is
sometimes useful. But often it causes problems because another SA in Smix is
using the shared lib already. In this case the Maven goal will try to remove
and redeploy the shared lib from Smix. This causes a problem and will make the
SA deployment fail. So to tell the plugin to not do this make the following
change in the pom.xml:</P>
-<P> <build><BR>
- <plugins><BR>
-
<plugin><BR>
-
<groupId>org.apache.servicemix.tooling</groupId><BR>
-
<artifactId>jbi-maven-plugin</artifactId><BR>
-
<extensions>true</extensions><BR>
+<P><build><BR>
+ <plugins><BR>
+ <plugin><BR>
+
<groupId>org.apache.servicemix.tooling</groupId><BR>
+
<artifactId>jbi-maven-plugin</artifactId><BR>
+
<extensions>true</extensions><BR>
</plugin><BR>
- </plugins><BR>
- </build></P>
+ </plugins><BR>
+</build></P>
-<P>-<DEL>--to</DEL>--- </P>
+<P>into....</P>
-<P> <build><BR>
- <plugins><BR>
-
<plugin><BR>
-
<groupId>org.apache.servicemix.tooling</groupId><BR>
-
<artifactId>jbi-maven-plugin</artifactId><BR>
-
<extensions>true</extensions><BR>
-
<configuration><BR>
-
<deployDependencies>false</deployDependencies><BR>
-
</configuration><BR>
-
</plugin><BR>
- </plugins><BR>
- </build></P>
+<P><build><BR>
+ <plugins><BR>
+ <plugin><BR>
+
<groupId>org.apache.servicemix.tooling</groupId><BR>
+
<artifactId>jbi-maven-plugin</artifactId><BR>
+
<extensions>true</extensions><BR>
+
<configuration><BR>
+
<deployDependencies>false</deployDependencies><BR>
+
</configuration><BR>
+ </plugin><BR>
+ </plugins><BR>
+</build></P>
<P> That little config change will prevent some headaches later.</P>
<P>You are ready to rock. Change directory to the wsdl-first-sa module. Type
'mvn jbi:projectDeploy'. You can watch the Smix console for
information on the deployment.</P>
-<P><B>Temporary excursion into monitoring</B></P>
+<P> Betting that all went well you should be ready to test out the web
service you deployed into Smix. Lucky for you a nice little web app has been
packaged with the application. In your web browser open the file
[Servicemix_binary_distribution_home]/examples/wsdl-first/client.html. This
static .html page contains a javascript which will try to contact the web
service on your local machine. To make it work simply click the
'send' button. If your browser issues any warning make sure you allow
the javascript to do what it needs to do. In Firefox I have to
'allow' what it calls an unsafe operation. The results of clikcing
the 'send' button will be a SOAP response posted into the right hand
text area.</P>
+
+<H4><A name="Usersspace-Temporaryexcursionintomonitoring"></A><B>Temporary
excursion into monitoring</B></H4>
+
+<P>One great benefit to JBI and Smix is the monitoring capabilities. Using the
jconsole application packaged with the Java SDK you can tap into your Smix
instance. In doing so you can get all sorts of information on things like
thread and memory usage, and have the ability to configure the Smix environment
dynamically. Lets use jconsole! Open a terminal session and type
'nohup jconsole &'. If your machine has the Java SDK /bin folder
in it's path then this should launch the jconsole application. If the
application has launched then you should be able to close the terminal window
now.</P>
+
+<P>You should see a window titled 'JConsole: Connect to Agent'. In
the 'Local' tab's window you should see an entry. Select this
entry and press the 'Connect' button. You should now be connected to
your local Smix instance. Take some time to play around. Done? Alright now lets
do some maintanance to the Smix environment. We are going to shut down the
wsdl-first SA, then start it back up.</P>
+<UL>
+ <LI>Select the tab called 'MBeans'.</LI>
+ <LI>This gives a tree like structure that you can navigate through.</LI>
+ <LI>Open the node labeled 'org.apache.servicemix'. Open the
'servicemix' node.</LI>
+ <LI>Open the node labeled 'Endpoint'. You will see all the
installed endpoints in your JBI environment here. There should be only one.</LI>
+ <LI>You should see a node labeled 'ServiceAssembly', open
this node. You now should see one entry for wsdl-first. Click on this entry.
The window to your right should now pop up some information about the SA.</LI>
+ <LI>In the right window click on the tab labeled
'Operations'. You will see four operations: start, stop, shutdown,
and getDiscriptior.</LI>
+ <LI>Click the shutdown button. You will get a pop up window containing
XML that tells you how the operation went. I hope that you see SUCCESS in the
task-result element.</LI>
+ <LI>With the SA shutdown try to get the <SPAN class="nobr"><A
href="http://localhost:8192/PersonService/main.wsdl" title="Visit page outside
Confluence" rel="nofollow">WSDL<SUP><IMG class="rendericon"
src="http://goopen.org/confluence/images/icons/linkext7.gif" height="0"
width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN> and use the
client.html app to contact the web service. Niether will work.</LI>
+ <LI>Let us start the SA again, click the start button in the operations
window. You again get a pop up with XML.</LI>
+ <LI>Try again to get the WSDL or hit the web service using the
client.html app. Both should now work</LI>
+</UL>
+
-<P>coming soon... </P>
+<P>So this is brief but should give you a good idea of how easy it can be to
manage your Servicemix instance(s).</P>
-<P><B>Next up - the bridge example</B></P>
+<H4><A name="Usersspace-Nextupthebridgeexample"></A><B>Next up - the bridge
example</B></H4>
<P>coming soon....</P></DIV>
@@ -213,8 +238,8 @@
</DIV>
<DIV id="site-footer">
Added by <A
href="http://goopen.org/confluence/users/viewuserprofile.action?username=gnodet">Guillaume
Nodet</A>,
- last edited by <A
href="http://goopen.org/confluence/users/viewuserprofile.action?username=robottaway">Robert
Ottaway</A> on Sep 27, 2006
- (<A
href="http://goopen.org/confluence/pages/diffpages.action?pageId=13814&originalId=13855">view
change</A>)
+ last edited by <A
href="http://goopen.org/confluence/users/viewuserprofile.action?username=robottaway">Robert
Ottaway</A> on Oct 01, 2006
+ (<A
href="http://goopen.org/confluence/pages/diffpages.action?pageId=13814&originalId=13884">view
change</A>)
(<A
href="http://goopen.org/confluence/pages/editpage.action?pageId=13814">edit
page</A>)
</DIV>