How to deploy a project configuration for all your users

    This document describes how to deploy shared projects to your users from a single central point. This will automatically provide the project and connection information to the users and avoid the need for them to configure these.

    Important : The project (as a directory on disk) is designed for single user only. It should never be opened by more than one user even if it is located in a shared disk. This document describes how to achieve sharing of projects correct way.

    A project is deployed by placing it on a web server and configuring IJC to access it. The project will be copied into IJC and opened. For reasons that should be obvious the most common use would be for connections to remote databases. Local databases can also be included, and the entire local database will be copied to each users computer as a local copy. This is less useful as if you wish to update the database then the updated version will be copied to the users computer and all the local changes (including forms, lists, queries etc.) will be lost. Also note that local database files will be quite large, so only consider this approach for small databases.

    Each user can still create their own local databases in the project (or connect to other remote databases) but other users will not see these databases.

    Why might you want to deploy projects?

    There are several potential reasons:

    • Users can start work as soon as IJC starts, without needing to set up projects or database connections.

    • Project configurations can be updated by the administrator

    • Centrally configured projects can include predefined (shared) forms, queries and lists providing the administrator with additional options for pre-configuring the environment the users see.

    What you need

    Shared projects are deployed to a standard web server. You must be able to add files to this web server.

    You must have an IJC enterprise license to deploy projects to your own server.

    Steps

    1. Create the project

    Create a new IJC project and all the connections and data that you want your users to see. This can include shared views (forms) queries and lists. See the comments above about including local (Derby) databases. Make a note of the directory the project is written to. We assume it will be called microprobe.

    Ensure that you have cleared all usernames and passwords that you do not wish to distribute with the project (e.g. your own IJC username/password).

    When your project is ready close IJC.

    2. Prepare the project zip file and .ijp file.

    2.1 Using the wizard.

    A wizard is available to prepare the shared project files:

    1. Right click in the empty space at the bottom of the projects window and choose 'New shared projects...'.

    2. The wizard will open

      images/download/attachments/1802631/newShareProject.png
    3. Specify a directory which will contain the generated files.

    4. Specify a name for the shared project configuration e.g. 'projects'.

    5. Specify a version number for the configuration. This should be increased if you are updating an existing configuration.

    6. Click on the 'Create' button. There will be a small delay as the files are prepared. They will be located in the directory you specified.

    2.2 Manual preparation.

    Alternatively the .ijp and .zip shared project files can be prepared manually:

    1. Locate the project directory that was created in step 1 and make a copy of the directory and all its contents.

    2. Locate the .config directory and rename it to .server.

    3. Create a zip file of the project contents (e.g. project1.zip). The contents should look like this

    
        ./.wbproject
        ./.wbproject/project.properties
        ./.server
        ./.server/test
        ./.server/test.ijs
    

    Create the deployment configuration file which should have a .ijp extension (e.g. projects.ijp) which should look something like this:

    
        <?xml version="1.0" encoding="UTF-8"?>
        <!--
        prj_configuration attributes:
            codebasename - URL where is the configuration file deployed (useful if you deploy already downloaded file)
            version - change it on configuration update, you don't need to use it
     
            <prj_configuration codebasename="http://yourserver.com/ijc-projects/projects.ijp" version="1">
                <!--
                    prj attributes:
                    url - relative URL with zip file, the zipfile contains packed project with .server configurations
                    name - name of project
                    version - change it together with version configuration if project is updated
                -->
            <prj url="project1.zip" name="project1" version="1"/>
        </prj_configuration>
     
    

    An example file can be found here .

    3. Deploy to the server.

    If you want to use shared IJC urls or if you have deployed UrlWebApp.war to your java web server you should place the .ijp and .zip to the data folder on the server. Details are described in How to access data in Instant JChem using URLs .

    Otherwise, please place the .ijp file on the web server along with the zipped project. For instance in the directory name ijc-projects you should now have 2 files: projects.ijp and project1.zip. The codebasename attribute is only required when you use this as a local file. If running from a web server then it can be omitted. If present the codebasename must corresponds to the FULL URL of the file on the web server.

    4. Updating configuration information

    If you need to update the deployed information then increase the version attributes of the <prj_configuration/> tag. <prj/> elements as appropriate. The updated configuration will be used then next time the user starts IJC.

    5. Using the deployed project

    There are 3 ways in which shared projects can be used in IJC.

    1. Manual configuration.

    Anyone running any version of IJC 2.3 or later (Java Web Start or traditional installer) can use this. Your administrator will give you the URL to use and any username/password information that you might need. Use File -> Open Shared Projects... from main menu to load the project configuration. Alternatively you can use Tools -> Options and then go to the Shared Projects category under the Miscellaneous options to see or modify the current shared projects. Click on the Add button and type of paste in the URL you have been given. Configurations can be removed using the remove button.

    2. Using command line options

    If you have IJC that has been installed with the traditional installer (as opposed to running with Java Web Start) you can open a shared projects using a command line argument:

    a) --open Open a configuration file that has been downloaded to local disk. File must end with .ijp run IJC from command line: ${ijc_installation}/bin/instantjchem --open projects.ijp Where projects.ijp is path to .ijp file.

    b) --openUrl Run IJC from command line: ${ijc_installation}/bin/instantjchem --openUrl http://yourserver.com/ijc-projects/projects.ijp

    In both cases IJC will open and the shared project will be present in the projects window.

    3. Java Web Start

    Instructions for setting IJC up to run using Java Web Start can be found here . This must be done before you can configure it to use shared projects.

    Modify the <application-desc/> tag in master.jnlp file as follows:

    
         <application-desc main-class="com.im.ijc.jnlpinstaller.Main">
             <argument>--openUrl</argument>
             <argument>http: //yourserver/location/config.ijp</argument>
         </application-desc>

    Problems?

    If you find problems or have any questions then please report them to the IJC forum .