Step 2: Wire JoltSessionBean to JoltServiceBean Using PropertyChange

  1. Click the Interaction Tool icon in the toolbar of the Visual Café Form Designer window to display the bean components.
  2. Click on the JoltSessionBean and drag a line to the JoltServiceBean, as shown in the following figure.

    Figure 5-14 Wire the JoltSessionBean to the JoltServiceBean

    Wire the JoltSessionBean to the JoltServiceBean Diagram

    The Interaction Wizard window is displayed as shown in the following figure, with the prompt:

    What event in joltSessionBean1 do you want to start the interaction?

  3. Select propertyChange as the event that starts the interaction, as shown in the following figure.

    Figure 5-15 Select propertyChange Event

    Select propertyChange Event Diagram
  4. Click Next.

    The Interaction Wizard window is displayed as shown in the following figure, with the prompt:

    What do you want to happen when joltSessionBean1 fires propertyChange event?

  5. Select Handle a Jolt property change event as the method, as shown in the following figure.

    Figure 5-16 Select Handle a Jolt property change event

    Select Handle a Jolt property change event Diagram
  6. Click Next.

    The Interaction Wizard window is displayed as shown in the following figure, with the prompt:

    How do you want to supply the parameter to this method?

    and a list of available objects and actions from which to choose.

  7. Select joltSessionBean1 as the object that supplies the action, as shown in the following figure.
  8. Select Get the current Property Change Event object as the action, also as shown in the following figure.

    Figure 5-17 Select joltSesssionBean1

    Select joltSesssionBean1 Diagram
  9. Click Finish.

Completing “Step 2: Wire JoltSessionBean to JoltServiceBean Using PropertyChange”enables the JoltSessionBean to send a propertyChange event when logon() completes. The JoltServiceBean listens to this event and associates its service with this session.