Home

  

Product

  

Buy

  

Support

 First Line 
 FAQs 
 Tutorials 
 Registered Users 
 User Guide 
 Knowledge Base 

News

  

Press

  

Downloads

  

Contact

  

Company

  

Partners

  

Resources

 
 

User Guide - Appendix C - JCodeBox configuration

Index    Previous   <<>>  Next
  
18.1 Overview

18.2 Settings

  18.1  OverviewTo top of page

This chapter describes how to configure JCodeBox. There are a number of configuration settings available which affect how JCodeBox works and this chapter covers the most important of these. In particular it covers settings that should be set prior to using JCodeBox to generate applications or components.

JCodeBox is very flexible and provides a number of global options that can be used to tailor the way in which it works. To set options use the Tools->Options ... menu. This will load the JCodeBox options dialog.

We recommend that certain options are set prior to generating your first applications/components from JCodeBox. These are listed below and are discussed in further detail later in this tutorial:

  • Default DataSource JNDI name
  • Default output directory
  • Temporary directory

When you have completed setting your global options, click the OK button to commit your changes.

  18.2  SettingsTo top of page

  1. Default DataSource JNDI name (Application tab)
  2. 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.

  3. Default output directory (Application tab)
  4. 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.

  5. Temporary directory (General tab)
  6. 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.

  7. Warning if no DataSource JNDI set (General tab)
  8. 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.

  9. Default base package (Application tab)
  10. JCodeBox will assign this to be the base package name for all applications you create.

  11. Default application name (Application tab)
  12. JCodeBox will assign this to be the application name for all applications you create.

  13. Web module name (Deployment tab)
  14. When JCodeBox packages your web application, this is the name it will give to the archive file.

  15. Create default creator (Entity Bean tab)
  16. When this option is set, JCodeBox will create a default creator (using all available bean fields) whenever you create an entity bean.

  17. Create DataSource resource reference (Entity Bean tab)
  18. 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.

  19. Synchronise DataSource field setting with resource reference (Entity Bean tab)
  20. 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.

  21. Synchronise bean name with constructors (Session Bean tab)
  22. 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.

  23. Web app tab
  24. 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.

Index    Previous   <<>>  Next

[an error occurred while processing this directive]