You open the visual editor by expanding your project's Configuration Files node in
the Projects window and double-clicking the sun-ejb-jar.xml file or the sun-cmp-mappings.xml file.
The Sun Configuration pane of the visual editor enables you to set CMP resource
properties and properties for the persistent manager and Java messaging. Additional properties can be
set in the Sun configuration tabs in the visual editor.
The visual editor displays a tree in the left pane with the configurable beans displayed below
the Sun Configuration node ( ). The following bean types may be visible in the tree:
Session Bean. A session bean ( )
provides a service to a particular user session. A session bean can be one of two types: stateless or stateful.
Entity Bean. An entity bean ( )
represents data that is typically stored in a database. Each entity bean represents a set of data, such as the fields in a database record.
There are two types of persistence for entity beans: bean-managed and container-managed.
Message Bean. A message bean ( )
enables enterprise applications to process messages asynchronously.
Clicking on a bean node opens the
configuration panel for the selected bean in the visual editor.
The configuration panes vary according to the type of bean, and
there may be multiple tabs in the pane for configuring complex
elements.
For a complete list of configurable properties for
all J2EE module types, see "Appendix A
Deployment Descriptor Files" in
the Sun Java System Application Server Developer's
Guide.
Sun Configuration Properties
The Sun Configuration pane is where you can modify the container properties for EJB beans. The following properties
are visible in the Sun Configuration pane:
Name. (optional) This field contains the name of the module.
CMP resource properties. The CMP resource specifies the database to be used for storing CMP beans. The JNDI
name is required. You can modify the following resource elements in the visual editor:
JNDI Name. Specifies the absolute jndi-name of a JDBC resource or a Persistence Manager resource.
Default Resource Principal Name. Specifies the default principal (user) for the resource.
Default Resource Principal Password. Specifies password of the default resource principal.
Database Vendor Name. Specifies the name of the database vendor for which tables can be created.
Allowed values are db2, mssql, oracle, pointbase, and sybase (case-insensitive).
If no value is specified, a connection is made to the resource specified by the jndi-name subelement of the cmp-resource element
in the sun-ejb-jar.xml file, and the database vendor name is retrieved from there.
If the connection cannot be established, or if the value is not recognized, SQL-92 compliance is presumed.
Create Table at Deploy. Select True to create database tables for beans
that are automatically mapped by the EJB container when the EJB JAR file is deployed.
If you select True you must supply a database vendor name.
Drop Tables at Undeploy. Select True to specify
that database tables that were automatically created when the
bean(s) were last deployed are dropped when the bean(s) are undeployed.
CMP Properties.
Configure PersistenceManagerFactory properties if the JNDI-name
of the CMP Resource refers to a JDBC resource. Click New to open the Property dialog box to add a property.
Schema Generator Properties. Specify field-specific type mappings and set the use-unique-table-names property.
Click New to open the Property dialog box to add a property.