|
Tools Guide |
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:
SilverStream's Deployment Plan Designer allows you to:
Deploy the EJBs contained in the EJB JAR to the SilverStream server (this results in the creation of a deployed object and a remote JAR)
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.
When the Deployment Descriptor defines roles, the Deployment Plan Designer displays those roles.
In the Property Inspector, choose the ... button to open the Identity property dialog.
In the Identity property dialog, open the appropriate security domain by clicking its + icon.
Select the user or group you want from within the security domain and choose OK.
Repeat this process for each of the displayed security roles.
The JNDI name and SSL security properties are available to both entity and session beans.
To specify the bean's JNDI name:
This is the only property property required for a session bean.
To specify that the bean use SSL security:
The Property Inspector displays the current cipher suite enabled selections.
Choose the Edit Cipher Suites link to access the Edit Cipher Suites dialog.
Enable or disable the desired cipher suites for the current bean by checking or unchecking its checkbox.
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.
To specify stateless session bean pool size
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.
To provide entity bean information:
Choose a database table from the Table dropdown.
To specify methods that modify no fields, choose Edit methods...
In the Edit methods dialog, add (or remove) methods as appropriate using the < and > buttons.
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.
To map a persistent field to a column in the primary table
Highlight the name of the persistent field you want to map, and open the Property Inspector.
Select a column from the drop down list box and click OK.
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:
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.
Open the Property Inspector and choose the ... button to open the Database Column dialog.
Repeat these steps for each of the object's constituent fields.
To map persistent fields to columns in a related table:
Highlight the name of the persistent field you want to map, and open the Property Inspector.
Open the related table by clicking the + icon next to its name.
You can map your finder methods to a SilverStream expression or a method.
To define expression-style finder methods:
Highlight the name of the finder method you want to map, and open the Property Inspector.
Make sure the Type is set to Expression.
Choose the ... button to open the Expression Builder to define the Where clause.
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:
The bean class itself defines the finder method, prefaced by ejbfindxxx().
In this case you simply define the Finder method as method-style using the Property Inspector as described below. SilverStream constructs the appropriate method calls in the deployment classes.
The bean class does not define a finder method and you need to subclass the bean to define it.
In this case you need to do two things:
To define method-style finder methods:
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:
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.
Select another bean from the drop down list box and click OK.
Highlight the name of each member variable in the foreign bean's primary key, and open the Property Inspector.
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.
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.