Home

  

Product

  

Buy

  

Support

 First Line 
 FAQs 
 Tutorials 
 Registered Users 
 User Guide 
 Knowledge Base 

News

  

Press

  

Downloads

  

Contact

  

Company

  

Partners

  

Resources

 
 
4. Configuring application servers

  
 4.1 Introduction

 4.2 Overview

 4.3 Compilation settings

 4.4 JNDI settings

 4.5 Deployment settings

 4.6 Other settings

 4.7 Example configurations

  4.1 IntroductionTo top of page

 This tutorial describes how to configure an enterprise application server in JCodeBox. If your application server is currently not supported by JCodeBox (more are being added all the time) you can still use 95% of JCodeBox. The only thing you will need to do manually is supply your application server specific deployment descriptors (JCodeBox will provide the standard J2EE deployment descriptors for you).

It categorises available settings and gives some examples for popular application servers

Note
Not all settings need to be entered to successfully build and deploy your application i.e. if your application does not contain any Message Driven Beans (MDB), you do not need to enter a value for topic connection factory JNDI. Also, if you do not want to deploy your applications then you do not need to enter any deployment settings.

  4.2 OverviewTo top of page

 Enterprise application servers need to be correctly configured in JCodeBox for two reasons:

  • Compiling applications

  • To compile a Java 2 Enterprise Edition (J2EE) application you need the correct J2EE classes to be available on your classpath. These classes (along with application server specific classes) are usually supplied with your application server distribution.

  • Deploying applications

  • JCodeBox can deploy applications to application servers that support development mode deployment (also known as hot deployment. This kind of deployment is usually supported by an application server by allowing you to place the application in a designated directory while the application server is still running. The server will then automatically recognise and deploy the application allowing you to connect to it immediately.

    In addition to the above, there and many other settings that may need to be set in the application server for your application to be deployed and run correctly. JCodeBox allows you to store these settings for a number of different application servers (note not all settings are applicable to all application servers i.e. commit option is specific to JBoss).

    To enter settings for an application server use the Enterprise server setup dialog (Tools->Enterprise server setup ... menu). When you have completed entering your settings, click the OK button to commit them.

  4.3 Compilation settingsTo top of page

 
  • Additional Classpath Libraries

  • J2EE and application server specific classes required to compile your application. Usually these are supplied as one or more archive files (i.e. .jar) and can be found in your application server directory (i.e. in the lib sub-directory). Use the add and remove buttons to select the files your application requires.

    Optional however you will not be able to compile (or package and deploy) any applications if not set.

  4.4 JNDI settingsTo top of page

 
  • Initial naming factory

  • The factory class to use to get an initial context object.
    Optional

  • Naming provider URL

  • URL to use to connect to the naming service.
    Optional

  • Topic connection factory JNDI

  • The factory class to use to create JMS topic connections.
    Optional (unless you define MDBs in your application)

  • Queue connection factory JNDI

  • The factory class to use to create JMS queue connections.
    Optional (unless you define MDBs in your application)

  • Local JNDI name suffix

  • This value is appended to the (remote) JNDI name of a bean to produce a local JNDI name.
    Mandatory for J2EE 1.3 or higher applications

  4.5 Deployment settingsTo top of page

 
  • Deployment Directory

  • The directory to use for hot deployment of applications. Use the browse button to select this.
    Optional however you will not be able to deploy any applications if not set.

  • Host name

  • The host name (or TCP/IP address) of the machine your application server is running on.
    Optional however JCodeBox will not be able to open a browser and connect to your application if not set.

  • Port

  • The port your application server uses for connecting to deployed applications.
    Optional however JCodeBox will not be able to open a browser and connect to your application if not set.

  4.6 Other settingsTo top of page

 
  • Use primitive wrapper classes for dual CMP/CMR fields

  • Some application servers allow you to use a CMP field for CMR relationships. This setting forces any fields used in this way to have a primitive wrapper data type (i.e. Integer instead of int). This is a requirement for some application servers.
    Optional

    Note
    Only applicable to applications using EJB 2.0 or higher.

  • Add CMR fields to ejbCreate (and ejbPostCreate)

  • Allows you to add CMR fields to the ejbCreate method (and also the ejbPostCreate). This allows CMR fields to be set in the ejbPostCreate method as mandated by the J2EE 1.3 specification. Optional

    Note
    Only applicable to applications using EJB 2.0 or higher.

  • Remove CMR fields from CMP fields list

  • Some application servers do not allow CMP fields to also be used for CMR relationships. This setting removes CMR fields from the list of CMP fields.
    Optional

    Note
    Only applicable to applications using EJB 2.0 or higher.

  4.7 Example configurationsTo top of page

 Note
These examples are just provided as a guide. They are not definitive. Your configuration will depend on your application server setup and the features you put in your application.

  1. JBoss 2.x

    • Additional Classpath Libraries

    • jboss-j2ee.jar (usually found in the lib/ext sub-directory of your installation)
      jboss-jdbc_ext.jar (usually found in the lib sub-directory of your installation)
      servlet.jar (usually found in the lib sub-directory of your installation)

    • Deployment Directory

    • deploy sub-directory of your installation

    • Initial naming factory

    • org.jnp.interfaces.NamingContextFactory

    • Naming provider URL

    • jnp://localhost:1099

    • Topic connection factory JNDI

    • TopicConnectionFactory

    • Queue connection factory JNDI

    • QueueConnectionFactory

    • Resources JNDI location

    • java:

    • Port

    • If using Apache Tomcat - 8080

  2. JBoss 3.0.x

    • Additional Classpath Libraries

    • jboss-j2ee.jar (usually found in the server/xxx/lib sub-directory of your installation)
      javax.servlet.jar (usually found in the server/xxx/lib sub-directory of your installation)

    • Deployment Directory

    • server/xxx/deploy sub-directory of your installation

    • Initial naming factory

    • org.jnp.interfaces.NamingContextFactory

    • Naming provider URL

    • jnp://localhost:1099

    • Topic connection factory JNDI

    • ConnectionFactory

    • Queue connection factory JNDI

    • ConnectionFactory

    • Resources JNDI location

    • java:

    • Port

    • If using Apache Tomcat - 8080

  3. Weblogic 6.1

    • Additional Classpath Libraries

    • weblogic.jar (usually found in the lib sub-directory of your installation)
    • Deployment Directory

    • config/xxx/applications sub-directory of your installation

    • Initial naming factory

    • weblogic.jndi.WLInitialContextFactory

    • Naming provider URL

    • t3://localhost:7001

    • Topic connection factory JNDI

    • TopicConnectionFactory

    • Queue connection factory JNDI

    • QueueConnectionFactory

    • Port

    • 7001

Copyright Michael Campbell Associates Ltd. 1999-2003. All Rights Reserved