Tools Guide


Chapter 9   Deployment Plan Designer

You use the SilverStream Deployment Plan Designer to perform all of the tasks associated with deploying Enterprise JavaBeans (EJBs).

NOTE   The deployment plan replaces the concept of the deployed JAR. Deployed JARs will continue to run in SilverStream as is. However, if you want to edit the deployment information for an existing deployed JAR, you first need to convert the JAR to a deployment plan. To do this, right-click the JAR in the SilverStream Designer and choose Convert to EJB JAR Deployment Plan. This will create a new deployment plan, leaving the old deployed JAR unchanged.

This chapter describes how to use the SilverStream Deployment Plan Designer. It includes the following topics:

 
Top of page

About the Deployment Plan Designer

SilverStream's Deployment Plan Designer allows you to:

 
Top of page

Specifying deployment information for the EJB JAR

Enabling the deployment

To enable the EJB deployment:

  1. Choose the Enterprise JavaBeans icon.

  2. Open the Property Inspector.

  3. Set the Enabled property to True.

You can only deploy an EJB JAR in the enabled state if the deployment information is complete. If the deployment information is not complete, SilverStream saves the deployment plan, but does not enable the JAR.

Mapping roles

To map security roles:

When the Deployment Descriptor defines roles, the Deployment Plan Designer displays those roles.

  1. Highlight a role and open the Property Inspector.

  2. In the Property Inspector, choose the ... button to open the Identity property dialog.

  3. In the Identity property dialog, open the appropriate security domain by clicking its + icon.

  4. Select the user or group you want from within the security domain and choose OK.

  5. Repeat this process for each of the displayed security roles.

  6. Close the Property Inspector.

 
Top of page

Specifying deployment information for each EJB

The JNDI name and SSL security properties are available to both entity and session beans.

To specify the bean's JNDI name:

  1. Highlight the bean and open the Property Inspector.

  2. Enter a JNDI deployment name.

This is the only property property required for a session bean.

To specify that the bean use SSL security:

  1. Highlight the bean and open the Property Inspector.

  2. Check the Use SSL checkbox.

    The Property Inspector displays the current cipher suite enabled selections.

  3. Choose the Edit Cipher Suites link to access the Edit Cipher Suites dialog.

  4. Enable or disable the desired cipher suites for the current bean by checking or unchecking its checkbox.

  5. Choose OK to accept the cipher suite choices.

        For more information on EJBs and SSL security, see the chapter on using EJBs with SilverStream in the Programmer's Guide.

Specifying session bean information

To specify stateless session bean pool size

  1. Highlight the session bean and open the Property Inspector.

  2. Specify the pool size for this bean using the Session pool size radio button. The default is 500.

    NOTE   If you do not want SilverStream to reuse session bean instances, set the value to zero.

        For more information on stateless session bean pools, see the chapter on session beans in the Programmer's Guide.

Specifying entity bean information

To provide entity bean information:

  1. Highlight the entity bean, and open the Property Inspector.

  2. Choose a database table from the Table dropdown.

  3. To specify methods that modify no fields, choose Edit methods...

  4. In the Edit methods dialog, add (or remove) methods as appropriate using the < and > buttons.

  5. Click OK when you are done.

  6. To create a lazy bean, set Delay Instantiation to True.

        For more information on lazy beans and when it is appropriate to use them, see the chapter on entity beans in the Programmer's Guide.

  7. Close the Property Inspector.

Mapping entity bean fields

To map a persistent field to a column in the primary table

  1. Highlight the name of the persistent field you want to map, and open the Property Inspector.

  2. Choose the ... button to open the Database Column dialog.

  3. Select a column from the drop down list box and click OK.

  4. Close the Property Inspector.

To map complex data types:

If your deployment descriptor includes a persistent field that is a complex data type (such as an object that represents an address), the Deployment pane allows you to map the constituent fields of the complex data type to columns in the primary database table. Follow these steps to map the complex data type:

  1. Highlight the name of the persistent field you want to map.

    NOTE   Choose the constituent fields of the complex data type, not the complex data type itself. You may need to click the + icon next to the complex data type to access the constituent fields.

  2. Open the Property Inspector and choose the ... button to open the Database Column dialog.

  3. Select a column from the drop down list box and click OK.

  4. Repeat these steps for each of the object's constituent fields.

To map persistent fields to columns in a related table:

  1. Highlight the name of the persistent field you want to map, and open the Property Inspector.

  2. Choose the ... button to open the Database Column dialog.

  3. Open the related table by clicking the + icon next to its name.

  4. Select the database column and click OK.

  5. Close the Property Inspector.

Mapping finder methods

You can map your finder methods to a SilverStream expression or a method.

To define expression-style finder methods:

  1. Highlight the name of the finder method you want to map, and open the Property Inspector.

  2. Make sure the Type is set to Expression.

  3. Choose the ... button to open the Expression Builder to define the Where clause.

  4. Create the appropriate expression and click OK.

  5. Close the Property Inspector.

About method-style finders   You can specify a method-style finder when an expression is not sufficient to define the Where clause for the bean. There are two ways that the method-style finder might be defined:

To define method-style finder methods:

  1. Highlight the name of the finder method you want to map, and open the Property Inspector.

  2. Make sure the Type is set to Method.

  3. Close the Property Inspector.

Mapping member variables to foreign beans

If your deployment descriptor includes a persistent field that has another bean's remote interface as its data type, the Deployment Plan Designer allows you to map the field to another bean. The Deployment Plan Designer allows you map to a single bean reference; therefore, it supports many-to-one and one-to-one relationships, but not one-to-many relationships.

To map member variables to foreign beans:

  1. Highlight the name of the persistent field that you want to map, and open the Property Inspector.

    Because a persistent field has another bean's remote interface as its data type, the Property Inspector displays the Foreign Bean field, which allows you to map the member variable to another bean instead of a table field.

  2. Choose the ... button to open the Foreign Bean dialog.

  3. Select another bean from the drop down list box and click OK.

  4. Highlight the name of each member variable in the foreign bean's primary key, and open the Property Inspector.

  5. Choose the ... button to open the Database Column dialog.

  6. Select a column from the drop down list box and click OK.

    The columns you can choose from are columns associated with the table for the bean for which you're specifying deployment information (not the table for the foreign bean). Bean references allow for read/write access. Therefore, if you set the the foreign bean reference to point to a bean other than the one originally loaded, SilverStream writes the new bean reference to the database.

  7. Close the Property Inspector.

NOTE   To map a member variable to a foreign bean, you need to have the foreign bean in the EJB JAR you are deploying.


Tools Guide

Copyright © 2001, SilverStream Software, Inc. All rights reserved.