- Default DataSource JNDI name (Application tab)
Entity beans generated by JCodeBox typically maintain data held in a database. The entity bean needs a way to obtain a
connection to this database. In J2EE, connections are obtained from a DataSource resource reference that has been previously
configured in your application server (consult your application server's documentation for further details on creating resource
references).
A DataSource resource reference is accessed (i.e. by an entity bean) using the JNDI name that was assigned to it when it was
configured. Before using JCodeBox, you should create a DataSource resource reference for your database in your application server.
You should then set the Default DataSource JNDI name setting in JCodeBox to the JNDI name you assigned to the DataSource resource
reference.
When you create applications in JCodeBox, it will automatically set the applications' DataSource JNDI name to the value in
the Default DataSource JNDI name global setting. Then, when you create any entity beans in your application, the entity bean's
DataSource JNDI name will automatically be set to the application's DataSource JNDI name. In addition, JCodeBox can automatically
create a DataSource resource reference in the entity beans' resource references list based on its DataSource JNDI name.
In effect, you only have to set the DataSource JNDI name once (in global settings), and all future components (that need
DataSource objects i.e. entity beans) that you generate in JCodeBox can inherit this value.
If you change your database and create a new DataSource resource reference, again you only need to make the change in one place
in JCodeBox (global settings) and all future applications/entity beans that are created will use this new value.
JCodeBox also allows you to maintain a list of commonly used DataSource JNDI names making it easier to switch between names. To add/edit/delete from this list, click the button to the right of the default DataSource JNDI name dropdown box.
Tip
If you have matching tables in different databases and would like your application to access the table in a different database
(i.e. different from your Default DataSource resource reference) you can manually override the DataSource JNDI settings for an
individual entity bean. Note however, this does depend on your application server and bean persistence type and also raises
potential transaction issues.
- Default output directory (Application tab)
When you generate applications/components, JCodeBox will put all of the source code, deployment descriptors, etc in the
default output directory. A default value is assigned the first time you run JCodeBox.
- Temporary directory (General tab)
When you preview components JCodeBox will put all of the preview source code in the temporary directory. A default value
is assigned the first time you run JCodeBox.
- Warning if no DataSource JNDI set (General tab)
When this option is set, JCodeBox will warn you if you attempt to create an entity bean when there is no DataSource JNDI
name set in the application.
- Default base package (Application tab)
JCodeBox will assign this to be the base package name for all applications you create.
- Default application name (Application tab)
JCodeBox will assign this to be the application name for all applications you create.
- Web module name (Deployment tab)
When JCodeBox packages your web application, this is the name it will give to the archive file.
- Create default creator (Entity Bean tab)
When this option is set, JCodeBox will create a default creator (using all available bean fields) whenever you create
an entity bean.
- Create DataSource resource reference (Entity Bean tab)
When this option is set, JCodeBox will create a DataSource resource reference (based on your application DataSource JNDI
setting) whenever you create an entity bean. See Default DataSource JNDI name for further details.
- Synchronise DataSource field setting with resource reference (Entity Bean tab)
When this option is set, JCodeBox will keep the value of your entity bean's DataSource JNDI name synchronised with the name
of your DataSource resource reference i.e. if you change one value, JCodeBox will change the other for you.
- Synchronise bean name with constructors (Session Bean tab)
When this option is set, JCodeBox will keep the name of your session bean's constructor methods synchronised with the name
of your session bean class i.e. if you change one value, JCodeBox will change the other(s) for you.
- Web app tab
This tab contains settings that affect the web tier of your applications including:
- Web style
Allows you to select the web style to apply to the generated web application. Please see the JCodeBox knowledge base for detailed information on how web styles affect your web application.
- Include menu component (where supported by Web style)
Allows you to select whether or not you would like a menu component created for your web application.
- Default view set path
The location where view set components are created in your web application.
- Default system page path
The location where system pages are created in your web application.