Running the JMS Importer

About this task

Use the JMS Importer to create a schema in order to manipulate Java objects from within a map using the JMS Adapter.

To run the JMS Importer:

Procedure

  1. Open the Type Designer application.
  2. Select Import a schema in the Startup window and click Next. Or select Import from the Tree menu at anytime while the Type Designer is running.

    The Importer Wizard dialog box appears.

  3. Select Java Message Service (JMS) and click Next.

    The JMS Importer Wizard appears. Follow the steps to automatically generate a schema for a Java class.

  4. Enter a fully qualified class name for the Java class file (in this example, Book) that you want to import. Click Next. The Java code for the Book class is:

Results

public class Book implements java.io.Serializable { public String title; public String author; public float price; public boolean instock; public Book(String title, String author) { this.title = title; this.author = author; } public Book(String title, String author, float price, boolean instock) { this(title, author); this.price = price; this.instock = instock; } }

When using the JMS importer, the specified Java class (the one you are importing) must implement the java.io.Serializable interface; otherwise, the import process will fail.

Note: Book class is in the default package for this example. If it were in a named package, the name of the package would precede the name of the class. For example, com.hcl.mypack.Book.