JBoss.orgCommunity Documentation
This section outlines the mechanisms that can be used to deploy a BPEL process to RiftSaw BPEL engine running within a JBoss AS server.
The direct deployment approach is demonstrated using an Ant script in each of the quickstart examples. For example,
<!-- Import the base Ant build script... -->
<property file="../../../install/deployment.properties" />
<property name="version" value="1" />
<property name="server.dir" value="${org.jboss.as.home}/server/${org.jboss.as.config}"/>
<property name="conf.dir" value="${server.dir}/conf"/>
<property name="deploy.dir" value="${server.dir}/deploy"/>
<property name="server.lib.dir" value="${server.dir}/lib"/>
<property name="sample.jar.name" value="${ant.project.name}-${version}.jar" />
<target name="deploy">
<echo>Deploy ${ant.project.name}</echo>
<jar basedir="bpel" destfile="${deploy.dir}/${sample.jar.name}" />
</target>
<target name="undeploy">
<echo>Undeploy ${ant.project.name}</echo>
<delete file="${deploy.dir}/${sample.jar.name}" />
</target>
This excerpt from the Ant build file for the hello_world quickstart example shows that deploying a RiftSaw BPEL process using Ant is very straightforward. The main points of interest are:
deployment.properties
file that
has been configured in the RiftSaw distribution (install folder).
deploy
folder.
deploy
folder.
This section will explain how to deploy an Eclipse BPEL project to the RiftSaw BPEL engine running in a JBossAS server.
The first step is to create or import the Eclipse BPEL project. In this case we are going to
import an existing project from the ${RiftSaw}/samples/quickstart/hello_world
folder. This can be achieved by selecting the Import ... menu item associated
with the lefthand navigator panel in Eclipse, and then select the
General->Existing Projects into Workspace entry and press the
Next button.
Then press the Browse button and navigate to the
hello_world
quickstart folder. Once located, press the Finish
button.
Once the project has been imported, you can inspect the contents, such as the BPEL process and WSDL description.
The next step is to create a server configuration for the JBoss AS environment in which the RiftSaw BPEL engine has previously been installed. From the Eclipse Java EE perspective, the Server tab should be visible in the lower region of the Eclipse window. If this view is not present, then go to the Window->Show Views->Servers menu item to open the view explicitly.
In the Servers view, right click and select the New->Server menu item.
Select the appropriate JBoss AS version, and then press Finish.
Before being able to deploy an example, we should start the new server. This can be achieved by right clicking on the server in the Servers tab, and selecting the Start menu item. The output from the server will be displayed in the Console tab.
Once the server has been started, right click on the server entry again, and select the Add and Remove ... menu item.
Select the Quickstart_bpel_hello_world project, press the Add button and the press the Finish button. This will cause the project to be deployed to the server.
Once the project has been deployed, it will show up as an entry below the server in the Servers tab.
The final step is to test the deployed BPEL process. In this example, we can do this
using the ant script provided with the quickstart sample. Right
click on the build.xml
file in the root folder of the project,
and select the Run As->Ant Build ... menu item. NOTE: It is important
to select the menu item with the "...", as this provides a dialog
window to enable you to select which ant target you wish to perform.
Deselect the deploy target, and select the sendhello target, before pressing the Run button. This was send a test 'hello' message to the server, and then display the response in the Console tab.
You can then use the menu associated with the project, contained in the server, to undeploy the project (using the Add and Remove ... menu item) and finally use the menu associated with the server itself to Stop the server.