Version 25

    The following article describes how to set up a development environment based upon eclipse and also provides an overview of how the build system is structured (and therefore how to perform partial builds):

     

    Using Eclipse to Develop BlackTie (recommended for LINUX users only)

    As there is no Visual Studio 2008 Toolchain for Windows we recommend following the instructions for Visual Studio below on Windows. If you do want to use Eclipse it does work but you will have to rely on the maven build for actually compiling the software and use Eclipse solely as a structured editor.

    Download Eclipse Galileo, it is available for download from:

        http://www.eclipse.org/downloads/packages/

    I chose the "Eclipse IDE for Java Developers" option and patched it with CDT

    ON WINDOWS

        Consider using c:\blacktie\workspace as the workspace folder

    ON LINUX

        Consider <USER_HOME>/blacktie/workspace

    INSTALL PLUGINS

    CDT 6.0.0 - REQUIRED
        http://download.eclipse.org/tools/cdt/releases/galileo/

              I chose to install via an "archive update site" - I only installed the mandatory components

    m2clipse - REQUIRED - Use the following update site
        http://m2eclipse.sonatype.org/update/

              I only installed the mandatory components

    Subclipse  - RECOMMENDED - Use the following update site
        http://subclipse.tigris.org/update_1.4.x

              You must be using a 1.5 command line version of svn for Subclipse to recognise your check out

    CONFIGURE ECLIPSE

    Under: Window -> Preferences -> C/C++ -> Indexer
        Select "No Indexer" for the indexer
    IMPORT PROJECTS

    In eclispe, import all the projects under <BLACKTIE_SRC_HOME>

    ON WINDOWS

    You will need to add the following include paths to each project on Windows:

    • C:\Program Files\Microsoft Visual Studio 9.0\VC\include
    • C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include

    RUNNING C/C++ APPLICATIONS FROM THE BUILD DIRECTORIES
    For running any Blacktie C/C++ applications using libraries from the build directories, rather than the distribution directory an PATH/LD_LIBRARY_PATH similar to the following is suggested:

    /home/tom/blacktie/trunk/atmibroker-hybrid/target/debug/shared/:/home/tom/blacktie/trunk/atmibroker-idl/target/debug/shared/:/home/tom/blacktie/trunk/atmibroker-core/target/debug/shared/:/home/tom/blacktie/trunk/atmibroker-xatmi/target/debug/shared/:/home/tom/blacktie/trunk/atmibroker-tx/target/debug/shared/:/home/tom/blacktie/trunk/atmibroker-xatmi/target/cxx/test/lib:/home/tom/blacktie/trunk/atmibroker-xatmi/target/cxx/runtime/lib

    Using Visual Studio 2008 for Developing BlackTie (WINDOWS ONLY)

    On windows we recommend using the Visual Studio 2008 Express Edition suite provided by MicroSoft to develop BlackTie as this includes the debugger and assorted integrated windows toolchain software.

    We have provided an example project under:

    • <BLACKTIE_SRC_ROOT>\atmibroker-xatmi\win32-xatmi-debug-assist\xatmi.sln

    NOTE: Unfortunately due to the maintainance cost to the team this project is not kept as up to date as the eclipse project files, however it is regularly checked to ensure its consistency

    NOTE: Due to the way the Visual Studio solution is formatted there are differences in the resultant output from building this project, versus using the maven build system, the key difference is when building using the solution, a single executable file is created, wheras when building in maven a suite of dll files are created.

    NOTE: The solution is provided for development use only, deployed versions of BlackTie MUST be built using the maven build procedure

    How the Build System is Structured

    The build system is based upon Maven, it comprises the following common modules:

    • blacktie - This is the main packaging module
    • blacktie-common - This contains common maven configuration such as default profiles etc
    • scripts - The scripts to setup binary distributions and run services
    • atmibroker-idl - This contains the IDL files and configuration to build the Java and C++ stubs
    • blacktie-xsd - This is our schema files for the configuration

    The following are our C/C++ modules:

    • atmibroker-core - This contains utility functions common to the C++ implementations of XATMI and TX
    • atmibroker-tx - This is our TX implementation which is implemented as an adapter onto JBoss Transactions
    • atmibroker-xatmi - This is our XATMI implementation for C and C++
    • atmibroker-hybrid - This is our CORBA/JMS transport plugin

    Finally, these are our Java modules:

    • jatmibroker-xatmi - This is the equivalent of atmibroker-xatmi and tx, but written in Java
    • stompconnectservice - This is the integration plugin for adding StompConnect to JBoss Messaging

    Assuming your LD_LIBRARY_PATH/PATH and your CLASSPATH are set up to pick up the libraries from build folders in test configurations, you should only have to rebuild the modules you have altered in order to test any changes.

    Important Points

    1. UNIT TESTS
      For any code that you write you should always write a unit test. We are using JUnit for the Java code and CppUnit for the C/C++ code. There are many examples within each modules of how to use either framework, alternatively you may like to read:     

       

    2. Debugging JNI issues (LINUX ONLY)
      Take a look at the following link for some information on how to debug the JNI tests (such as those for JAB an JAtmiBroker): Debugging JNI from Eclipse