Migrating StreamBase Studio 3.x Projects

Steps to Migrate StreamBase 3.x Projects

If you are upgrading StreamBase from a 3.x version, you probably have projects that you want to continue working on in the current StreamBase release. This requires some changes to the old projects. This topic describes how to migrate your 3.x projects to the current StreamBase Studio.

To open the Import StreamBase Projects wizard:

  1. Click FileImport.

  2. In the Import page, expand StreamBase and select Projects from StreamBase Studio 3x. Click Next.

    You can also open the Import StreamBase Projects wizard from the Welcome page.

To run the Import StreamBase Projects wizard:

  1. Choose one of the following targets to import:

    • A root directory containing a StreamBase 3.x workspace. Tip: Specify the root directory, not a project within the workspace.

    • An archive file containing a StreamBase project that you have previously exported from StreamBase Studio.

    Note

    Project names must be unique in your workspace, so you cannot import a project whose name matches an existing project.

  2. The projects within the target you specified are listed in the Projects area. Mark the checkbox for the projects to be imported. Unchecked projects in the list will be omitted. The following screen shows projects within a selected work area

    The Copy projects into workspace option is always checked. This is because linking to projects is not currently supported. Instead, a copy is made in your new workspace, then modified as needed for the migration. The original 3.x workspace is not changed.

  3. Choose one of the following options:

    Preserve 3.x folder structure

    In previous releases, StreamBase projects always stored resources in special folders. These folders are no longer required, but you can continue to use them if you want. This option creates all the old 3.x folders in the new project, even those that do not contain any files.

    Preserve 3.x folder structure, but do not create empty folders

    This option is like the preceding one, except that folders that are empty in the 3.x project are not created in the new project.

    Flatten project structure

    This option creates a single project folder with no subfolders. It is the default option.

  4. Click Finish.

Special Case: Migrating Java Projects

In StreamBase 3.x, to add custom Java operators or adapters to a StreamBase project, you used a separate installation of Eclipse, independent of Studio 3.x. Your separate Eclipse installation incorporated the StreamBase 3.x Java Toolkit for Eclipse plug-in. You created a JAR file as the output of your Eclipse project, and then imported that JAR file into your Studio 3.x StreamBase project.

StreamBase Studio releases after 5.0 are based on Eclipse plug-ins, which allows you to develop your custom Java operators or adapters directly in Studio. This means you can migrate your 3.x Eclipse Java projects directly into Studio releases after 5.0. The Import Projects wizard described in the previous section migrates StreamBase projects, but does not migrate Java projects.

Use the following steps to migrate your StreamBase 3.x Java projects into StreamBase Studio 5.0 or later:

  1. Start StreamBase Studio 5.0 or later.

  2. Invoke FileImport from Studio's main menu.

  3. In the Import dialog, open the General folder.

  4. Select Existing Projects into Workspace and click Next.

  5. In the Import Projects dialog, click Browse and navigate to the root of the workspace for your separate Eclipse installation (the one in which you used the StreamBase 3.x Java Toolkit for Eclipse to create custom Java code).

  6. Still in the Import Projects dialog, the Projects field now contains a list of Eclipse projects. Mark the checkbox next to the project that contains your StreamBase 3.x Java code, and mark the Copy projects into workspace checkbox.

  7. Click Finish. Studio creates a new project in your Studio 5.0 or later workspace with the same name as your old Eclipse project.

  8. In the Studio 5.0 or later Package Explorer, select the newly imported Java project folder. Right-click, and select Build PathConfigure Build Path from the drop-down menu.

  9. In the Properties dialog, Java Build Path is pre-selected. Select the Libraries tab.

  10. In the list of JARs and folders on the build path, look for a folder marked invalid, with a name similar to com.streambase.sb.eclipse.clientTemplates.SBCLIENT_CONTAINER/3.7. Select this entry and click Remove.

  11. Click Add Library. In the Add Library dialog, select StreamBase Client API and click Next.

  12. In the confirmation page, click Finish.

  13. Back in the Properties dialog, click OK.

Now that your custom Java code project is imported into Studio 5.0 or later, there is one more task to make your Java code accessible to your StreamBase projects. You must add a reference in your StreamBase project to the project that contains your Java code.

  1. In the Studio 5.0 or later Package Explorer, select the top-level folder of your StreamBase project.

  2. Right-click and select Properties from the dropdown menu.

  3. In the Properties dialog, select Project References in the left-side column.

  4. Mark the checkbox for the project that contains your imported Java code. (For example, mark the checkbox next to MyCoolJavaOperator.)

  5. Click OK. Your StreamBase project can now use the Java code in the referenced project as if it was installed in the StreamBase project folder.