Saturday, January 8, 2011

Intalio : how to deploy a process as an archive (without designer)

Introduction

Though deploying a process from the Intalio Designer is really straightforward (done in 1 click once the project is appropriately configured), one might need to be able to deploy a process without the Designer.

Step 1 : creating an archive from the process project

From the Explorer View in the Intalio Designer, click on the project you want to deploy to select it. Then, click on the button with the gear icon to open the process configuration page.


On the configuration page, check the "Archive the bundle" box : 
The "Archive the bundle" option specifies that a zip archive on the project will be created. The possible options are :
  • only deploy
  • only archive
  • deploy + archive
Once you're ready with the configuration, click on the "Archive button" :

The Designer console will then display the path of the generated archive :


As you can see, the project is archived in a zip file and it is named accordingly with your project name.

Step 2 : deploying the archive

 The content of the archive is as such :


Simply unzip the archive in a directory that has the same name as your project, in the ...\intalio-bpms-6.0.3.022\var\deploy directory.

Manually, you can simply copy the archive in the ...\intalio-bpms-6.0.3.022\var\deploy directory and unzip it with the option "Extrat to yourProjectName".

Note that the Intalio server supports hot deployment and consequently, you can unzip the archive with the server running as well as stopped.

Sunday, January 2, 2011

JBOSS AS 6 : Adding and testing a new Oracle 11g datasource

1 Prerequisites
  • Oracle 11g (R1 or R2 doesn't matter but anyway, I installed the R1)
  • a defined database
  • JBoss AS 6
 2 Adding the new datasource


As described in the JBoss AS documentation, we just need to create and configure a new RDBS-ds.xml file and put it in the jboss-6.0.0.Final\server\your-server-configuration\deploy directory.

In my case, in order to get to the point as quickly as possible (and because I only need a basic datasource configuration at the moment), I created my own oracle-ds.xml file by copying the sample one which is located at : jboss-6.0.0.Final\docs\examples\jca

Here's my own oracle-ds.xml file :

<?xml version="1.0" encoding="UTF-8"?>
<datasources>
    <local-tx-datasource>
        <jndi-name>OracleDS</jndi-name>
        <connection-url>jdbc:oracle:thin:@localhost:1521:CFDB</connection-url>
        <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
        <user-name>CF_USER</user-name>
        <password>mypassword</password>
        <valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker</valid-connection-checker-class-name>
        <metadata>
            <type-mapping>Oracle11g</type-mapping>
        </metadata>
    </local-tx-datasource>
</datasources>

At this point there's 2 things you should pay attention to :
  • Make sure there's no other xxx-ds.xml file with an identical jndi-name, otherwise, the datasource cannot be deployed correctly.
  • Don't forget to drop the appropriate JDBC driver library in the same directory as the datasource configuration file, that is : jboss-6.0.0.Final\server\your-server-configuration\deploy
3 Testing the connection
1° start the application server
2° log into the server administration console (http://localhost:xxxx/admin-console/login.seam)
3° go to the datasource section as shown below


4° Select the newly created datasource and open the CONTROL tab


5° Click on the Test connection button to run a test
6° As as result, make sure the test ran successfully and that a connection has been obtained


    To check whether a connection has been obtained, especially if you ran several tests, click on the Show 
    details below... button and make sure the result value is Yes


    The result value is critical to test the connection to your datasource because as long as your datasource 
    configuration file is correct, the test could run successfully while your database is not even running, for 
    instance ...