Index Changes

Data Mashup Service Engine Application Configurations

This topic provides information about creating an application configuration for the Data Mashup Service Engine. When you design a Data Mashup application, you will likely use development or test data sources rather than production sources. When you move a Data Mashup project to staging and later to production, you might need to change the connection information and other properties for the new environment. Application configurations allow you to do this without having to reconfigure the design-time project.

Application configurations enable these dependencies to be externalized and configured. If you use application configurations to define different data sources, you need to create a connection pool and JDBC resource for each source database. Then you can specify the JNDI name of the resource in the application configuration.

You can create a configuration using either the GlassFish Enterprise Server Admin Console or the Application Configuration Editor, which is accessed through the NetBeans JBI Manager on the Service window. This topic provides instructions for both methods.

To create an application configuration, perform the following steps in the order given:



To View Design-Time Connection Information for Source Tables

You can view a list of source connections and their database properties from the EDM file in a Data Mashup project. This can help you determine whether you need to create an application configuration to define different source databases. An Application configuration can overwrite these values at runtime.

  1. On the NetBeans IDE Project window, expand the Data Mashup project and double-click the EDM file to open it.
  2. Right-click on the EDM Editor canvas, and then select Database Properties.
  3. For each source connection listed, select the source connection and view the connection URL and login information.


To Create Connection Pools and JDBC Resources

For an application configuration, you need to create one connection pool and one JDBC resource for each source database. You can use up to five source connections in an application configuration.

For more information about creating connection pools and JDBC resources, see http://docs.sun.com/doc/820-4335/ablih?a=view.

  1. Launch the GlassFish Admin Console.
  2. For each source database used in the Data Mashup project, create one connection pool.
    Note - The URL property is mandator for Derby connection pools. Make sure to add that property in the connection pool and enter the URL in the correct format.
  3. For each connection pool you created, create a corresponding JDBC resource.


To Create a Data Mashup Application Configuration (From the Admin Console)

  1. Launch the GlassFish Admin Console.
  2. Under Common Tasks, expand JBI→Components, and then select sun-edm-engine.
    The Service Engine General Properties page appears.
  3. Click the Application tab, and then click Add Configuration.
  4. In the Identification section, enter a name for the application configuration.
  5. In the General Properties section, enter the following information:
    • DataDir – The path to the source data files.
    • DynamicFlatFile – An indicator of whether the Data mashup SE uses the file name passed in the input query (in the URL or SOAP request, for example). When set to "true", the Data Mashup SE uses the file name in the input query. When set to "false", the Data Mashup SE constructs the file path using he value of the DataDir property plus the fle name passed in. When this property is not set, it defaults to user.home.
    • SourceConnection#– The JNDI names of the JDBC resources you created above.
    • WorkingDir – The directory where temporary virtual database instances are created. If not set, this defaults to user.home.
  6. Click Save.

To Create a Data Mashup Application Configuration (From NetBeans)

  1. On the NetBeans IDE, click the Services tab.
  2. Start the GlassFish server.
  3. Expand Servers > GlassFish V2 > JIB > Service Engines.
  4. Right–click sun-edm-engine and select Properties.
  5. Click the Ellipses button next to the Application Configuration property.
    The Application Configuration Editor appears.
  6. Click Add.
    An empty row appears.
  7. Enter the following information (click in the blank cell under a column name to add a value):
    • Configuration – A unique name for the application configuration.
    • DataDir – The path to the source data files.
    • DynamicFlatFile – An indicator of whether the Data mashup SE uses the file name passed in the input query (in the URL or SOAP request, for example). When set to "true", the Data Mashup SE uses the file name in the input query. When set to "false", the Data Mashup SE constructs the file path using he value of the DataDir property plus the fle name passed in. When this property is not set, it defaults to user.home.
    • SourceConnection#– The JNDI names of the JDBC resources you created above.
    • WorkingDir – The directory where temporary virtual database instances are created. If not set, this defaults to user.home.
  8. Click Save.


To Associate the Application Configuration With an Endpoint

Once you create the application configuration, you need to associate it with a composite application service unit endpoint. Then you can deploy the application and the new configuration is applied.

  1. In NetBeans, open the Service Assembly file that contains the Data Mashup project to configure. If the Service Assembly file does not exist, do the following:
    • Create the composite application project.
    • Add the Data Mashup project to the composite application.
    • Build the composite application project.
    • Expand the composite application node, and then double-click on the Service Assembly node to open the CASA Editor.
  2. On the CASA Editor, right-click the endpoint with which you want to associate the application configuration, and then click Properties.
  3. In the Config Extension section of the Properties window, enter the name of the application configuration you created earlier.
  4. Save the Service Assembly.
  5. Deploy the project.
    After you have deployed the project, your changes to the configuration are applied, providing you with a runtime switch of connections.


Previous Next


Return to GlassFish ESB Documentation Home

JSPWiki v2.4.100
[RSS]
« Home Index Changes Prefs
This page (revision-13) was last changed on 16-Jun-09 16:27 PM, -0700 by CarolT